Outbound calls not connecting over analog trunk (only hearing busy tone)

FreePBX Distro: 1.813.210.58

Hi All,

I’ve setup an analog trunk - can receive calls but whenever i try and make an outbound call i only hear the busy tone.

I have setup an outbound route with using the “.” pattern and uses the ZAP/g0 trunk but i still can’t complete the call.

I know this is more than likely another “dialling patterns” posts but I’ve read through so many threads and I still don’t know what i’m doing wrong here - i have tried many combination and still can’t complete the call.

Can anyone please help?

Thanks,
Tarran

Hi

Can you post the log of an outgoing call?

Do a
tail -f /var/log/asterisk/full

Then call,
Then post the log output here.

Here it is:

[2012-06-24 23:44:36] VERBOSE[3814] netsock2.c: == Using SIP RTP TOS bits 184
[2012-06-24 23:44:36] VERBOSE[3814] netsock2.c: == Using SIP RTP CoS mark 5
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] Macro("SIP/5550-00000013", "user-callerid,LIMIT,") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] Set("SIP/5550-00000013", "AMPUSER=5550") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:2] GotoIf("SIP/5550-00000013", "0?report") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] ExecIf("SIP/5550-00000013", "1?Set(REALCALLERIDNUM=5550)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:4] Set("SIP/5550-00000013", "AMPUSER=5550") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:5] Set("SIP/5550-00000013", "AMPUSERCIDNAME=Bonnie Ho") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:6] GotoIf("SIP/5550-00000013", "0?report") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:7] Set("SIP/5550-00000013", "AMPUSERCID=5550") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:8] Set("SIP/5550-00000013", "CALLERID(all)="Bonnie Ho" <5550>") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:9] GotoIf("SIP/5550-00000013", "0?limit") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:10] ExecIf("SIP/5550-00000013", "1?Set(GROUP(concurrency_limit)=5550)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:11] ExecIf("SIP/5550-00000013", "0?Set(CHANNEL(language)=)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:12] GosubIf("SIP/5550-00000013", "7?sub-ccss,s,1(from-internal,25415552)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] ExecIf("SIP/5550-00000013", "0?Return()") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:2] Set("SIP/5550-00000013", "CCSS_SETUP=TRUE") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] GosubIf("SIP/5550-00000013", "0?monitor_config,1(from-internal,25415552):monitor_default,1(from-internal,25415552)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] GotoIf("SIP/5550-00000013", "0?is_exten") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:2] StackPop("SIP/5550-00000013", "") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] Return("SIP/5550-00000013", "FALSE") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:13] GotoIf("SIP/5550-00000013", "1?continue") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Goto (macro-user-callerid,s,26)
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:26] Set("SIP/5550-00000013", "CALLERID(number)=5550") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]-callerid:27] Set("SIP/5550-00000013", "CALLERID(name)=Bonnie Ho") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:28] Set("SIP/5550-00000013", "CHANNEL(language)=en") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:2] Set("SIP/5550-00000013", "MOHCLASS=default") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] Set("SIP/5550-00000013", "_NODEST=") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:4] Gosub("SIP/5550-00000013", "sub-record-check,s,1(out,25415552,)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] GotoIf("SIP/5550-00000013", "1?check") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Goto (sub-record-check,s,6)
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:6] Set("SIP/5550-00000013", "__MON_FMT=wav") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:7] GotoIf("SIP/5550-00000013", "1?next") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Goto (sub-record-check,s,10)
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:10] ExecIf("SIP/5550-00000013", "0?Return()") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:11] GotoIf("SIP/5550-00000013", "0?out,1") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:12] Set("SIP/5550-00000013", "__REC_STATUS=INITIALIZED") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:13] ExecIf("SIP/5550-00000013", "0?Set(__REC_POLICY_MODE=)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:14] Set("SIP/5550-00000013", "NOW=1340552676") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:15] Set("SIP/5550-00000013", "__DAY=24") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:16] Set("SIP/5550-00000013", "__MONTH=06") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:17] Set("SIP/5550-00000013", "__YEAR=2012") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:18] Set("SIP/5550-00000013", "__TIMESTR=20120624-234436") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:19] Set("SIP/5550-00000013", "__FROMEXTEN=5550") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:20] Set("SIP/5550-00000013", "__CALLFILENAME=out-25415552-5550-20120624-234436-1340552676.35") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:21] Goto("SIP/5550-00000013", "out,1") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Goto (sub-record-check,out,1)
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] ExecIf("SIP/5550-00000013", "1?Set(__REC_POLICY_MODE=dontcare)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:2] GosubIf("SIP/5550-00000013", "0?record,1(exten,25415552,5550)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] Return("SIP/5550-00000013", "") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:5] Macro("SIP/5550-00000013", "dialout-trunk,1,25415552,") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] Set("SIP/5550-00000013", "DIAL_TRUNK=1") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:2] GosubIf("SIP/5550-00000013", "0?sub-pincheck,s,1()") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] GotoIf("SIP/5550-00000013", "0?disabletrunk,1") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:4] Set("SIP/5550-00000013", "DIAL_NUMBER=25415552") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:5] Set("SIP/5550-00000013", "DIAL_TRUNK_OPTIONS=tr") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:6] Set("SIP/5550-00000013", "OUTBOUND_GROUP=OUT_1") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:7] GotoIf("SIP/5550-00000013", "1?nomax") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Goto (macro-dialout-trunk,s,9)
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:9] GotoIf("SIP/5550-00000013", "0?skipoutcid") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:10] Set("SIP/5550-00000013", "DIAL_TRUNK_OPTIONS=") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:11] Macro("SIP/5550-00000013", "outbound-callerid,1") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] ExecIf("SIP/5550-00000013", "0?Set(CALLERPRES()=)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:2] ExecIf("SIP/5550-00000013", "0?Set(REALCALLERIDNUM=5550)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] GotoIf("SIP/5550-00000013", "1?normcid") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Goto (macro-outbound-callerid,s,6)
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:6] Set("SIP/5550-00000013", "USEROUTCID=25415550") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:7] Set("SIP/5550-00000013", "EMERGENCYCID=") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:8] Set("SIP/5550-00000013", "TRUNKOUTCID=") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:9] GotoIf("SIP/5550-00000013", "1?trunkcid") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Goto (macro-outbound-callerid,s,12)
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:12] ExecIf("SIP/5550-00000013", "0?Set(CALLERID(all)=)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:13] ExecIf("SIP/5550-00000013", "1?Set(CALLERID(all)=25415550)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:14] ExecIf("SIP/5550-00000013", "0?Set(CALLERID(all)=)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:15] ExecIf("SIP/5550-00000013", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:12] GosubIf("SIP/5550-00000013", "0?sub-flp-1,s,1()") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:13] Set("SIP/5550-00000013", "OUTNUM=25415552") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:14] Set("SIP/5550-00000013", "custom=DAHDI/g0") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:15] ExecIf("SIP/5550-00000013", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:16] ExecIf("SIP/5550-00000013", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:17] Macro("SIP/5550-00000013", "dialout-trunk-predial-hook,") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] MacroExit("SIP/5550-00000013", "") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:18] GotoIf("SIP/5550-00000013", "0?bypass,1") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:19] ExecIf("SIP/5550-00000013", "1?Set(CONNECTEDLINE(num,i)=25415552)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:20] ExecIf("SIP/5550-00000013", "1?Set(CONNECTEDLINE(name,i)=CID:25415550)") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:21] GotoIf("SIP/5550-00000013", "0?customtrunk") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] pbx.c: -- Executing [[email protected]:22] Dial("SIP/5550-00000013", "DAHDI/g0/25415552,300,") in new stack
[2012-06-24 23:44:36] VERBOSE[5096] app_dial.c: -- Called DAHDI/g0/25415552
[2012-06-24 23:44:41] VERBOSE[5096] app_dial.c: -- DAHDI/1-1 answered SIP/5550-00000013
[2012-06-24 23:44:50] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] Macro("SIP/5550-00000013", "hangupcall,") in new stack
[2012-06-24 23:44:50] VERBOSE[5096] pbx.c: -- Executing [[email protected]:1] GotoIf("SIP/5550-00000013", "1?theend") in new stack
[2012-06-24 23:44:50] VERBOSE[5096] pbx.c: -- Goto (macro-hangupcall,s,3)
[2012-06-24 23:44:50] VERBOSE[5096] pbx.c: -- Executing [[email protected]:3] ExecIf("SIP/5550-00000013", "0?Set(CDR(recordingfile)=)") in new stack
[2012-06-24 23:44:50] VERBOSE[5096] pbx.c: -- Executing [[email protected]:4] Hangup("SIP/5550-00000013", "") in new stack
[2012-06-24 23:44:50] VERBOSE[5096] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/5550-00000013' in macro 'hangupcall'
[2012-06-24 23:44:50] VERBOSE[5096] features.c: == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/5550-00000013'
[2012-06-24 23:44:50] VERBOSE[5096] sig_analog.c: -- Hanging up on 'DAHDI/1-1'
[2012-06-24 23:44:50] VERBOSE[5096] chan_dahdi.c: -- Hungup 'DAHDI/1-1'
[2012-06-24 23:44:50] VERBOSE[5096] app_macro.c: == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'SIP/5550-00000013' in macro 'dialout-trunk'
[2012-06-24 23:44:50] VERBOSE[5096] pbx.c: == Spawn extension (from-internal, 25415552, 5) exited non-zero on 'SIP/5550-00000013'

That looks about right tho.

Worth a try, can you create a ZAP Compatible DAHDI Trunk instead? And use this trunk in your outbound route?

Stupid question: Did you pay the bill? haha :slight_smile:

Try hooking up an analog phone and call…just to be sure :wink:

I created the ZAP Compatible DAHDI Trunk - same problem unfortunately.

I doubt it is the bill hasn’t been paid as i can receive calls (i’ll still check though), i’ll dig up an analog phone and test tomorrow when can be infront of the pbx.

Is it possible i messed up when installing the sangoma analog card when answering some of the wizard question or could this not be the case as incomming calls are working?

Can you think of anything else it could be?

Hi DM,

I doubt its the installation, if i were you i’d get that analog phone setup and tested. Here in my country Malaysia, outbound calls will first get barred if we don;t pay bills after a certain amount of “warnings”. After we get barred for outgoing, incoming will still work for like 3-6 months tho…

Do let us know tomorrow

PS, Am not too familiar with Sangoma and Wanpipe, but they do have an excellent support forum etc. I’ve done a couple of PRIs and they were quite straight forward also…

Oh and also, pls post your chan_dahdi.conf, dahdi_channels.conf (if any), and /etc/dahdi/system.conf files here, one other thing could go wrong is the grouping definition…prolly…

I’ll call PCCW tomorrow regarding payment make sure that’s not the problem.
[I’ve now tested an can make a call from the socket via analog device - so yes, bill has been paid]

/etc/dahdi/system.conf

#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
#autogenrated on 2012-06-22
#Dahdi Channels Configurations
#For detailed Dahdi options, view /etc/dahdi/system.conf.bak
loadzone=us
defaultzone=us

#Sangoma AFT-A200 [slot:1 bus:3 span:1] <wanpipe1>
fxsks=1
echocanceller=mg2,1
fxsks=2
echocanceller=mg2,2
fxsks=3
echocanceller=mg2,3
fxsks=4
echocanceller=mg2,4

Am i understanding the above correctly - Has my supplier screwed me and sent me a four port FXS card instead of FXO one?

chan_dahdi.conf

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300              ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes
busydetect=yes
busycount=10
busydetect=yes
busycount=10
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no


#include dahdi-channels.conf

group=1

;Include AMP configs
#include chan_dahdi_additional.conf

dahdi_channels.conf is blank.

Thanks.

cmd: dahdi_cfg -vvv

DAHDI Tools Version - 2.6.1

DAHDI Version: 2.6.1
Echo Canceller(s): HWEC
Configuration
======================


Channel map:

Channel 01: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)

4 channels to configure.

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2

F$%K sake - i’m guessing FXS instead of FXO is why i can make an outbound call… or am i reading this wrong?

This to me looks like i have a 4xFXO card installed; which is what i order but am confused with the FXSKS signalling - shouldn’t this be FXOKS or am i searching in the wrong area for why i can’t make outbound calls?

lsdahdi

### Span  1: WRTDM/0 "wrtdm Board 1" (MASTER)
  1 FXO        FXSKS       (In use) (EC: WANPIPE_HWEC - INACTIVE)
  2 FXO        FXSKS       (In use) (EC: WANPIPE_HWEC - INACTIVE)
  3 FXO        FXSKS       (In use) (EC: WANPIPE_HWEC - INACTIVE)
  4 FXO        FXSKS       (In use) (EC: WANPIPE_HWEC - INACTIVE)

Alright, i might be missing something reading your configs, but a few questions:

  1. Are you using the DAHDI module in FreePBX? If yes, remove it
  2. Where do you define the channels for group 0?

The channels (normally in dahdi_channels.conf) should look like this for your case, you can put this file in dahdi_channels.conf if you like and restart (amportal kill then amportal start)

;; Channel 1
signalling=fxs_ks
callerid=asreceived
group=0
context=from-dahdi
channel => 1
;;
;; Channel 2
signalling=fxs_ks
callerid=asreceived
group=0
context=from-dahdi
channel => 2
;;
;; Channel 3
signalling=fxs_ks
callerid=asreceived
group=0
context=from-dahdi
channel => 3
;;
;; Channel 4
signalling=fxs_ks
callerid=asreceived
group=0
context=from-dahdi
channel => 4
;;

Hey sanjayws,

Well it’s all up and running now but with no real understanding of why it wasn’t… I received the second part to the sangoma card (an additional two fxo ports and two fxs ports). When i added this extention card i decided i’d comletely rebuild freepbx and it just worked first go…

No idea if was something to do with the card addition or was just a bad install of the FreePBX distro…

Thanks so much for helping me debug.

Tarran