[asterisk-bugs] [JIRA] (ASTERISK-22932) [patch] - SIP Channel fails to parse refer_to_domain
Sean Bright (JIRA)
noreply at issues.asterisk.org
Wed Dec 13 08:52:08 CST 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-22932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Bright updated ASTERISK-22932:
-----------------------------------
Labels: chan-sip-message-parsing (was: )
> [patch] - SIP Channel fails to parse refer_to_domain
> ----------------------------------------------------
>
> Key: ASTERISK-22932
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-22932
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/Transfers
> Affects Versions: 11.6.0
> Reporter: Jan Gaida
> Labels: chan-sip-message-parsing
> Attachments: chan_sip_refer_to_domain.diff
>
>
> The scenario is an attended transfer to a remote domain.
> The short description:
> When Asterisk receives a REFER message with a refer-to header that contains "?replaces=" query, in chan_sip's function "get_refer_info" the domain is extracted with the query-part. That leads to an error (no such host) when trying to send the INVITE to this domain.
> The solution is to remove the query part ('?') in the get_refer_info function (see attached diff file).
> ---
> The following is a description of the events like a SIP trace; with A being transferor, B transferee (Asterisk) and C the transfer-target.
> Two calls are established: call1 between B and A, and call2 between A and C.
> When starting the transfer, the transferor A sends a REFER to Asterisk (B):
> * A -> REFER ({{Refer-to: <sip:C at domain?replaces=call2>}}) -> B
> * B -> 202 Accepted -> A
> * B -> Notify sipfrag 200 ok -> A
> * A -> 200 ok -> B
> Now, there should be an outgoing INIVTE with Replaces header:
> * B -> INVITE (Replaces: call2) > C
> But this INVITE never is send.
> In Asterisk's traces you see the following:
> * chan_sip.c: Attended transfer: Will use Replace-Call-ID : call2 (No check of from/to tags)
> * chan_sip.c: SIP transfer to extension C at internal by A at domain
> * chan_sip.c: This SIP transfer is to a remote SIP extension (remote domain domain?Replaces=call2)
> Here you can see the error ^^^^. The remote domain still contains the query part (?Replaces) of the uri.
> The traces then continue:
> chan_sip.c: SIP attended transfer: Still not our call - generating INVITE with replaces
> Then it enters the dialplan where it is redirected with a Dial command:
> logger.c: -- Executing [s at callreferred:4] Dial("SIP/domain-09a40b60", "SIP/C at domain?Replaces=call2|60|") in new stack
> And finally the error:
> {noformat}
> WARNING[32395] chan_sip.c: No such host: domain?Replaces=call2
> DEBUG[32395] chan_sip.c: Cant create SIP call - target device not registered
> {noformat}
> ---
> With the attached patch, Asterisk behaves as expected.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list