# Attended call transfer (outside)

**URL:** <https://community.asterisk.org/t/attended-call-transfer-outside/31943>\
**Category:** Asterisk Support\
**Created:** [July 14, 2010, 8:30pm UTC](https://community.asterisk.org/t/attended-call-transfer-outside/31943 "2010-07-14T20:30:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 14, 2010, 8:30pm UTC](https://community.asterisk.org/t/attended-call-transfer-outside/31943/1 "2010-07-14T20:30:15Z")

</div>

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](mailto: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](mailto: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

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [July 15, 2010, 9:18am UTC](https://community.asterisk.org/t/attended-call-transfer-outside/31943/2 "2010-07-15T09:18:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 15, 2010, 2:55pm UTC](https://community.asterisk.org/t/attended-call-transfer-outside/31943/3 "2010-07-15T14:55:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [July 15, 2010, 2:59pm UTC](https://community.asterisk.org/t/attended-call-transfer-outside/31943/4 "2010-07-15T14:59:25Z")

</div>

As I said, there was a recent issue on [issues.asterisk.org](http://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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 15, 2010, 3:01pm UTC](https://community.asterisk.org/t/attended-call-transfer-outside/31943/5 "2010-07-15T15:01:59Z")

</div>

perfect, thank you very much

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [November 9, 2010, 3:26pm UTC](https://community.asterisk.org/t/attended-call-transfer-outside/31943/6 "2010-11-09T15:26:55Z")

</div>

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!
