Transfer Call to another pbx

Hi,
I have two Asterisk and have sip trunk between them.
I want to Transfer a call from Asterisk A to Asterisk B.
I know that I can do it with Dial cmd but it keep channel in server A,
I want to transfer (not dial) the call to server B and release the channel in server A.

is it possible? and if possible how?

please help me,

best regards,
Mohsen

Dial will release the speech path, as long as you allow direct media and don’t do anything that requires Asterisk to see the media (e.g. look for DTMF signals).

Transfer, which takes an address in SIP URI format, with sip: replaced by SIP/ will release both the signalling and media paths. Note that this code is little used and is likely to be flakey, particularly for failed calls. Also rather different mechanisms are used depending on whether or not the call has been answered, and the source system may not support both.

ITSPs will only rarely support direct media, and you will need public addresses for both systems. Most ITSPs will not support Transfer, and if they do, will charge it as though there were a new outgoing call through them, whilst the incoming call continues to be charged.

thanks david for your full of information answer.

I just have two asterisk server near each other in the LAN.

I just dial with my sip extension in asterisk A and want to transfer it to asterisk B.

if I use: Transfer(SIP/100@asteriskB) in my dial plan, nothing comes in asterisk B it just go to outgoing context in asterisk A.

but if use: Dial(SIP/100@asteriskB) calls go asterisk B.

I’m assuming that AsteriskB is the actual domain, not just a sip.conf section name, as Transfer will not use the latter.

I’d say that was a problem with the phone configuration. Maybe it doesn’t understand how to redirect to a full URI, or maybe you have configured it to use a proxy.

no asterisk B is just sip.conf section name,
I change it to its IP address and now working :smile:

thank you david you are the best

A post was split to a new topic: Transferring call to elsewhere