[asterisk-bugs] [JIRA] (ASTERISK-23095) [patch] - SIP Channel fails to parse refer_to_domain
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Fri Jan 3 18:23:04 CST 2014
Rusty Newton created ASTERISK-23095:
---------------------------------------
Summary: [patch] - SIP Channel fails to parse refer_to_domain
Key: ASTERISK-23095
URL: https://issues.asterisk.org/jira/browse/ASTERISK-23095
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Channels/chan_sip/Transfers
Affects Versions: 11.6.0
Reporter: Jan Gaida
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list