]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make sure the TNT doesn't piss its pants when it gets a name field in quotes before...
authorBrian West <brian@freeswitch.org>
Wed, 11 Nov 2009 03:53:50 +0000 (03:53 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 11 Nov 2009 03:53:50 +0000 (03:53 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15423 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index daab87f8baaa785b1c9a3232ac20521b1005fc16..7e64e91b53dd9d91cf8078111d554d429d9b4673 100644 (file)
@@ -1669,9 +1669,14 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                                        screen = "yes";
                                }
                                
-                               tech_pvt->rpid = switch_core_session_sprintf(tech_pvt->session, "\"%s\"<sip:%s@%s>;party=calling;screen=%s;privacy=%s",
-                                                                                                                        tech_pvt->caller_profile->caller_id_name,
-                                                                                                                        tech_pvt->caller_profile->caller_id_number, rpid_domain, screen, priv);
+                               if (!strcasecmp(tech_pvt->caller_profile->caller_id_name, "_undef_")) {
+                                       tech_pvt->rpid = switch_core_session_sprintf(tech_pvt->session, "<sip:%s@%s>;party=calling;screen=%s;privacy=%s",
+                                                                                                                                tech_pvt->caller_profile->caller_id_number, rpid_domain, screen, priv);
+                               } else {
+                                       tech_pvt->rpid = switch_core_session_sprintf(tech_pvt->session, "\"%s\"<sip:%s@%s>;party=calling;screen=%s;privacy=%s",
+                                                                                                                                tech_pvt->caller_profile->caller_id_name,
+                                                                                                                                tech_pvt->caller_profile->caller_id_number, rpid_domain, screen, priv);
+                               }
                        }
                        break;
                default: