Asterisk to Call Manager trunk

Goodmorning, im having a problem configuring a trunk between a FreePBX virtual machine and a Cisco Callmanager cm2800.

The freepbx server has 10.0.0.168 ip address and the call manager has 192.168.0.254.

Here is the trunk configuration.
[CallManager]
host=192.168.0.254
type=friend
port=5060
insecure=port,invite
nat=no
disallow=all
allow=ulaw,alaw
qualify=yes
context=from-internal
dtmf=rfc2833
canreinvite=no

Im using for testing calls the X-lite client and the peer configuration is:

[1000]
deny=
secret=ac49ca0075b346910122e0d19222458f
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=no
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/1000
mailbox=1000@device
permit=0.0.0.0/0.0.0.0
callerid=Pietro <1000>
callcounter=yes
faxdetect=no

Now i think that the problem is in my calling routes/extension because i really don’t understand how to setup them for italian numbers and cell phones.

So if i try to call the 0637725413 (an italian number) i get:

[2013-11-20 09:26:07] VERBOSE[25956][C-00000031] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]:5060’ in 6400 ms (Method: INVITE)
[2013-11-20 09:26:07] VERBOSE[1836][C-00000031] chan_sip.c: Transmitting (no NAT) to 192.168.0.254:5060:
ACK sip:192.168.4.254:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.168:5060;branch=z9hG4bK7b0b14fa
Max-Forwards: 70
From: sip:[email protected];tag=as659037f4
To: sip:[email protected]:5060;tag=57C9D5B4-12F
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-2.11.0beta2(11.2.1)
Content-Length: 0


[2013-11-20 09:26:07] VERBOSE[1836][C-00000031] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]:5060’ in 6400 ms (Method: INVITE)
[2013-11-20 09:26:07] VERBOSE[25956][C-00000031] app_macro.c: == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘SIP/1000-00000050’ in macro ‘dialout-trunk’
[2013-11-20 09:26:07] VERBOSE[25956][C-00000031] pbx.c: == Spawn extension (from-internal, 0637725413, 5) exited non-zero on ‘SIP/1000-00000050’
[2013-11-20 09:26:07] VERBOSE[25956][C-00000031] pbx.c: – Executing [h@from-internal:1] Hangup(“SIP/1000-00000050”, “”) in new stack
[2013-11-20 09:26:07] VERBOSE[25956][C-00000031] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1000-00000050’
[2013-11-20 09:26:14] VERBOSE[1836] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: INVITE

The call works good but the provider voice tells that the number does not exists.

If i try to call a cell phone 3488132608 i get this:

[2013-11-20 09:28:03] VERBOSE[1836] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS
[2013-11-20 09:29:00] VERBOSE[1836][C-00000032] netsock2.c: == Using SIP RTP TOS bits 184
[2013-11-20 09:29:00] VERBOSE[1836][C-00000032] netsock2.c: == Using SIP RTP CoS mark 5
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [3488132608@from-internal:1] Macro(“SIP/1000-00000052”, “user-callerid,LIMIT,”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:1] Set(“SIP/1000-00000052”, “AMPUSER=1000”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:2] GotoIf(“SIP/1000-00000052”, “0?report”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:3] ExecIf(“SIP/1000-00000052”, “1?Set(REALCALLERIDNUM=1000)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:4] Set(“SIP/1000-00000052”, “AMPUSER=1000”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:5] Set(“SIP/1000-00000052”, “AMPUSERCIDNAME=Pietro”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:6] GotoIf(“SIP/1000-00000052”, “0?report”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:7] Set(“SIP/1000-00000052”, “AMPUSERCID=0662290279”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:8] Set(“SIP/1000-00000052”, “__DIAL_OPTIONS=Ttr”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:9] Set(“SIP/1000-00000052”, “CALLERID(all)=“Pietro” <0662290279>”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:10] GotoIf(“SIP/1000-00000052”, “0?limit”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:11] ExecIf(“SIP/1000-00000052”, “1?Set(GROUP(concurrency_limit)=1000)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:12] GotoIf(“SIP/1000-00000052”, “1?continue”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (macro-user-callerid,s,25)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:25] Set(“SIP/1000-00000052”, “CALLERID(number)=0662290279”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:26] Set(“SIP/1000-00000052”, “CALLERID(name)=Pietro”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:27] Set(“SIP/1000-00000052”, “CDR(cnum)=0662290279”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:28] Set(“SIP/1000-00000052”, “CDR(cnam)=Pietro”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-user-callerid:29] Set(“SIP/1000-00000052”, “CHANNEL(language)=en”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [3488132608@from-internal:2] Set(“SIP/1000-00000052”, “MOHCLASS=default”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [3488132608@from-internal:3] Set(“SIP/1000-00000052”, “_NODEST=”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [3488132608@from-internal:4] Gosub(“SIP/1000-00000052”, “sub-record-check,s,1(out,3488132608,)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:1] GotoIf(“SIP/1000-00000052”, “1?check”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (sub-record-check,s,6)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:6] Set(“SIP/1000-00000052”, “__MON_FMT=wav”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:7] GotoIf(“SIP/1000-00000052”, “1?next”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (sub-record-check,s,10)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:10] ExecIf(“SIP/1000-00000052”, “0?Return()”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:11] GotoIf(“SIP/1000-00000052”, “0?out,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:12] Set(“SIP/1000-00000052”, “__REC_STATUS=INITIALIZED”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:13] ExecIf(“SIP/1000-00000052”, “0?Set(__REC_POLICY_MODE=)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:14] Set(“SIP/1000-00000052”, “NOW=1384936140”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:15] Set(“SIP/1000-00000052”, “__DAY=20”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:16] Set(“SIP/1000-00000052”, “__MONTH=11”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:17] Set(“SIP/1000-00000052”, “__YEAR=2013”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:18] Set(“SIP/1000-00000052”, “__TIMESTR=20131120-092900”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:19] Set(“SIP/1000-00000052”, “__FROMEXTEN=1000”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:20] Set(“SIP/1000-00000052”, “__CALLFILENAME=out-3488132608-1000-20131120-092900-1384936140.82”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@sub-record-check:21] Goto(“SIP/1000-00000052”, “out,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (sub-record-check,out,1)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [out@sub-record-check:1] ExecIf(“SIP/1000-00000052”, “1?Set(__REC_POLICY_MODE=dontcare)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [out@sub-record-check:2] GosubIf(“SIP/1000-00000052”, “0?record,1(exten,3488132608,1000)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [out@sub-record-check:3] Return(“SIP/1000-00000052”, “”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [3488132608@from-internal:5] Macro(“SIP/1000-00000052”, “dialout-trunk,2,3488132608,off”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:1] Set(“SIP/1000-00000052”, “DIAL_TRUNK=2”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/1000-00000052”, “0?sub-pincheck,s,1()”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/1000-00000052”, “0?disabletrunk,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:4] Set(“SIP/1000-00000052”, “DIAL_NUMBER=3488132608”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:5] Set(“SIP/1000-00000052”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:6] Set(“SIP/1000-00000052”, “OUTBOUND_GROUP=OUT_2”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/1000-00000052”, “0?nomax”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:8] GotoIf(“SIP/1000-00000052”, “0?chanfull”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/1000-00000052”, “0?skipoutcid”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:10] Set(“SIP/1000-00000052”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:11] Macro(“SIP/1000-00000052”, “outbound-callerid,2”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/1000-00000052”, “0?Set(CALLERPRES()=)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/1000-00000052”, “0?Set(REALCALLERIDNUM=0662290279)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/1000-00000052”, “1?normcid”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (macro-outbound-callerid,s,6)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:6] Set(“SIP/1000-00000052”, “USEROUTCID=”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:7] Set(“SIP/1000-00000052”, “EMERGENCYCID=”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:8] Set(“SIP/1000-00000052”, “TRUNKOUTCID=0662290280”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/1000-00000052”, “1?trunkcid”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (macro-outbound-callerid,s,14)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/1000-00000052”, “1?Set(CALLERID(all)=0662290280)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/1000-00000052”, “0?Set(CALLERID(all)=)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:16] ExecIf(“SIP/1000-00000052”, “0?Set(CALLERID(all)=)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:17] ExecIf(“SIP/1000-00000052”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:18] Set(“SIP/1000-00000052”, “CDR(outbound_cnum)=0662290280”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-outbound-callerid:19] Set(“SIP/1000-00000052”, “CDR(outbound_cnam)=”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/1000-00000052”, “0?sub-flp-2,s,1()”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:13] Set(“SIP/1000-00000052”, “OUTNUM=3488132608”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“SIP/1000-00000052”, “custom=SIP/CallManager”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/1000-00000052”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/1000-00000052”, “0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:17] Macro(“SIP/1000-00000052”, “dialout-trunk-predial-hook,”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/1000-00000052”, “”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/1000-00000052”, “0?bypass,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/1000-00000052”, “1?Set(CONNECTEDLINE(num,i)=3488132608)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/1000-00000052”, “1?Set(CONNECTEDLINE(name,i)=CID:0662290280)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/1000-00000052”, “0?customtrunk”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:22] Dial(“SIP/1000-00000052”, “SIP/CallManager/3488132608,300,Tt”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] netsock2.c: == Using SIP RTP TOS bits 184
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] netsock2.c: == Using SIP RTP CoS mark 5
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Audio is at 16302
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Adding codec 100003 (ulaw) to SDP
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Adding codec 100004 (alaw) to SDP
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.0.254:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.168:5060;branch=z9hG4bK7976124b
Max-Forwards: 70
From: sip:[email protected];tag=as4efe78da
To: sip:[email protected]:5060
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.11.0beta2(11.2.1)
Date: Wed, 20 Nov 2013 08:29:00 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 253

v=0
o=root 877786750 877786750 IN IP4 10.0.0.168
s=Asterisk PBX 11.2.1
c=IN IP4 10.0.0.168
t=0 0
m=audio 16302 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] app_dial.c: – Called SIP/CallManager/3488132608
[2013-11-20 09:29:00] VERBOSE[1836][C-00000032] chan_sip.c: Transmitting (no NAT) to 192.168.0.254:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.168:5060;branch=z9hG4bK7976124b
Max-Forwards: 70
From: sip:[email protected];tag=as4efe78da
To: sip:[email protected]:5060;tag=57CC8C1C-122A
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-2.11.0beta2(11.2.1)
Content-Length: 0


[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Scheduling destruction of SIP dialog ‘[email protected]:5060’ in 6400 ms (Method: INVITE)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] app_dial.c: == Everyone is busy/congested at this time (1:0/0/1)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:23] NoOp(“SIP/1000-00000052”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s@macro-dialout-trunk:24] GotoIf(“SIP/1000-00000052”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“SIP/1000-00000052”, “RC=1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“SIP/1000-00000052”, “1,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (macro-dialout-trunk,1,1)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [1@macro-dialout-trunk:1] Goto(“SIP/1000-00000052”, “continue,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (macro-dialout-trunk,continue,1)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [continue@macro-dialout-trunk:1] NoOp(“SIP/1000-00000052”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 1 - failing through to other trunks”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [continue@macro-dialout-trunk:2] Set(“SIP/1000-00000052”, “CALLERID(number)=1000”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [3488132608@from-internal:6] Goto(“SIP/1000-00000052”, “ext-trunk,2,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (ext-trunk,2,1)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [2@ext-trunk:1] Set(“SIP/1000-00000052”, “TDIAL_STRING=SIP/CallManager”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [2@ext-trunk:2] Set(“SIP/1000-00000052”, “DIAL_TRUNK=2”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [2@ext-trunk:3] Goto(“SIP/1000-00000052”, “ext-trunk,tdial,1”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Goto (ext-trunk,tdial,1)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:1] Set(“SIP/1000-00000052”, “OUTBOUND_GROUP=OUT_2”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:2] GotoIf(“SIP/1000-00000052”, “0?nomax”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:3] GotoIf(“SIP/1000-00000052”, “0?hangit”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:4] ExecIf(“SIP/1000-00000052”, “0?Set(CALLERPRES()=)”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:5] Set(“SIP/1000-00000052”, “DIAL_NUMBER=”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:6] GosubIf(“SIP/1000-00000052”, “0?sub-flp-2,s,1()”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:7] Set(“SIP/1000-00000052”, “OUTNUM=”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:8] Set(“SIP/1000-00000052”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:9] Dial(“SIP/1000-00000052”, “SIP/CallManager/,300,Tt”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] netsock2.c: == Using SIP RTP TOS bits 184
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] netsock2.c: == Using SIP RTP CoS mark 5
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Audio is at 13702
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Adding codec 100003 (ulaw) to SDP
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Adding codec 100004 (alaw) to SDP
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.0.254:5060:
INVITE sip:192.168.0.254:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.168:5060;branch=z9hG4bK3a6accd0
Max-Forwards: 70
From: sip:[email protected];tag=as340efb27
To: sip:192.168.0.254:5060
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.11.0beta2(11.2.1)
Date: Wed, 20 Nov 2013 08:29:00 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 255

v=0
o=root 1163504070 1163504070 IN IP4 10.0.0.168
s=Asterisk PBX 11.2.1
c=IN IP4 10.0.0.168
t=0 0
m=audio 13702 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] app_dial.c: – Called SIP/CallManager/
[2013-11-20 09:29:00] VERBOSE[1836][C-00000032] chan_sip.c: – Got SIP response 400 “Bad Request - ‘Malformed/Missing URL’” back from 192.168.0.254:5060
[2013-11-20 09:29:00] VERBOSE[1836][C-00000032] chan_sip.c: Transmitting (no NAT) to 192.168.0.254:5060:
ACK sip:192.168.0.254:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.168:5060;branch=z9hG4bK3a6accd0
Max-Forwards: 70
From: sip:[email protected];tag=as340efb27
To: sip:192.168.0.254:5060;tag=57CC8C28-10FC
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-2.11.0beta2(11.2.1)
Content-Length: 0


[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] app_dial.c: – SIP/CallManager-00000054 is circuit-busy
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] app_dial.c: == Everyone is busy/congested at this time (1:0/1/0)
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:10] Set(“SIP/1000-00000052”, “CALLERID(number)=1000”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:11] Set(“SIP/1000-00000052”, “CALLERID(name)=”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: – Executing [tdial@ext-trunk:12] Hangup(“SIP/1000-00000052”, “”) in new stack
[2013-11-20 09:29:00] VERBOSE[25962][C-00000032] pbx.c: == Spawn extension (ext-trunk, tdial, 12) exited non-zero on ‘SIP/1000-00000052’
[2013-11-20 09:29:00] VERBOSE[1836] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: INVITE
[2013-11-20 09:29:03] VERBOSE[1836] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.0.254:5060:
OPTIONS sip:192.168.0.254 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.168:5060;branch=z9hG4bK04ade86f
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as0c701760
To: sip:192.168.0.254
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.11.0beta2(11.2.1)
Date: Wed, 20 Nov 2013 08:29:03 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

Can you please help me?

If possible, can you please link me a guide on writing outbound/inbound routes.

Thank you.