]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix dialog-info presence issue
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 4 Oct 2010 22:55:04 +0000 (17:55 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 4 Oct 2010 22:58:05 +0000 (17:58 -0500)
src/mod/endpoints/mod_sofia/sofia_presence.c

index d9b3de0a8b9ebd9be6285b334cffa4dbd1b8affd..3a01e1e003ea865bc6049a0286e67834ac69e018 100644 (file)
@@ -571,22 +571,22 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
                                switch_safe_free(sql);
 
 
-                               sql = switch_mprintf("select sip_registrations.sip_user, sip_registrations.orig_server_host, sip_registrations.status, "
+                               sql = switch_mprintf("select sip_registrations.sip_user, sip_registrations.orig_hostname, sip_registrations.status, "
                                                                         "sip_registrations.rpid,'', sip_dialogs.uuid, sip_dialogs.state, sip_dialogs.direction, "
                                                                         "sip_dialogs.sip_to_user, sip_dialogs.sip_to_host, sip_presence.status,sip_presence.rpid,sip_presence.open_closed,"
                                                                         "'%q','%q' "
 
                                                                         "from sip_registrations left join sip_dialogs on "
                                                                         "(sip_dialogs.sip_from_user = sip_registrations.sip_user "
-                                                                        "and (sip_dialogs.sip_from_host = sip_registrations.orig_server_host or "
+                                                                        "and (sip_dialogs.sip_from_host = sip_registrations.orig_hostname or "
                                                                         "sip_dialogs.sip_from_host = sip_registrations.sip_host) ) "
 
                                                                         
                                                                         "left join sip_presence on "
-                                                                        "(sip_registrations.sip_user=sip_presence.sip_user and sip_registrations.orig_server_host=sip_presence.sip_host and "
+                                                                        "(sip_registrations.sip_user=sip_presence.sip_user and sip_registrations.orig_hostname=sip_presence.sip_host and "
                                                                         "sip_registrations.profile_name=sip_presence.profile_name) "
                                                                         "where sip_registrations.sip_user='%q' and "
-                                                                        "(sip_registrations.orig_server_host='%q' or sip_registrations.sip_host='%q' "
+                                                                        "(sip_registrations.orig_hostname='%q' or sip_registrations.sip_host='%q' "
                                                                         "or sip_registrations.presence_hosts like '%%%q%%')",
                                                                         dh.status, dh.rpid, probe_euser, probe_host, probe_host, probe_host);
                                switch_assert(sql);