I’m trying to connect Asterisk server to AsteriskNOW server using SIP trunk
Here is the configuration for the Asterisk server [6XXX extensions]** server1**
extension.com
-------------------
[from-internal]
exten => _5XXX,1,NoOP(Call Phone)
exten => _5XXX,n,Dial(SIP/${EXTEN})
exten => _5XXX,n,Hangup()
exten => _6XXX,1,NoOp()
exten => _6XXX,n,Dial(SIP/5001)
exten => _6XXX,n,Hangup()
sip.conf
------------
[5001]
type=friend
context=from-internal
host=dynamic
secret=123456
disallow=all
allow=ulaw
[5002]
type=friend
context=from-internal
host=dynamic
secret=123456
disallow=all
allow=ulaw
[general]
register => server1:pass@server2-ip/server2
[server2]
type=friend
host=server2-ip
secret=123456
context=from-internal
insecure=invite
disallow=all
allow=ulaw
Here is the configuration for the AsteriskNow server [7XXX extensions]** server2**
Trunk
--------
Trunk Name: trunk_to_server1
Trunk Name: trunk_to_server1
PEER Details:
host=server1-ip
username=server1
secret=pass
type=peer
fromuser=server1
USER Context:server2
USER Details:
secret=pass
type=user
context=from-trunk
Outbound Routes
-------------------------
Route Name: server2
Dial Patterns:
()+ +| 5XXX / ]
Trunk Sequance:
0: trunk_to_server1
---------------------------------------------------------------------------------------------------------------
the issue:
when calling from Asterisknow to Asterisk I redirected to public context and get the demo audio
here is the outbut from the Asterisk server
== Using SIP RTP CoS mark 5
-- Executing [s@public:1] wait("SIP/server2-ip-00000017", "1")
-- Executing [s@public:1] answer("SIP/server2-ip-00000017", "")
> 0x1c5e870 -- Probation passed - setting RTP source address to server2-ip:11714
-- Digit timeout set to 5.000
-- Response timeout set to 10.000
-- Executing [s@public:1] background("SIP/server2-ip-00000017", "demo-congrats")
-- <SIP/server2-ip-00000017> Playing 'demo-congrats.ulaw' (language 'en')
== Spawn extension (public, s, 1) exited non-zero on 'SIP/server2-ip-00000017'
I should be redirected to the extension in the Asterisk server, but that is not happening.
Can any one help me to establish a correct SIP trunk between Asterisk and AsteriskNOW.