I had a working zaptel/asterisk/freepbx system. Then I decided to exchange an analogue phone ext101 for a snom SIP/101 extension. I moved the analogue phone to ext100 and then all my extensions quit working. So I then moved it to x109 and then my extensions resumed function, but x109 was “I’m sorry that number is unavailable, please try again.” So I decided to upgrade from freepbx-2.3.0beta1.0
to 2.3.0 and also updated all modules. I also upgraded asterisk and the rest of my gentoo x86 system. Now all the internal extensions work just fine, but I can no longer make/receive calls to the PSTN.
My /etc/zaptel.conf (by genzaptelconf):
Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1”
fxols=1
fxols=2
channel 3, WCTDM, no module.
channel 4, WCTDM, no module.
Span 2: WCTDM/1 “Wildcard TDM400P REV I Board 2”
fxsks=5
fxsks=6
fxsks=7
channel 8, WCTDM, no module.
Global data
loadzone = us
defaultzone = us
ztcfg -vvvv | grep -v “^$”
Zaptel Configuration
Channel map:
Channel 01: FXO Loopstart (Default) (Slaves: 01)
Channel 02: FXO Loopstart (Default) (Slaves: 02)
Channel 05: FXS Kewlstart (Default) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Slaves: 06)
Channel 07: FXS Kewlstart (Default) (Slaves: 07)
5 channels configured.
I set channels 5,6,7 as group 0 (PSTN Trunk ZAP/g0) in zapata-channels.conf using fxs_ks
and channels 1,2 as group 1 with fxo_ls
All internal calls work just fine. If I dial x102 (channel 2) the analog phone rings and I can talk OK so fxo_ls is working fine for Board #1. If I try to make an outgoing call using PSTN trunk g0, I hear one ring/click and then the call goes dead. The same thing happens when a call comes in on PSTN trunk ZAP/g0.
Here’s a verbose asterisk log when trying to make an outside call:
pbx*CLI>
Connected to Asterisk 1.2.21.1 currently running on pbx (pid = 32642)
Verbosity is at least 9
– Remote UNIX connection
– Executing Set(“SIP/104-08217900”, “EMERGENCYROUTE=YES”) in new stack
– Executing Macro(“SIP/104-08217900”, “dialout-trunk|1|7108097||”) in new stack
– Executing Set(“SIP/104-08217900”, “DIAL_TRUNK=1”) in new stack
– Executing Set(“SIP/104-08217900”, “DIAL_NUMBER=7108097”) in new stack
– Executing Set(“SIP/104-08217900”, “ROUTE_PASSWD=”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “1?noauth”) in new stack
– Goto (macro-dialout-trunk,s,6)
– Executing GotoIf(“SIP/104-08217900”, “0?disabletrunk|1”) in new stack
– Executing Set(“SIP/104-08217900”, “_NODEST=”) in new stack
– Executing Set(“SIP/104-08217900”, “DIAL_TRUNK_OPTIONS=Ttrw”) in new stack
– Executing Set(“SIP/104-08217900”, “GROUP()=OUT_1”) in new stack
– Executing Macro(“SIP/104-08217900”, “user-callerid|SKIPTTL”) in new stack
– Executing NoOp(“SIP/104-08217900”, “user-callerid: device 104”) in new stack
– Executing Set(“SIP/104-08217900”, “AMPUSER=104”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?report”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?start”) in new stack
– Executing Set(“SIP/104-08217900”, “REALCALLERIDNUM=104”) in new stack
– Executing NoOp(“SIP/104-08217900”, “REALCALLERIDNUM is 104”) in new stack
– Executing Set(“SIP/104-08217900”, “AMPUSER=104”) in new stack
– Executing Set(“SIP/104-08217900”, “AMPUSERCIDNAME=Jeremy”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?report”) in new stack
– Executing Set(“SIP/104-08217900”, “AMPUSERCID=104”) in new stack
– Executing Set(“SIP/104-08217900”, “CALLERID(all)=“Jeremy” <104>”) in new stack
– Executing Set(“SIP/104-08217900”, “REALCALLERIDNUM=104”) in new stack
– Executing NoOp(“SIP/104-08217900”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing NoOp(“SIP/104-08217900”, “Using CallerID “Jeremy” <104>”) in new stack
– Executing Macro(“SIP/104-08217900”, “record-enable|104|OUT”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing AGI(“SIP/104-08217900”, “recordingcheck|20070906-062551|1189074351.12”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20070906-062551|1189074351.12: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/104-08217900”, “No recording needed”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?skipoutcid”) in new stack
– Executing Set(“SIP/104-08217900”, “DIAL_TRUNK_OPTIONS=trWT”) in new stack
– Executing Macro(“SIP/104-08217900”, “outbound-callerid|1”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing NoOp(“SIP/104-08217900”, “REALCALLERIDNUM is 104”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,9)
– Executing Set(“SIP/104-08217900”, “USEROUTCID=Jeremy [email protected]”) in new stack
– Executing Set(“SIP/104-08217900”, “EMERGENCYCID=7577878743”) in new stack
– Executing Set(“SIP/104-08217900”, “TRUNKOUTCID=ACJLaw <757-787-8743>”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?trunkcid”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?trunkcid”) in new stack
– Executing Set(“SIP/104-08217900”, “CALLERID(all)=7577878743”) in new stack
– Executing Goto(“SIP/104-08217900”, “report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing NoOp(“SIP/104-08217900”, “CallerID set to “” <7577878743>”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?nomax”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “0?chanfull”) in new stack
– Executing AGI(“SIP/104-08217900”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern 1NXXNXXXXXX
> fixlocalprefix: Using pattern NXXNXXXXXX
> fixlocalprefix: Using pattern NXXXXXX
== fixlocalprefix: Dialpattern NXXXXXX matched. 7108097 -> 7108097
– AGI Script fixlocalprefix completed, returning 0
– Executing Set(“SIP/104-08217900”, “OUTNUM=7108097”) in new stack
– Executing Set(“SIP/104-08217900”, “custom=ZAP/g0”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,22)
– Executing GotoIf(“SIP/104-08217900”, “0?customtrunk”) in new stack
– Executing Dial(“SIP/104-08217900”, “ZAP/g0/7108097|300|trWT”) in new stack
– Called g0/7108097
– Zap/5-1 answered SIP/104-08217900
– Hungup ‘Zap/5-1’
== Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on ‘SIP/104-08217900’ in macro ‘dialout-trunk’
== Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on ‘SIP/104-08217900’
– Executing Macro(“SIP/104-08217900”, “hangupcall”) in new stack
– Executing ResetCDR(“SIP/104-08217900”, “w”) in new stack
– Executing NoCDR(“SIP/104-08217900”, “”) in new stack
– Executing GotoIf(“SIP/104-08217900”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing GotoIf(“SIP/104-08217900”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing GotoIf(“SIP/104-08217900”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing Hangup(“SIP/104-08217900”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/104-08217900’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/104-08217900’
And an incoming call:
pbx*CLI> set verbose 9
Verbosity was 0 and is now 9
– Starting simple switch on ‘Zap/5-1’
– Executing Set(“Zap/5-1”, “__FROM_DID=s”) in new stack
– Executing Gosub(“Zap/5-1”, “app-blacklist-check|s|1”) in new stack
– Executing LookupBlacklist(“Zap/5-1”, “”) in new stack
– Executing GotoIf(“Zap/5-1”, “0?blacklisted”) in new stack
– Executing Return(“Zap/5-1”, “”) in new stack
– Executing GotoIf(“Zap/5-1”, “0 ?cidok”) in new stack
– Executing Set(“Zap/5-1”, “CALLERID(name)=”) in new stack
– Executing NoOp(“Zap/5-1”, “CallerID is “” <>”) in new stack
– Executing Ringing(“Zap/5-1”, “”) in new stack
– Executing Set(“Zap/5-1”, "[email protected]") in new stack
– Executing Answer(“Zap/5-1”, “”) in new stack
– Executing Wait(“Zap/5-1”, “0”) in new stack
– Executing Goto(“Zap/5-1”, “app-daynight|2|1”) in new stack
– Goto (app-daynight,2,1)
– Executing GotoIf(“Zap/5-1”, “0?ivr-3|s|1:timeconditions|1|1”) in new stack
– Goto (timeconditions,1,1)
– Executing GotoIfTime(“Zap/5-1”, “08:30-17:15|mon-fri|1-31|jan-dec?ivr-2|s|1”) in new stack
– Executing Goto(“Zap/5-1”, “ivr-3|s|1”) in new stack
– Goto (ivr-3,s,1)
– Executing Set(“Zap/5-1”, “LOOPCOUNT=0”) in new stack
– Executing Set(“Zap/5-1”, “__DIR-CONTEXT=default”) in new stack
– Executing Set(“Zap/5-1”, “_IVR_CONTEXT_ivr-3=”) in new stack
– Executing Set(“Zap/5-1”, “_IVR_CONTEXT=ivr-3”) in new stack
– Executing GotoIf(“Zap/5-1”, “1?begin”) in new stack
– Goto (ivr-3,s,8)
– Executing Set(“Zap/5-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing Set(“Zap/5-1”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10
– Executing BackGround(“Zap/5-1”, “custom/MY_Closed&custom/MY_Extensions”) in new stack
– Playing ‘custom/MY_Closed’ (language ‘en’)
– Playing ‘custom/MY_Extensions’ (language ‘en’)
– Executing WaitExten(“Zap/5-1”, “|”) in new stack
– Timeout on Zap/5-1, going to ‘t’
– Executing Goto(“Zap/5-1”, “loop|1”) in new stack
– Goto (ivr-3,loop,1)
– Executing Set(“Zap/5-1”, “LOOPCOUNT=1”) in new stack
– Executing GotoIf(“Zap/5-1”, “0?hang|1”) in new stack
– Executing Goto(“Zap/5-1”, “ivr-3|s|begin”) in new stack
– Goto (ivr-3,s,8)
– Executing Set(“Zap/5-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing Set(“Zap/5-1”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10
– Executing BackGround(“Zap/5-1”, “custom/MY_Closed&custom/MY_Extensions”) in new stack
– Playing ‘custom/MY_Closed’ (language ‘en’)
– Playing ‘custom/MY_Extensions’ (language ‘en’)
– Executing WaitExten(“Zap/5-1”, “|”) in new stack
– Timeout on Zap/5-1, going to ‘t’
– Executing Goto(“Zap/5-1”, “loop|1”) in new stack
– Goto (ivr-3,loop,1)
– Executing Set(“Zap/5-1”, “LOOPCOUNT=2”) in new stack
– Executing GotoIf(“Zap/5-1”, “0?hang|1”) in new stack
– Executing Goto(“Zap/5-1”, “ivr-3|s|begin”) in new stack
– Goto (ivr-3,s,8)
– Executing Set(“Zap/5-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing Set(“Zap/5-1”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10
– Executing BackGround(“Zap/5-1”, “custom/MY_Closed&custom/MY_Extensions”) in new stack
– Playing ‘custom/MY_Closed’ (language ‘en’)
================================
Does anybody have a clue as to what might have broken?
Why doesn’t the phone ring
when I place an outside call?:
– Called g0/7108097
– Zap/5-1 answered SIP/104-08217900
– Hungup ‘Zap/5-1’
In the meantime I’ve stopped asterisk, and have reverted to the old analog PSTN (so my 3 PSTN lines are OK)
THANKS for any ideas.