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
This commit is contained in:
Rupa Schomaker 2009-04-02 12:32:18 +00:00
parent 33e5985835
commit 32a762641e
1 changed files with 8 additions and 1 deletions

View File

@ -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;