From 32a762641e1f6418d904d95a6d49f8c5dbbd1d1f Mon Sep 17 00:00:00 2001 From: Rupa Schomaker Date: Thu, 2 Apr 2009 12:32:18 +0000 Subject: [PATCH] set channel vars for rate, carrier, and codec for each route git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12882 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_lcr/mod_lcr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_lcr/mod_lcr.c b/src/mod/applications/mod_lcr/mod_lcr.c index b83ed62795..3fd302ca56 100644 --- a/src/mod/applications/mod_lcr/mod_lcr.c +++ b/src/mod/applications/mod_lcr/mod_lcr.c @@ -1070,8 +1070,15 @@ SWITCH_STANDARD_APP(lcr_app_function) } 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;