mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
chan_sip: Do not increment the SDP version between 183 and 200 responses.
Bumping the SDP version number can cause interoperability problems since receivers of the responses will expect that a 200 SDP will be identical to a previous 183 SDP. (closes issue ASTERISK-21204) reported by NITESH BANSAL Patches: dont-increment-session-version-in-2xx-after-183.patch uploaded by NITESH BANSAL (License #6418) ........ Merged revisions 400906 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 400908 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400910 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -7417,6 +7417,7 @@ static int sip_answer(struct ast_channel *ast)
|
|||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
struct sip_pvt *p = ast_channel_tech_pvt(ast);
|
struct sip_pvt *p = ast_channel_tech_pvt(ast);
|
||||||
|
int oldsdp = FALSE;
|
||||||
|
|
||||||
if (!p) {
|
if (!p) {
|
||||||
ast_debug(1, "Asked to answer channel %s without tech pvt; ignoring\n",
|
ast_debug(1, "Asked to answer channel %s without tech pvt; ignoring\n",
|
||||||
@@ -7427,10 +7428,14 @@ static int sip_answer(struct ast_channel *ast)
|
|||||||
if (ast_channel_state(ast) != AST_STATE_UP) {
|
if (ast_channel_state(ast) != AST_STATE_UP) {
|
||||||
try_suggested_sip_codec(p);
|
try_suggested_sip_codec(p);
|
||||||
|
|
||||||
|
if (ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT)) {
|
||||||
|
oldsdp = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
ast_setstate(ast, AST_STATE_UP);
|
ast_setstate(ast, AST_STATE_UP);
|
||||||
ast_debug(1, "SIP answering channel: %s\n", ast_channel_name(ast));
|
ast_debug(1, "SIP answering channel: %s\n", ast_channel_name(ast));
|
||||||
ast_rtp_instance_update_source(p->rtp);
|
ast_rtp_instance_update_source(p->rtp);
|
||||||
res = transmit_response_with_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL, FALSE, TRUE);
|
res = transmit_response_with_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL, oldsdp, TRUE);
|
||||||
ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
|
ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
|
||||||
}
|
}
|
||||||
sip_pvt_unlock(p);
|
sip_pvt_unlock(p);
|
||||||
|
Reference in New Issue
Block a user