HI,
I want to make the call dail 9XXXX then route to outgouing trunk to another IP.
So,in gui ,I create the runk with outgoing setting .
peer detail
host=10.1.1.139
username=
secret=
type=peer
fromdomain=10.1.1.139
allow=alaw&ulaw
qualify=yes
context=outbound-all-routes
IT is no need to register to the external IP 10.1.1.139
in GUI , I add route ,
that mean when I dial 9 , it will use the above trunk …
And in sip.conf
I define the conext of the calling no…
[20001002]
type=peer
host=dynamic
secret=
deny=0.0.0.0/0
permit=10.1.0.0/255.255.0.0
context=outbound-all-routes
insecure=port,invite
fromdomain=10.1.1.139
where 10.1.1.139 is the extenal ip I want to route the call…
But when I make call using 20001002 , the call fail …
in debug I see
<------------->
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: — (13 headers 20 lines) —
[Dec 5 20:14:14] VERBOSE[3404] netsock.c: == Using SIP RTP CoS mark 5
[Dec 5 20:14:14] VERBOSE[3404] netsock.c: == Using SIP VRTP CoS mark 6
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Sending to 10.1.1.110 : 5060 (no NAT)
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Using INVITE request as basis request - 11251
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found peer ‘20001002’ for ‘20001002’ from 10.1.1.110:5060
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP audio format 111
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP audio format 110
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP audio format 3
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP audio format 0
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP audio format 8
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP audio format 112
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP audio format 101
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found audio description format speex for ID 111
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found audio description format speex for ID 110
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found audio description format speex for ID 112
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found audio description format telephone-event for ID 101
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP video format 99
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP video format 97
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found RTP video format 98
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found video description format MP4V-ES for ID 99
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Found video description format H263-1998 for ID 98
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Capabilities: us - 0x1c010e (gsm|ulaw|alaw|g729|h261|h263|h263p), peer - audio=0xa1e (gsm|ulaw|alaw|g726|speex|g726aal2)/video=0x500400 (ilbc|h263p|mpeg4)/text=0x0 (nothing), combined - 0x10000e (gsm|ulaw|alaw|h263p)
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Peer audio RTP is at port 10.1.1.110:7078
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Peer video RTP is at port 10.1.1.110:9078
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Looking for 91111111 in outbound-all-routes (domain 10.1.1.89)
[Dec 5 20:14:14] VERBOSE[3404] chan_sip.c:
<— Reliably Transmitting (no NAT) to 10.1.1.110:5060 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.1.1.110:5060;branch=z9hG4bK12184;received=10.1.1.110;rport=5060
From: sip:[email protected];tag=15105
To: sip:[email protected];tag=as1e5a1f1f
Call-ID: 11251
CSeq: 20 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
I can still see the call only route to 10.1.1.89 that is the local ip of the server only …
Dec 5 20:14:14] VERBOSE[3404] chan_sip.c: Looking for 91111111 in outbound-all-routes (domain 10.1.1.89)
I expect it can try to reach 10.1.1.139
So, what do I need to set if I want to make a outgoing trunk and route by dial prefix 9 only and then go to 10.1.1.139 and no need to reigster …
Please advice …
==========
I also find below debug
[Dec 5 23:44:58] VERBOSE[6913] pbx.c: – Executing [s@macro-dialout-trunk:19] Dial(“SIP/20001002-00000023”, “SIP/trunk_hmp/992222222,300,”) in new stack
[Dec 5 23:44:58] VERBOSE[6913] netsock.c: == Using SIP RTP CoS mark 5
[Dec 5 23:44:58] VERBOSE[6913] netsock.c: == Using SIP VRTP CoS mark 6
[Dec 5 23:44:58] WARNING[6913] chan_sip.c: No such host: trunk_hmp
[Dec 5 23:44:58] VERBOSE[6913] chan_sip.c: Really destroying SIP dialog ‘[email protected]’ Method: INVITE
[Dec 5 23:44:58] WARNING[6913] app_dial.c: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)
[Dec 5 23:44:58] VERBOSE[6913] app_dial.c: == Everyone is busy/congested at this time (1:0/0/1)
[Dec 5 23:44:58] VERBOSE[6913] pbx.c: – Executing [s@macro-dialout-trunk:20] NoOp(“SIP/20001002-00000023”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20”) in new stack
[Dec 5 23:44:58] VERBOSE[6913] pbx.c: – Executing [s@macro-dialout-trunk:21] Goto(“SIP/20001002-00000023”, “s-CHANUNAVAIL,1”) in new stack
The trunk trunk_hmp set to host 10.1.1.139 .The IP is up and can ping to it .
There is nothing send to this IP as this IP open the wireshark …
Why it is still no route to this trunk …
Please advice …