]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4049 alt patch
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 28 Mar 2012 19:29:39 +0000 (14:29 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 28 Mar 2012 19:29:39 +0000 (14:29 -0500)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 1dfa7188cdf9f537e23dc833cfad61a363ca2c8a..3b09287494658cbf4213c72c5caa8547f0613674 100644 (file)
@@ -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);