[Freeswitch-svn] [commit] r3947 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Thu Jan 11 18:44:18 EST 2007


Author: mikej
Date: Thu Jan 11 18:44:18 2007
New Revision: 3947

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
add max_forwards chanvar, maybe we should put this in caller profile and allways pass it across and decrement it to avoid loops across the switch, at least for protocols that support loop detection.

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Thu Jan 11 18:44:18 2007
@@ -4149,8 +4149,10 @@
     snprintf(uri, sizeof(uri), "%s@%s:%s", req_user, req_host, req_port);
     switch_channel_set_variable(channel, "sip_req_uri", uri);
 
+    snprintf(uri, sizeof(uri), "%u", sip->sip_max_forwards->mf_count);
+    switch_channel_set_variable(channel, "max_forwards", uri);
 
-    if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
+	if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
                                                               (char *) from->a_url->url_user,
                                                               profile->dialplan,
                                                               displayname,



More information about the Freeswitch-svn mailing list