]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
set channel vars for rate, carrier, and codec for each route
authorRupa Schomaker <rupa@rupa.com>
Thu, 2 Apr 2009 12:32:18 +0000 (12:32 +0000)
committerRupa Schomaker <rupa@rupa.com>
Thu, 2 Apr 2009 12:32:18 +0000 (12:32 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12882 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_lcr/mod_lcr.c

index b83ed6279525433173c42f54b175167c0253c961..3fd302ca5611cf68cbd1f516fc06b84bc331afa1 100644 (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;