]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
small tweak to make sure we don't make any devices mad
authorBrian West <brian@freeswitch.org>
Wed, 23 Jul 2008 13:11:45 +0000 (13:11 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 23 Jul 2008 13:11:45 +0000 (13:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9139 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index e4358a142792529499d368882b25a02b972918d9..2662c5538665fb1cfeb67b89e298cc207d3b86db 100644 (file)
@@ -2071,7 +2071,7 @@ static void general_event_handler(switch_event_t *event)
 
                        if (profile_name && ct && es && body && user && host && (profile = sofia_glue_find_profile(profile_name))) {
                                char *id = NULL;
-                               char *contact;
+                               char *contact, *p;
                                char buf[512] = "";
 
                                if (!sofia_reg_find_reg_url(profile, user, host, buf, sizeof(buf))) {
@@ -2084,6 +2084,10 @@ static void general_event_handler(switch_event_t *event)
                                switch_assert(id);
                                contact = sofia_glue_get_url_from_contact(buf, 0);
                                
+                               if ((p = strstr(contact, ";fs_"))) {
+                                       *p = '\0';
+                               }
+
                                nh = nua_handle(profile->nua, 
                                                                NULL, 
                                                                NUTAG_URL(contact), 
@@ -2118,7 +2122,7 @@ static void general_event_handler(switch_event_t *event)
 
                        if (profile_name && ct && body && user && host && (profile = sofia_glue_find_profile(profile_name))) {
                                char *id = NULL;
-                               char *contact;
+                               char *contact, *p;
                                char buf[512] = "";
 
                                if (!sofia_reg_find_reg_url(profile, user, host, buf, sizeof(buf))) {
@@ -2130,6 +2134,10 @@ static void general_event_handler(switch_event_t *event)
 
                                switch_assert(id);
                                contact = sofia_glue_get_url_from_contact(buf, 0);
+
+                               if ((p = strstr(contact, ";fs_"))) {
+                                       *p = '\0';
+                               }
                                
                                nh = nua_handle(profile->nua, 
                                                                NULL,