Asterisk dial plan to move calls to other servers

Hi folks
i want to make static dial plan in a case some call a number ,i want asterisk to send the call to remote server in the way of 100@1.1.1.1 as an example .

as example if i dial 200 , i want the call go to other server to the uri 100@1.1.1.1

i tried below :
[xp90]
exten => _X.,1,NoOp(“The Context is :” ${CONTEXT} “and destination is”${EXTEN})
same => n,Dial(SIP/100@10.40.50.251,30)
same => n,Hangup()

here is a test

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [222@xp90:1] NoOp(“SIP/00000-0001e9e8”, "“The Context is :” xp90 “and destination is"222”) in new stack
– Executing [222@xp90:2] Dial(“SIP/00000-0001e9e8”, “SIP/100@10.40.50.251,30”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/100@10.40.50.251
[2017-05-19 23:04:16] NOTICE[5622][C-0004b16f]: chan_sip.c:23281 handle_response_invite: Failed to authenticate on INVITE to ‘sip:00000@10.40.50.254;tag=as4de5a082’
– SIP/10.40.50.251-0001e9e9 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [222@xp90:3] Hangup(“SIP/00000-0001e9e8”, “”) in new stack
== Spawn extension (xp90, 222, 3) exited non-zero on ‘SIP/00000-0001e9e8’

the other side will be allowing all incoming request from the sender ip

hope to help
cheers

10.40.50.251 should be 1.1.1.1, if your specification is correct.

10.40.50.251 wants you to provide a password, which you can either do in the dial string, or in a sip.conf entry that you use instead of the IP address.

Note this requirement is the standard outgoing call through ITSP scenario, so should be trivial.

1 Like