[Freeswitch-svn] [commit] r12882 - freeswitch/trunk/src/mod/applications/mod_lcr

FreeSWITCH SVN rupa at freeswitch.org
Thu Apr 2 05:32:18 PDT 2009


Author: rupa
Date: Thu Apr  2 07:32:18 2009
New Revision: 12882

Log:
set channel vars for rate, carrier, and codec for each route


Modified:
   freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c

Modified: freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c	Thu Apr  2 07:32:18 2009
@@ -1070,8 +1070,15 @@
 		}
 		if (lcr_do_lookup(&routes) == SWITCH_STATUS_SUCCESS) {
 			for (cur_route = routes.head; cur_route; cur_route = cur_route->next) {
-				switch_snprintf(vbuf, sizeof(vbuf), "lcr_route_%d", cnt++);
+				switch_snprintf(vbuf, sizeof(vbuf), "lcr_route_%d", cnt);
 				switch_channel_set_variable(channel, vbuf, cur_route->dialstring);
+				switch_snprintf(vbuf, sizeof(vbuf), "lcr_rate_%d", cnt);
+				switch_channel_set_variable(channel, vbuf, cur_route->rate_str);
+				switch_snprintf(vbuf, sizeof(vbuf), "lcr_carrier_%d", cnt);
+				switch_channel_set_variable(channel, vbuf, cur_route->carrier_name);
+				switch_snprintf(vbuf, sizeof(vbuf), "lcr_codec_%d", cnt);
+				switch_channel_set_variable(channel, vbuf, cur_route->codec);
+				cnt++;
 				switch_snprintf(rbp, rbl, "%s|", cur_route->dialstring);
 				last_delim = end_of_p(rbp);
 				l = strlen(cur_route->dialstring) + 1;



More information about the Freeswitch-svn mailing list