[svn-commits] oej: branch oej/originate-media-settings r116219 - in /team/oej/originate-med...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed May 14 06:11:26 CDT 2008
Author: oej
Date: Wed May 14 06:11:24 2008
New Revision: 116219
URL: http://svn.digium.com/view/asterisk?view=rev&rev=116219
Log:
Add codecs to call file
Modified:
team/oej/originate-media-settings/pbx/pbx_spool.c
team/oej/originate-media-settings/sample.call
Modified: team/oej/originate-media-settings/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/team/oej/originate-media-settings/pbx/pbx_spool.c?view=diff&rev=116219&r1=116218&r2=116219
==============================================================================
--- team/oej/originate-media-settings/pbx/pbx_spool.c (original)
+++ team/oej/originate-media-settings/pbx/pbx_spool.c Wed May 14 06:11:24 2008
@@ -66,6 +66,7 @@
int retrytime; /*!< How long to wait between retries (in seconds) */
int waittime; /*!< How long to wait for an answer */
long callingpid; /*!< PID which is currently calling */
+ int format; /*!< Formats (codecs) for this call */
char tech[256]; /*!< Which channel driver to use for outgoing call */
char dest[256]; /*!< Which device/line to use for outgoing call */
@@ -94,6 +95,7 @@
o->priority = 1;
o->retrytime = 300;
o->waittime = 45;
+ o->format = AST_FORMAT_SLINEAR;
ast_set_flag(&o->options, SPOOL_FLAG_ALWAYS_DELETE);
}
@@ -165,6 +167,8 @@
ast_log(LOG_WARNING, "Invalid max retries at line %d of %s\n", lineno, fn);
o->maxretries = 0;
}
+ } else if (!strcasecmp(buf, "codecs")) {
+ ast_parse_allow_disallow(NULL, &o->format, c, 1);
} else if (!strcasecmp(buf, "context")) {
ast_copy_string(o->context, c, sizeof(o->context));
} else if (!strcasecmp(buf, "extension")) {
@@ -310,10 +314,10 @@
int res, reason;
if (!ast_strlen_zero(o->app)) {
ast_verb(3, "Attempting call on %s/%s for application %s(%s) (Retry %d)\n", o->tech, o->dest, o->app, o->data, o->retries);
- res = ast_pbx_outgoing_app(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->app, o->data, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
+ res = ast_pbx_outgoing_app(o->tech, o->format, o->dest, o->waittime * 1000, o->app, o->data, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
} else {
ast_verb(3, "Attempting call on %s/%s for %s@%s:%d (Retry %d)\n", o->tech, o->dest, o->exten, o->context,o->priority, o->retries);
- res = ast_pbx_outgoing_exten(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
+ res = ast_pbx_outgoing_exten(o->tech, o->format, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
}
if (res) {
ast_log(LOG_NOTICE, "Call failed to go through, reason (%d) %s\n", reason, ast_channel_reason2str(reason));
Modified: team/oej/originate-media-settings/sample.call
URL: http://svn.digium.com/view/asterisk/team/oej/originate-media-settings/sample.call?view=diff&rev=116219&r1=116218&r2=116219
==============================================================================
--- team/oej/originate-media-settings/sample.call (original)
+++ team/oej/originate-media-settings/sample.call Wed May 14 06:11:24 2008
@@ -13,6 +13,9 @@
# would for the "Dial" application. Only one channel name is permitted.
#
Channel: Zap/1
+#
+# You can specify codecs for the call
+Codecs: alaw, speex, h264
#
# You may also specify a wait time (default is 45 seconds) for how long to
# wait for the channel to be answered, a retry time (default is 5 mins)
More information about the svn-commits
mailing list