aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-31 21:58:26 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-31 21:58:26 +0000
commit85b4942553deee4b864bbb2fd206b72eccf5480b (patch)
treeb2c3e813c1260fd0eb60b1a12ccc5e2518c3ebec /pbx
parent9afaadfdb0107999cd3ae91272fb5ac102c01aa3 (diff)
Merged revisions 134980 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r134980 | tilghman | 2008-07-31 16:55:42 -0500 (Thu, 31 Jul 2008) | 16 lines Blocked revisions 134976 via svnmerge ........ r134976 | tilghman | 2008-07-31 16:53:19 -0500 (Thu, 31 Jul 2008) | 9 lines Specify codecs in callfiles and manager, to allow video calls to be set up from callfiles and AMI. (closes issue #9531) Reported by: Geisj Patches: 20080715__bug9531__1.4.diff.txt uploaded by Corydon76 (license 14) 20080715__bug9531__1.6.0.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@134981 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_spool.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index daaa8b526..f265d7569 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -71,6 +71,8 @@ struct outgoing {
int waittime;
/*! PID which is currently calling */
long callingpid;
+ /*! Formats (codecs) for this call */
+ int format;
/*! What to connect to outgoing */
char tech[256];
@@ -107,6 +109,7 @@ static void init_outgoing(struct outgoing *o)
o->priority = 1;
o->retrytime = 300;
o->waittime = 45;
+ o->format = AST_FORMAT_SLINEAR;
ast_set_flag(&o->options, SPOOL_FLAG_ALWAYS_DELETE);
}
@@ -182,6 +185,8 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
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")) {
@@ -332,10 +337,10 @@ static void *attempt_thread(void *data)
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));