aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-16 22:44:31 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-16 22:44:31 +0000
commit5935500e1cf7b710fc955a7e29a8ae08ef229ec3 (patch)
treeb8c54a7f320ba2fdb37bd651466ecbbe6c151f65 /apps
parent8553964b5586a69d020be7c338d210b882b9756c (diff)
Merged revisions 150257 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r150257 | mmichelson | 2008-10-16 17:44:05 -0500 (Thu, 16 Oct 2008) | 9 lines Answer the channel prior to checking for the 'a' option in app_sms. (closes issue #13675) Reported by: alecdavis Patches: app_sms.bug13675.148985.diff.txt uploaded by alecdavis (license 585) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@150258 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_sms.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_sms.c b/apps/app_sms.c
index d32491a2d..0a20c8b23 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -1958,6 +1958,10 @@ static int sms_exec(struct ast_channel *chan, void *data)
res = h.err;
goto done;
}
+
+ if (chan->_state != AST_STATE_UP) { /* make sure channel is answered before any TX */
+ ast_answer(chan);
+ }
if (ast_test_flag(&flags, OPTION_ANSWER)) {
h.framenumber = 1; /* Proto 2 */
@@ -1972,10 +1976,6 @@ static int sms_exec(struct ast_channel *chan, void *data)
sms_messagetx(&h);
}
- if (chan->_state != AST_STATE_UP) {
- ast_answer(chan);
- }
-
res = ast_set_write_format(chan, __OUT_FMT);
if (res >= 0) {
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);