[Freeswitch-svn] [commit] r13528 - freeswitch/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
brian at freeswitch.org
Mon Jun 1 06:55:18 PDT 2009
Author: brian
Date: Mon Jun 1 08:55:17 2009
New Revision: 13528
Log:
ok only do this is callee_id_name is set
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Jun 1 08:55:17 2009
@@ -179,21 +179,15 @@
{
private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
const char *callee_name = NULL, *callee_number = NULL;
- const char *ua = switch_channel_get_variable(tech_pvt->channel, "sip_user_agent");
-
- if (ua && switch_stristr("polycom", ua)) {
- if (!(callee_name = switch_channel_get_variable(tech_pvt->channel, "callee_id_name"))) {
- callee_name = "";
- }
+ char *pai = NULL;
+ if ((callee_name = switch_channel_get_variable(tech_pvt->channel, "callee_id_name"))) {
if (!(callee_number = switch_channel_get_variable(tech_pvt->channel, "callee_id_number"))) {
callee_number = tech_pvt->caller_profile->destination_number;
}
-
- return switch_core_session_sprintf(tech_pvt->session, "P-Asserted-Identity: \"%s\" <%s>", callee_name, callee_number);
+ pai = switch_core_session_sprintf(tech_pvt->session, "P-Asserted-Identity: \"%s\" <%s>", callee_name, callee_number);
}
-
- return NULL;
+ return pai;
}
/* map QSIG cause codes to SIP from RFC4497 section 8.4.1 */
More information about the Freeswitch-svn
mailing list