From 8a3c867f7b1665b7937e42098065f71ae73091d5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 6 Nov 2009 22:08:59 +0000 Subject: [PATCH] add var check git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15391 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); }