Attended call transfer (outside)

Hello
I have the follow issue, I’m using Asterisk with 1 Astra (user A ) phone and connected to a SIP proxy with another 2 (user B and C ) sip phones

The scenario that I’m trying to solve is
userB call to userA
userB perform an attended transfer to userC

UserB use the REFER method with Replaces headers and send it to userA, when this message goes to Asterisk it response with a 481 Transaction Leg doesn’t exist. This call-ID doesn’t exist in asterisk, but Asterisk should generate a INVITE message using the REFER-TO header and send it to the userC.

Somebody know why is it not working ?

If I perform an unattendad transfer, it works. Using REFER method but without Replaces header.

I’m using Asterisk 1.4.33

Here is the REFER message and this response

<— SIP read from 173.32.210.20:12453 —>
REFER sip:200@173.32.210.17:5060 SIP/2.0
Record-Route: sip:173.32.210.20:5060;lr;transport=udp
Via: SIP/2.0/UDP 173.32.210.20:5060;branch=z9hG4bK6068398ad6dbc0
From: "101"sip:101@sa0.mot.com;tag=82cb19
Call-ID: 8571673173.32.210.45
Contact: sip:101@173.32.210.45:5061
Content-Length: 0
Refer-To: sip:102@sa0wsn1.sa0.mot.com:5060;transport=udp?Replaces=8585700173.32.210.45%3Bto-tag%3D5bdeaba%3Bfrom-tag%3D8301e4
CSeq: 3 REFER
To: sip:200@sa0.mot.com:5060;tag=as4938c6e9
Via: SIP/2.0/TLS 173.32.210.45:5061;branch=z9hG4bK0d8060e3fcfa3b;alias
Max-Forwards: 69
pPBX-Request: None
Referred-By: sip:101@sa0.mot.com

<------------->
— (15 headers 0 lines) —
Call 8571673173.32.210.45 got a SIP call transfer from caller: (REFER)!
SIP transfer to extension 102@default by 101@sa0.mot.com

<— Transmitting (no NAT) to 173.32.210.20:5060 —>
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 173.32.210.20:5060;branch=z9hG4bK6068398ad6dbc0;received=173.32.210.20
Via: SIP/2.0/TLS 173.32.210.45:5061;branch=z9hG4bK0d8060e3fcfa3b;alias
Record-Route: sip:173.32.210.20:5060;lr;transport=udp
From: "101"sip:101@sa0.mot.com;tag=82cb19
To: sip:200@sa0.mot.com:5060;tag=as4938c6e9
Call-ID: 8571673173.32.210.45
CSeq: 3 REFER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact: sip:200@173.32.210.17
Content-Length: 0

<------------>
set_destination: Parsing sip:173.32.210.20:5060;lr;transport=udp for address/port to send to
set_destination: set destination to 173.32.210.20, port 5060
Reliably Transmitting (no NAT) to 173.32.210.20:5060:
NOTIFY sip:101@173.32.210.45:5061 SIP/2.0
Via: SIP/2.0/UDP 173.32.210.17:5060;branch=z9hG4bK650b61a3;rport
Route: sip:173.32.210.20:5060;lr;transport=udp
From: sip:200@sa0.mot.com:5060;tag=as4938c6e9
To: "101"sip:101@sa0.mot.com;tag=82cb19
Contact: sip:200@173.32.210.17
Call-ID: 8571673173.32.210.45
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Max-Forwards: 70
Event: refer;id=3
Subscription-state: terminated;reason=noresource
Content-Type: message/sipfrag;version=2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 49

SIP/2.0 481 Call leg/transaction does not exist

Refer replaces does work with Asterisk as UAS, at least for currently supported versions, of which 1.4.33 is one.

Asterisk is a back to back user agent, not a proxy, so it will not generate a physical invite/replaces, but rather will trigger an internal reconfiguration of the call connections within itself.

I seem to remember a recent bug related to parsing some Refer-To headers/replaces attribute values.

Incidentally, Replaces is an attribute on Refer-To, not a header in its own right, on a REFER.

understand, but why is working a blind transfer ?
it’s the same scenario, the only difference is that the Refer-to header on REFER message doesn’t contain the Replace portion.

As I said, there was a recent issue on issues.asterisk.org about certain formats of Replaces parameter being mis-parsed. You should see if you can find that and whether it applies in your case.

perfect, thank you very much

Hi,

Does anybody know if this problem reported by pbressan in “Wed Jul 14, 2010 2:30 pm” has been corrected in the 1.8.0 version ? I installed this new version and this problem still remains, so I didn’t know if it is my configuration or Asterisk problem…

My scenario is:

Phone PSTN ------ ASTERISK ----------------------VoIP Phone(1)

All SIP messages pass through OPENSIPS. When the Phone PSTN calls to VoIP Phone(1), it is Ok. When VoIP Phone(1) transfers to a VoIP Phone (2), using flash key, there is the problem. Voip Phone(1) sends a REFER to Asterisk, and after an Accept message, Asterisk sends a Notify with “SIP/2.0 481 Call leg/transaction does not exist”. I think this is the same problem reported before…

Thanks!