]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 8 May 2007 20:17:27 +0000 (20:17 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 8 May 2007 20:17:27 +0000 (20:17 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5107 d0543943-73ff-0310-b7d9-9358b9ac24b2

conf/sofia.conf.xml
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index 2db55119183ac4dfec41d7d450c32912f97cfe81..22c55188ba8e333050cade0c4fa21348b7697645 100644 (file)
@@ -44,6 +44,8 @@
        <param name="rtp-timer-name" value="soft"/>
        <param name="rtp-ip" value="$${bind_server_ip}"/>
        <param name="sip-ip" value="$${bind_server_ip}"/>
+       <!-- if you want to send any special bind params of your own -->
+       <!--<param name="bind-params" value="transport=udp"/>-->
 
        <!--If you don't want to pass through timestampes from 1 RTP call to another (on a per call basis with rtp_rewrite_timestamps chanvar)-->
        <!--<param name="rtp-rewrite-timestampes" value="true"/>-->
index 854dddaeedbecbf150765c9b17ec606446ee2b6d..b26d8654d6e558c31840041e875ba23acf22add7 100644 (file)
@@ -214,6 +214,7 @@ struct sofia_profile {
        char *sipdomain;
        char *timer_name;
        char *hold_music;
+       char *bind_params;
        int sip_port;
        char *codec_string;
        int running;
index ac5918d1bab2db06059c0216b4f7a63146d7567e..67df402ef3ba9ba3dfc6e331bfb8ba799d9267f7 100644 (file)
@@ -748,6 +748,8 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                                        }
                                                }
 
+                                       } else if (!strcasecmp(var, "bind-params")) {
+                                               profile->bind_params = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "sip-domain")) {
                                                profile->sipdomain = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "rtp-timer-name")) {
@@ -870,6 +872,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                        profile->url = switch_core_sprintf(profile->pool, "sip:mod_sofia@%s:%d", profile->sipip, profile->sip_port);
                                        profile->bindurl = profile->url;
                                }
+
+                               if (profile->bind_params) {
+                                       char *url = profile->bindurl;
+                                       profile->bindurl = switch_core_sprintf(profile->pool, "%s;%s", url, profile->bind_params);
+                               }
+                               
                        }
                        if (profile) {
                                switch_xml_t aliases_tag, alias_tag;