]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update mod_alsa like mod_portaduio to fill in local ip
authorBrian West <brian@freeswitch.org>
Sun, 2 Dec 2007 03:01:41 +0000 (03:01 +0000)
committerBrian West <brian@freeswitch.org>
Sun, 2 Dec 2007 03:01:41 +0000 (03:01 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6470 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_alsa/mod_alsa.c

index 024866e74b9162b5b286bbe33189182d8688040e..d141d493e578876a976e8186b2a8bcb2a70e69f7 100644 (file)
@@ -1457,6 +1457,8 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
                char *dialplan = globals.dialplan;
                char *cid_name = globals.cid_name;
                char *cid_num = globals.cid_num;
+               char ip[25] = "0.0.0.0";
+
 
                switch_core_session_add_stream(session, NULL);
                if ((tech_pvt = (private_t *) switch_core_session_alloc(session, sizeof(private_t))) != 0) {
@@ -1492,9 +1494,12 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
                        tech_pvt->codec_ms = atoi(argv[5]);
                }
 
+               switch_find_local_ip(ip, sizeof(ip), AF_INET);
+
                if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
                                                                                                                                  NULL,
-                                                                                                                                 dialplan, cid_name, cid_num, NULL, NULL, NULL, NULL, (char *) modname, NULL,
+                                                                                                                                 dialplan, cid_name, cid_num,
+                                                                                                                                 ip, NULL, NULL, NULL, (char *) modname, NULL,
                                                                                                                                  dest)) != 0) {
                        char name[128];
                        snprintf(name, sizeof(name), "Alsa/%s",