diff options
author | Mark Michelson <mmichelson@digium.com> | 2015-03-27 20:30:18 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2015-03-27 20:30:18 +0000 |
commit | 85feac857c659c8ddff3af67099f0b0bd34fb2b2 (patch) | |
tree | b825a9916fe72408833484ed5ceb305e1772c2a7 /res/res_pjsip/pjsip_options.c | |
parent | dc2cf21144b81800329bad4596ded07ed0882ed7 (diff) |
Add stateful PJSIP response API call, and use it for out-of-dialog responses.
Asterisk had an issue where retransmissions of MESSAGE requests resulted in
Asterisk processing the retransmission as if it were a new MESSAGE request.
This patch fixes the issue by creating a transaction in PJSIP on the incoming
request. This way, if a retransmission arrives, the PJSIP transaction layer
will resend the response and Asterisk will not ever see the retransmission.
ASTERISK-24920 #close
Reported by Mark Michelson
Review: https://reviewboard.asterisk.org/r/4532/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip/pjsip_options.c')
-rw-r--r-- | res/res_pjsip/pjsip_options.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index 0b14bed92..9794827b5 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -577,7 +577,6 @@ static pj_status_t send_options_response(pjsip_rx_data *rdata, int code) pjsip_transaction *trans = pjsip_rdata_get_tsx(rdata); pjsip_tx_data *tdata; const pjsip_hdr *hdr; - pjsip_response_addr res_addr; pj_status_t status; /* Make the response object */ @@ -611,17 +610,8 @@ static pj_status_t send_options_response(pjsip_rx_data *rdata, int code) } else { struct ast_sip_endpoint *endpoint; - /* Get where to send response. */ - status = pjsip_get_response_addr(tdata->pool, rdata, &res_addr); - if (status != PJ_SUCCESS) { - ast_log(LOG_ERROR, "Unable to get response address (%d)\n", status); - - pjsip_tx_data_dec_ref(tdata); - return status; - } - endpoint = ast_pjsip_rdata_get_endpoint(rdata); - status = ast_sip_send_response(&res_addr, tdata, endpoint); + status = ast_sip_send_stateful_response(rdata, tdata, endpoint); ao2_cleanup(endpoint); } |