From: Damien Wedhorn Date: Sat, 7 Aug 2010 22:07:43 +0000 (+0000) Subject: Start rtp on answer before the answer is queued X-Git-Tag: 11.0.0-beta1~2492 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcb865f68af2b4eb2b7ab2be80d20ea734c11d97;p=thirdparty%2Fasterisk.git Start rtp on answer before the answer is queued (closes issue #17770) Reported by: salecha Patches: skinny.answercrash.diff uploaded by wedhorn (license 30) Tested by: salecha Review: NA git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@281226 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 435dccf9bc..3f8d66388c 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -5225,7 +5225,6 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession if (sub && sub->outgoing) { /* We're answering a ringing call */ - ast_queue_control(sub->owner, AST_CONTROL_ANSWER); transmit_callstate(d, l->instance, sub->callid, SKINNY_OFFHOOK); transmit_activatecallplane(d, l); transmit_stop_tone(d, l->instance, sub->callid); @@ -5233,6 +5232,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession transmit_displaypromptstatus(d, "Connected", 0, l->instance, sub->callid); transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_CONNECTED); start_rtp(sub); + ast_queue_control(sub->owner, AST_CONTROL_ANSWER); ast_setstate(sub->owner, AST_STATE_UP); } else { if (sub && sub->owner) { @@ -5327,13 +5327,13 @@ static int handle_offhook_message(struct skinny_req *req, struct skinnysession * if (sub && sub->outgoing) { /* We're answering a ringing call */ - ast_queue_control(sub->owner, AST_CONTROL_ANSWER); transmit_callstate(d, l->instance, sub->callid, SKINNY_OFFHOOK); transmit_activatecallplane(d, l); transmit_stop_tone(d, l->instance, sub->callid); transmit_callstate(d, sub->parent->instance, sub->callid, SKINNY_CONNECTED); transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_CONNECTED); start_rtp(sub); + ast_queue_control(sub->owner, AST_CONTROL_ANSWER); ast_setstate(sub->owner, AST_STATE_UP); } else { if (sub && sub->owner) { @@ -6050,13 +6050,13 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse if (sub && sub->outgoing) { /* We're answering a ringing call */ - ast_queue_control(sub->owner, AST_CONTROL_ANSWER); transmit_callstate(d, l->instance, sub->callid, SKINNY_OFFHOOK); transmit_activatecallplane(d, l); transmit_stop_tone(d, l->instance, sub->callid); transmit_callstate(d, sub->parent->instance, sub->callid, SKINNY_CONNECTED); transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_CONNECTED); start_rtp(sub); + ast_queue_control(sub->owner, AST_CONTROL_ANSWER); ast_setstate(sub->owner, AST_STATE_UP); } break;