diff options
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b1caa1f05..44077ab71 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -23261,12 +23261,16 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest } p->authtries = 0; if (find_sdp(req)) { - if ((res = process_sdp(p, req, SDP_T38_ACCEPT)) && !req->ignore) + if ((res = process_sdp(p, req, SDP_T38_ACCEPT)) && !req->ignore) { if (!reinvite) { /* This 200 OK's SDP is not acceptable, so we need to ack, then hangup */ /* For re-invites, we try to recover */ ast_set_flag(&p->flags[0], SIP_PENDINGBYE); + ast_channel_hangupcause_set(p->owner, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL); + p->hangupcause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL; + sip_queue_hangup_cause(p, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL); } + } ast_rtp_instance_activate(p->rtp); } else if (!reinvite) { struct ast_sockaddr remote_address = {{0,}}; @@ -23336,7 +23340,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest } if (!req->ignore && p->owner) { - if (!reinvite) { + if (!reinvite && !res) { ast_queue_control(p->owner, AST_CONTROL_ANSWER); } else { /* RE-invite */ if (p->t38.state == T38_DISABLED || p->t38.state == T38_REJECTED) { |