Revision
15423
Author
brian
Date
2009-11-10 21:53:50 -0600 (Tue, 10 Nov 2009)

Log Message

 make sure the TNT doesn't piss its pants when it gets a name field in quotes before the rpid... sigh how stupid is that?

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (15422 => 15423)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	2009-11-11 02:43:55 UTC (rev 15422)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	2009-11-11 03:53:50 UTC (rev 15423)
@@ -1669,9 +1669,14 @@
 					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: