I have Asterisk 1.6 with FreePBX 2.6 installed just fine on CentOS 5.5. with piaf.
I have two Snom 320 phones to test with which are dialling each other and I can talk and hear with excellent clarity. I am unable to dial out over our SIP connection though. I have also tried a softphone and met with similar problems.
I have 2 network cards:
eth0 points to the internal 10.1.10.0 network which has the phones and the PCs sharing at the moment, with their own LAN connection to the internet, provided by the building we’re hosted in, which is unsuitable for voip.
eth1 is connected to an ADSL connection and has its own public ip
I have a SIP trunk, which I believe I have set up properly.
My intention is to dial out from a phone on the internal network (eth0), through the dedicated ADSL line (eth1), via our SIP trunk supplier and out to the wide world.
To this end, using webmin, I have set up a default route over eth1, to hopefully force all SIP traffic out over that connection.
Now to the question(s)
Firstly, as mentioned, I am unable to dial out. I’m unsure why that is. Here is a few lines of logfile from a typical failed call:
[2010-10-28 15:16:27] [2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [07xxxxxxxxx@from-internal:1] Macro("SIP/1000-00000000", "user-callerid,SKIPTTL,") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:1] Set("SIP/1000-00000000", "AMPUSER=1000") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:2] GotoIf("SIP/1000-00000000", "0?report") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:3] ExecIf("SIP/1000-00000000", "1?Set(REALCALLERIDNUM=1000)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:4] Set("SIP/1000-00000000", "AMPUSER=1000") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:5] Set("SIP/1000-00000000", "AMPUSERCIDNAME=Test phone 1") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:6] GotoIf("SIP/1000-00000000", "0?report") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:7] Set("SIP/1000-00000000", "AMPUSERCID=1000") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:8] Set("SIP/1000-00000000", "CALLERID(all)="Test phone 1" <1000>") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:9] ExecIf("SIP/1000-00000000", "0?Set(CHANNEL(language)=)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:10] GotoIf("SIP/1000-00000000", "1?continue") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Goto (macro-user-callerid,s,19)
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-user-callerid:19] NoOp("SIP/1000-00000000", "Using CallerID "Test phone 1" <1000>") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [07xxxxxxxxx@from-internal:2] Set("SIP/1000-00000000", "_NODEST=") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [07xxxxxxxxx@from-internal:3] Macro("SIP/1000-00000000", "record-enable,1000,OUT,") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-record-enable:1] GotoIf("SIP/1000-00000000", "1?check") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Goto (macro-record-enable,s,4)
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-record-enable:4] AGI("SIP/1000-00000000", "recordingcheck,20101028-153418,1288276458.0") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
[2010-10-28 15:34:18] VERBOSE[3160] res_agi.c: recordingcheck,20101028-153418,1288276458.0: Outbound recording not enabled
[2010-10-28 15:34:18] VERBOSE[3160] res_agi.c: -- <SIP/1000-00000000>AGI Script recordingcheck completed, returning 0
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-record-enable:5] MacroExit("SIP/1000-00000000", "") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [07xxxxxxxxx@from-internal:4] Macro("SIP/1000-00000000", "dialout-trunk,2,07xxxxxxxxx,,") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:1] Set("SIP/1000-00000000", "DIAL_TRUNK=2") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1000-00000000", "0?sub-pincheck,s,1") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1000-00000000", "0?disabletrunk,1") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:4] Set("SIP/1000-00000000", "DIAL_NUMBER=07xxxxxxxxx") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:5] Set("SIP/1000-00000000", "DIAL_TRUNK_OPTIONS=tr") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:6] Set("SIP/1000-00000000", "OUTBOUND_GROUP=OUT_2") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/1000-00000000", "0?nomax") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:8] GotoIf("SIP/1000-00000000", "0?chanfull") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/1000-00000000", "0?skipoutcid") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:10] Set("SIP/1000-00000000", "DIAL_TRUNK_OPTIONS=") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:11] Macro("SIP/1000-00000000", "outbound-callerid,2") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/1000-00000000", "0?Set(CALLERPRES()=)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/1000-00000000", "0?Set(REALCALLERIDNUM=1000)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/1000-00000000", "1?normcid") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Goto (macro-outbound-callerid,s,6)
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:6] Set("SIP/1000-00000000", "USEROUTCID=") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:7] Set("SIP/1000-00000000", "EMERGENCYCID=") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:8] Set("SIP/1000-00000000", "TRUNKOUTCID=0845xxxxxxx") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/1000-00000000", "1?trunkcid") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Goto (macro-outbound-callerid,s,12)
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/1000-00000000", "1?Set(CALLERID(all)=0845xxxxxxx)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/1000-00000000", "0?Set(CALLERID(all)=)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/1000-00000000", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/1000-00000000", "0?AGI(fixlocalprefix)") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:13] Set("SIP/1000-00000000", "OUTNUM=07xxxxxxxxx") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:14] Set("SIP/1000-00000000", "custom=SIP/node4") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/1000-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:16] Macro("SIP/1000-00000000", "dialout-trunk-predial-hook,") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/1000-00000000", "") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/1000-00000000", "0?bypass,1") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/1000-00000000", "0?customtrunk") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:19] Dial("SIP/1000-00000000", "SIP/node4/07xxxxxxxxx,300,") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] netsock.c: == Using SIP RTP TOS bits 184
[2010-10-28 15:34:18] VERBOSE[3160] netsock.c: == Using SIP RTP CoS mark 5
[2010-10-28 15:34:18] VERBOSE[3160] app_dial.c: -- Called node4/07xxxxxxxxx
[2010-10-28 15:34:18] VERBOSE[3160] app_dial.c: -- SIP/node4-00000001 is circuit-busy
[2010-10-28 15:34:18] VERBOSE[3160] app_dial.c: == Everyone is busy/congested at this time (1:0/1/0)
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-dialout-trunk:20] Goto("SIP/1000-00000000", "s-CONGESTION,1") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Goto (macro-dialout-trunk,s-CONGESTION,1)
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf("SIP/1000-00000000", "1?noreport") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Goto (macro-dialout-trunk,s-CONGESTION,3)
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp("SIP/1000-00000000", "TRUNK Dial failed due to CONGESTION - failing through to other trunks") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [07xxxxxxxxx@from-internal:5] Macro("SIP/1000-00000000", "outisbusy,") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outisbusy:1] GotoIf("SIP/1000-00000000", "0?emergency,1") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outisbusy:2] GotoIf("SIP/1000-00000000", "0?intracompany,1") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] pbx.c: -- Executing [s@macro-outisbusy:3] Playback("SIP/1000-00000000", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
[2010-10-28 15:34:18] VERBOSE[3160] file.c: -- <SIP/1000-00000000> Playing 'all-circuits-busy-now.gsm' (language 'en')
[2010-10-28 15:34:19] VERBOSE[3158] manager.c: == Manager 'admin' logged off from 127.0.0.1
[2010-10-28 15:34:20] VERBOSE[3160] file.c: -- <SIP/1000-00000000> Playing 'pls-try-call-later.gsm' (language 'en')
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Executing [s@macro-outisbusy:4] Congestion("SIP/1000-00000000", "20") in new stack
[2010-10-28 15:34:22] VERBOSE[3160] app_macro.c: == Spawn extension (macro-outisbusy, s, 4) exited non-zero on 'SIP/1000-00000000' in macro 'outisbusy'
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: == Spawn extension (from-internal, 07xxxxxxxxx, 5) exited non-zero on 'SIP/1000-00000000'
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Executing [h@from-internal:1] Macro("SIP/1000-00000000", "hangupcall") in new stack
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Executing [s@macro-hangupcall:1] GotoIf("SIP/1000-00000000", "1?skiprg") in new stack
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Goto (macro-hangupcall,s,4)
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Executing [s@macro-hangupcall:4] GotoIf("SIP/1000-00000000", "1?skipblkvm") in new stack
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Goto (macro-hangupcall,s,7)
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Executing [s@macro-hangupcall:7] GotoIf("SIP/1000-00000000", "1?theend") in new stack
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Goto (macro-hangupcall,s,9)
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: -- Executing [s@macro-hangupcall:9] Hangup("SIP/1000-00000000", "") in new stack
[2010-10-28 15:34:22] VERBOSE[3160] app_macro.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/1000-00000000' in macro 'hangupcall'
[2010-10-28 15:34:22] VERBOSE[3160] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1000-00000000''
So, have I taken broadly speaking the right course of action to ensure that asterisk tries to connect to the SIP trunk through eth0?
Is there anything in particular that may catch me out when I am using two NICs?
Can anybody tell, by looking at the log file, what is causing me to be unable to dial out?
Thanks for your time in reading this and making it this far down!
Simon