From: Anthony Minessale Date: Wed, 28 Mar 2012 19:29:39 +0000 (-0500) Subject: FS-4049 alt patch X-Git-Tag: v1.2-rc1~19^2^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf47982e0e559d6922224285eeef5a9029301ccf;p=thirdparty%2Ffreeswitch.git FS-4049 alt patch --- diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 1dfa7188cd..3b09287494 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2454,6 +2454,20 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * } else { from_id = switch_str_nil(switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Number")); } + + if (zstr(from_id)) { + from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Callee-ID-Number")); + } + + if (zstr(from_id)) { + from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Destination-Number")); + } + + if (zstr(from_id)) { + from_id = "n/a"; + } + + #if 0 char *buf; switch_event_serialize(helper->event, &buf, SWITCH_FALSE);