]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4049 working
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 28 Mar 2012 23:44:51 +0000 (18:44 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 28 Mar 2012 23:45:01 +0000 (18:45 -0500)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 4b84d6a6670da9126fa429a7be9b0fc15a5edf50..c553119360656fc1914d1a81891aa696f088c25d 100644 (file)
@@ -2453,15 +2453,15 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                        from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Destination-Number"));
                        
                } else {
-                       from_id = switch_str_nil(switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Number"));
-                       from_name = switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Name");
+                       from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Caller-ID-Number"));
+                       from_name = switch_event_get_header(helper->event, "Caller-Caller-ID-Name");
 
                        if (zstr(from_id)) {
-                               from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Caller-ID-Number"));
+                               from_id = switch_str_nil(switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Number"));
                        }
 
                        if (zstr(from_name)) {
-                               from_name = switch_event_get_header(helper->event, "Caller-Caller-ID-Name");
+                               from_name = switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Name");
                        }
                        
                }
@@ -2583,6 +2583,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                                                }
                                                stream.write_function(&stream, "<target uri=\"sip:**%s@%s\"/>\n", clean_to_user, host);
                                                stream.write_function(&stream, "</remote>\n");
+
                                        } else if (!strcasecmp(proto, "queue")) {
                                                stream.write_function(&stream, "<local>\n<identity display=\"queue\">sip:%s@%s;proto=queue</identity>\n",
                                                                                          !zstr(clean_to_user) ? clean_to_user : "unknown", host);