# SIP REFER issue

**URL:** <https://community.asterisk.org/t/sip-refer-issue/35541>\
**Category:** Asterisk Support\
**Created:** [June 9, 2011, 6:57pm UTC](https://community.asterisk.org/t/sip-refer-issue/35541 "2011-06-09T18:57:31Z")\
**Posts on this page:** 4\
**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:** [June 9, 2011, 6:57pm UTC](https://community.asterisk.org/t/sip-refer-issue/35541/1 "2011-06-09T18:57:31Z")

</div>

Hi folks,

Been working w/ Asterisk for a little while, but never used Transfer() (SIP REFER).

I have a call coming in directly from a VoIP provider. Call terminates on Asterisk box.

Transfer() works fine if I do this (simplified example with key info redacted):

exten =\> 1234,1,Noop(Test of TRANSFER capability)  
exten =\> 1234,n,Wait(1.0)  
exten =\> 1234,n,Transfer([770xxxxxxx@xxx.xxx.xxx.xxx](mailto:770xxxxxxx@xxx.xxx.xxx.xxx))  
exten =\> 1234,n,Noop(TRANSFERSTATUS is ${TRANSFERSTATUS})

I get SUCCESS.

However, if I Answer() the call, I get FAILURE:

exten =\> 1234,1,Noop(Test of TRANSFER capability)  
exten =\> 1234,n,Answer(1000)  
exten =\> 1234,n,Transfer([770xxxxxxx@xxx.xxx.xxx.xxx](mailto:770xxxxxxx@xxx.xxx.xxx.xxx))  
exten =\> 1234,n,Noop(TRANSFERSTATUS is ${TRANSFERSTATUS})

What I need:

Party A calls Asterisk (who is Party B in this example)  
Party B answers and some things get done, interacts with Party A, etc.  
Party B wants to push the call back into the cloud to Party C and initiates a Transfer()

Any help woiuld get appreciated.

---

<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:** [June 9, 2011, 9:46pm UTC](https://community.asterisk.org/t/sip-refer-issue/35541/2 "2011-06-09T21:46:09Z")

</div>

Asterisk version is critical here. In 1.4 and at least some 1.6, REFER transfers are pretty broken, especially when the transfer fails.

You definitely need to take a SIP trace here.

I think Transfer is very little used.

---

<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:** [June 10, 2011, 5:47pm UTC](https://community.asterisk.org/t/sip-refer-issue/35541/3 "2011-06-10T17:47:50Z")

</div>

Asterisk version 1.8.0

The trace shows Method Not Allowed.

So how do people avoid hairpins within their switch if one can’t perform a SIP REFER to push a call back into the cloud and to a new destination? Seems like a blind transfer would be something people would use often and would be a strong selling point for VoIP.

---

<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:** [June 10, 2011, 6:33pm UTC](https://community.asterisk.org/t/sip-refer-issue/35541/4 "2011-06-10T18:33:32Z")

</div>

Using external media (canreinvite = yes, or more recently, directmedia = yes) gives most of the advantages.

If you are getting Method Not Allowed, this is a commercial decision by you service provider, not a limitation of Asterisk. Most providers will charge you as though the call hairpinned, if they did allow redirects.
