From: Anthony Minessale Date: Fri, 6 Nov 2009 22:08:59 +0000 (+0000) Subject: add var check X-Git-Tag: v1.0.6~1476 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a3c867f7b1665b7937e42098065f71ae73091d5;p=thirdparty%2Ffreeswitch.git add var check git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15391 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 358f5fff84..adbfeef7e4 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -3100,11 +3100,13 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session switch_channel_set_variable(nchannel, "sip_invite_params", "intercom=true"); } - if ((hval = switch_event_get_header(var_event, "sip_callee_id_name"))) { + if (((hval = switch_event_get_header(var_event, "effective_callee_id_name")) || + (hval = switch_event_get_header(var_event, "sip_callee_id_name"))) && !zstr(hval)) { caller_profile->callee_id_name = switch_core_strdup(caller_profile->pool, hval); } - if ((hval = switch_event_get_header(var_event, "sip_callee_id_number"))) { + if (((hval = switch_event_get_header(var_event, "effective_callee_id_number")) || + (hval = switch_event_get_header(var_event, "sip_callee_id_number"))) && !zstr(hval)) { caller_profile->callee_id_number = switch_core_strdup(caller_profile->pool, hval); }