[asterisk-bugs] [JIRA] (ASTERISK-26396) chan_pjsip: HANGUPCAUSE return the wrong code when dialed channel answer.
Kevin Harwell (JIRA)
noreply at issues.asterisk.org
Thu Sep 28 15:41:08 CDT 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-26396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Harwell updated ASTERISK-26396:
-------------------------------------
Target Release Version/s: 13.12.0
14.1.0
> chan_pjsip: HANGUPCAUSE return the wrong code when dialed channel answer.
> -------------------------------------------------------------------------
>
> Key: ASTERISK-26396
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26396
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_pjsip
> Affects Versions: 13.8.0
> Environment: CentOS6.5 X64
> Reporter: Aaron An
> Severity: Minor
> Target Release: 13.12.0, 14.1.0
>
>
> A dials into asterisk and runs dialplan. The dialplan execute Dial() to dial B, and B answer the call, but after that, NoOp($\{ $\{HANGUPCAUSE($\{CHANNEL_B},tech)}) on A channel shows the result of "SIP 183 Session Progress". it should be "SIP 200 Ok".
> look at the source code channels/chan_pjsip.c function chan_pjsip_incoming_response(). In this function first call ast_queue_control(session->channel, AST_CONTROL_ANSWER) and then call ast_queue_control_data(session->channel, AST_CONTROL_PVT_CAUSE_CODE, cause_code, data_size).
> look at the source code apps/app_dial.c function wait_for_answer. In this funciton if frame (frame_type=AST_FRAME_CONTROL && subclass=AST_CONTROL_ANSWER) first comes, the line
> while ((*to = ast_remaining_ms(start, orig)) && !peer) \{
> will terminate the while and there is no chance to execute the below code
> case AST_CONTROL_PVT_CAUSE_CODE:
> ast_indicate_data(in, AST_CONTROL_PVT_CAUSE_CODE, f->data.ptr, f->datalen);
> I think it shoud revert the call sequence of "ast_queue_control" and "ast_queue_control_data" in function chan_pjsip_incoming_response() of channels/chan_pjsip.c.
> Is it ok? if so I can post a patch to gerrit.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list