[asterisk-users] How to use 'Transfer' to send calls to another asterisk?

Deepesh D deep.d2010 at gmail.com
Wed Oct 10 07:09:21 CDT 2012


Hello,

How do I use the asterisk application 'Transfer' to transfer a SIP
call from one asterisk to another?

I have the following scenario.
I have two asterisk servers S1 and S2. There is a third asterisk
server C1 which registers as a peer to S1. From C1, I dial into S1
using 'Dial' command. What I want to do is, use the Transfer command
in S1 and transfer the call to S2.

Dialplan on S1
[test_context]
exten => _X.,1,Transfer(SIP/${EXTEN}@IP_of_S2)
exten => _X.,n,NoOp(${TRANSFERSTATUS})
exten => _X.,n,Hangup

Dialplan on S2
[default]
exten => _X.,1,Playback(somemsg)
exten => _X.,n,Hangup

[test_context]
exten => _X.,1,Answer
exten => _X.,n,Playback(msg)
exten => _X.,n,Hangup

The context for the SIP peer C1 is defined as 'test_context' in S1 and S2.

In C1, I have set 'promiscredir = yes' in sip.conf.

When I dial from C1, the call is successfully transferred to S1 (I get
TRANSFERSTATUS as SUCCESS and I can see C1 trying to send the call to
S2). But the call does not get authenticated on S2 and goes into
default context instead of 'test_context'. How can I transfer the call
such that S2 authenticates the call and sends it to the required
context?

Thanks



More information about the asterisk-users mailing list