[asterisk-commits] tzafrir: branch tzafrir/monitor-rtp-14 r213898 - /team/tzafrir/monitor-rtp-14...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 24 19:20:43 CDT 2009
Author: tzafrir
Date: Mon Aug 24 19:20:40 2009
New Revision: 213898
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=213898
Log:
set RTP_PORT_OFFSET in chan_dahdi
RTP_PORT_OFFSET is used to "manually" allocate RTP port numbers by the
recording channels. This code sets a sane value for that variable
automatically in chan_dahdi.c .
Modified:
team/tzafrir/monitor-rtp-14/channels/chan_dahdi.c
Modified: team/tzafrir/monitor-rtp-14/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp-14/channels/chan_dahdi.c?view=diff&rev=213898&r1=213897&r2=213898
==============================================================================
--- team/tzafrir/monitor-rtp-14/channels/chan_dahdi.c (original)
+++ team/tzafrir/monitor-rtp-14/channels/chan_dahdi.c Mon Aug 24 19:20:40 2009
@@ -5650,6 +5650,7 @@
int x,y;
int features;
char *b2 = NULL;
+ struct ast_variable *v;
struct dahdi_params ps;
char chanprefix[*dahdi_chan_name_len + 4];
@@ -5820,6 +5821,16 @@
dahdi_confmute(i, 0);
/* Configure the new channel jb */
ast_jb_configure(tmp, &global_jbconf);
+ for (v = i->vars ; v ; v = v->next) {
+ ast_log(LOG_DEBUG, "setvar: '%s' => '%s'\n", v->name, v->value);
+ pbx_builtin_setvar_helper(tmp, v->name, v->value);
+ }
+ {
+ char port_offset[BUFSIZ];
+
+ snprintf(port_offset, sizeof(port_offset), "%d", GET_CHANNEL(i));
+ pbx_builtin_setvar_helper(tmp, "RTP_PORT_OFFSET", port_offset);
+ }
if (startpbx) {
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
More information about the asterisk-commits
mailing list