Zap/PSTN not initializing calls

Hello there.
I have an asteriskNow installation and have a big problem! I tried trixbox to see whether it was an asteriskNow problem but I see the same problem again.

I have setup asterisk and all internal functions and applications are working superb. However, my problems begin with the PSTN.

I have a TDM400P with one 1FXS & 1FXO. Now, when I call my PSTN line using my mobile phone, asterisk “feels/picks” up the phone but does not initiate the call. I have configured it to go to an IVR menu. On CLI> I see that the IVR menu is running but my mobile phone is still ringing. The IVR menu plays till its times out after 3 times.

Also, when dialing out, e.g. when I dial my mobile phone, I see that the zap4 (trunk connection) has initialized but the mobile phone does not ring!

Please help.

Posting the relevant portions of your zapata.conf and your dialplan would really help answer this question…

True true true. Here goes.

/var/log/asterisk/full - When Dialing the PSTN using my mobile phone

[quote]Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing NoOp(“Zap/4-1”, "Entering from-zaptel with DID == ") in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Ringing(“Zap/4-1”, “”) in new stack
Jun 18 10:32:50 DEBUG[3881] chan_zap.c: Requested indication 3 on channel Zap/4-1
Jun 18 10:32:50 DEBUG[3881] pbx.c: Expression result is ‘1’
Jun 18 10:32:50 DEBUG[3881] pbx.c: Function result is ‘s’
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “DID=s”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing NoOp(“Zap/4-1”, “DID is now s”) in new stack
Jun 18 10:32:50 DEBUG[3881] pbx.c: Expression result is ‘1’
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing GotoIf(“Zap/4-1”, “1?zapok:notzap”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Goto (from-zaptel,s,Cool
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing NoOp(“Zap/4-1”, “Is a Zaptel Channel”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “CHAN=4-1”) in new stack
Jun 18 10:32:50 DEBUG[3881] pbx.c: Function result is ‘4’
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “CHAN=4”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Macro(“Zap/4-1”, “from-zaptel-4|s|1”) in new stack
Jun 18 10:32:50 WARNING[3881] app_macro.c: No such context ‘macro-from-zaptel-4’ for macro ‘from-zaptel-4’
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing NoOp(“Zap/4-1”, “Returned from Macro from-zaptel-4”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Goto(“Zap/4-1”, “from-pstn|s|1”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Goto (from-pstn,s,1)
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “FROM_DID=s”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Ringing(“Zap/4-1”, “”) in new stack
Jun 18 10:32:50 DEBUG[3881] chan_zap.c: Requested indication 3 on channel Zap/4-1
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Goto(“Zap/4-1”, “ivr-2|s|1”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Goto (ivr-2,s,1)
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “LOOPCOUNT=0”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “__DIR-CONTEXT=”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “_IVR_CONTEXT_ivr-2=”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “_IVR_CONTEXT=ivr-2”) in new stack
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Answer(“Zap/4-1”, “”) in new stack
Jun 18 10:32:50 DEBUG[3881] chan_zap.c: Took Zap/4-1 off hook
Jun 18 10:32:50 DEBUG[3881] chan_zap.c: Enabled echo cancellation on channel 4
Jun 18 10:32:50 DEBUG[3881] chan_zap.c: Engaged echo training on channel 4
Jun 18 10:32:50 VERBOSE[3881] logger.c: – Executing Wait(“Zap/4-1”, “1”) in new stack
Jun 18 10:32:51 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “TIMEOUT(digit)=3”) in new stack
Jun 18 10:32:51 VERBOSE[3881] logger.c: – Digit timeout set to 3
Jun 18 10:32:51 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “TIMEOUT(response)=10”) in new stack
Jun 18 10:32:51 VERBOSE[3881] logger.c: – Response timeout set to 10
Jun 18 10:32:51 VERBOSE[3881] logger.c: – Executing BackGround(“Zap/4-1”, “custom/VAS-Welcome”) in new stack
Jun 18 10:32:51 DEBUG[3881] channel.c: Scheduling timer at 160 sample intervals
Jun 18 10:32:51 VERBOSE[3881] logger.c: – Playing ‘custom/VAS-Welcome’ (language ‘en’)
Jun 18 10:32:59 DEBUG[3273] manager.c: Manager received command ‘Command’
Jun 18 10:32:59 DEBUG[3273] manager.c: Manager received command ‘Command’
Jun 18 10:32:59 DEBUG[3273] manager.c: Manager received command ‘Command’
Jun 18 10:33:16 DEBUG[3881] channel.c: Scheduling timer at 58 sample intervals
Jun 18 10:33:16 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:33:16 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Timeout on Zap/4-1
Jun 18 10:33:27 VERBOSE[3881] logger.c: == CDR updated on Zap/4-1
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Executing Goto(“Zap/4-1”, “loop|1”) in new stack
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Goto (ivr-2,loop,1)
Jun 18 10:33:27 DEBUG[3881] pbx.c: Expression result is ‘1’
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “LOOPCOUNT=1”) in new stack
Jun 18 10:33:27 DEBUG[3881] pbx.c: Expression result is ‘0’
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Executing GotoIf(“Zap/4-1”, “0?hang|1”) in new stack
Jun 18 10:33:27 DEBUG[3881] pbx.c: Not taking any branch
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Executing Goto(“Zap/4-1”, “ivr-2|s|begin”) in new stack
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Goto (ivr-2,s,7)
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “TIMEOUT(digit)=3”) in new stack
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Digit timeout set to 3
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “TIMEOUT(response)=10”) in new stack
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Response timeout set to 10
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Executing BackGround(“Zap/4-1”, “custom/VAS-Welcome”) in new stack
Jun 18 10:33:27 DEBUG[3881] channel.c: Scheduling timer at 160 sample intervals
Jun 18 10:33:27 VERBOSE[3881] logger.c: – Playing ‘custom/VAS-Welcome’ (language ‘en’)
Jun 18 10:33:50 DEBUG[3215] chan_sip.c: Stopping retransmission on ‘5d9c96e50868014c4b2a2c966be2f985@192.168.56.156’ of Request 102: Match Found
Jun 18 10:33:50 DEBUG[3219] chan_iax2.c: Peer lastms 1, historicms 1, maxms 2000
Jun 18 10:33:50 DEBUG[3219] chan_iax2.c: Peer lastms 1, historicms 1, maxms 2000
Jun 18 10:33:50 DEBUG[3219] chan_iax2.c: Peer lastms 1, historicms 1, maxms 2000
Jun 18 10:33:50 DEBUG[3215] chan_sip.c: Stopping retransmission on ‘6b21caf23ca3874911c20b8e058217d8@192.168.56.156’ of Request 102: Match Found
Jun 18 10:33:51 DEBUG[3881] channel.c: Scheduling timer at 58 sample intervals
Jun 18 10:33:52 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:33:52 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Timeout on Zap/4-1
Jun 18 10:34:02 VERBOSE[3881] logger.c: == CDR updated on Zap/4-1
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Executing Goto(“Zap/4-1”, “loop|1”) in new stack
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Goto (ivr-2,loop,1)
Jun 18 10:34:02 DEBUG[3881] pbx.c: Expression result is ‘2’
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “LOOPCOUNT=2”) in new stack
Jun 18 10:34:02 DEBUG[3881] pbx.c: Expression result is ‘0’
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Executing GotoIf(“Zap/4-1”, “0?hang|1”) in new stack
Jun 18 10:34:02 DEBUG[3881] pbx.c: Not taking any branch
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Executing Goto(“Zap/4-1”, “ivr-2|s|begin”) in new stack
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Goto (ivr-2,s,7)
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “TIMEOUT(digit)=3”) in new stack
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Digit timeout set to 3
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “TIMEOUT(response)=10”) in new stack
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Response timeout set to 10
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Executing BackGround(“Zap/4-1”, “custom/VAS-Welcome”) in new stack
Jun 18 10:34:02 DEBUG[3881] channel.c: Scheduling timer at 160 sample intervals
Jun 18 10:34:02 VERBOSE[3881] logger.c: – Playing ‘custom/VAS-Welcome’ (language ‘en’)
Jun 18 10:34:16 NOTICE[3215] chan_sip.c: Unknown SIP command ‘PUBLISH’ from ‘192.168.56.150’
Jun 18 10:34:27 DEBUG[3881] channel.c: Scheduling timer at 58 sample intervals
Jun 18 10:34:27 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:34:27 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Timeout on Zap/4-1
Jun 18 10:34:37 VERBOSE[3881] logger.c: == CDR updated on Zap/4-1
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Executing Goto(“Zap/4-1”, “loop|1”) in new stack
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Goto (ivr-2,loop,1)
Jun 18 10:34:37 DEBUG[3881] pbx.c: Expression result is ‘3’
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Executing Set(“Zap/4-1”, “LOOPCOUNT=3”) in new stack
Jun 18 10:34:37 DEBUG[3881] pbx.c: Expression result is ‘1’
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Executing GotoIf(“Zap/4-1”, “1?hang|1”) in new stack
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Goto (ivr-2,hang,1)
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Executing Playback(“Zap/4-1”, “vm-goodbye”) in new stack
Jun 18 10:34:37 DEBUG[3881] channel.c: Scheduling timer at 160 sample intervals
Jun 18 10:34:37 VERBOSE[3881] logger.c: – Playing ‘vm-goodbye’ (language ‘en’)
Jun 18 10:34:38 DEBUG[3881] channel.c: Scheduling timer at 154 sample intervals
Jun 18 10:34:38 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:34:38 DEBUG[3881] channel.c: Scheduling timer at 0 sample intervals
Jun 18 10:34:38 VERBOSE[3881] logger.c: – Executing Hangup(“Zap/4-1”, “”) in new stack
Jun 18 10:34:38 VERBOSE[3881] logger.c: == Spawn extension (ivr-2, hang, 2) exited non-zero on ‘Zap/4-1’
Jun 18 10:34:38 VERBOSE[3881] logger.c: – Executing Hangup(“Zap/4-1”, “”) in new stack
Jun 18 10:34:38 VERBOSE[3881] logger.c: == Spawn extension (ivr-2, h, 1) exited non-zero on ‘Zap/4-1’
Jun 18 10:34:38 DEBUG[3881] cdr_addon_mysql.c: cdr_mysql: inserting a CDR record.
Jun 18 10:34:38 DEBUG[3881] cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES (‘2007-06-18 10:32:50’,‘0726203535’,‘0726203535’,‘hang’,‘ivr-2’, ‘Zap/4-1’,‘’,‘Hangup’,‘’,108,108,‘ANSWERED’,3,‘’,‘1182151970.0’)
Jun 18 10:34:38 DEBUG[3881] chan_zap.c: Hangup: channel: 4 index = 0, normal = 14, callwait = -1, thirdcall = -1
Jun 18 10:34:38 DEBUG[3881] chan_zap.c: disabled echo cancellation on channel 4
Jun 18 10:34:38 DEBUG[3881] chan_zap.c: Set option TDD MODE, value: OFF(0) on Zap/4-1
Jun 18 10:34:38 DEBUG[3881] chan_zap.c: Updated conferencing on 4, with 0 conference users
Jun 18 10:34:38 VERBOSE[3881] logger.c: – Hungup ‘Zap/4-1’[/quote]

Zapata.conf

[quote]
;
; 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

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
immediate=no

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

;Include genzaptelconf configs
#include zapata-auto.conf

group=1

;Include AMP configs
#include zapata_additional.conf[/quote]

Zapata-auto.conf[quote]

callerid=asreceived

; Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1”
signalling=fxo_ks
; Note: this is an extension. Create a ZAP extension in AMP for Channel 1
context=from-internal
group=1
channel => 1

; channel 2, WCTDM, inactive.
; channel 3, WCTDM, inactive.
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 4
context=from-zaptel
group=0
channel => 4

; Span 2: ZTDUMMY/1 “ZTDUMMY/1 1”[/quote]

A thing I’ve noted is that when loading aseterisk: it says Kernel Tainted. Something to do with OCTVQE. Read that that just has to do with licensing.l Dont’ know if its the root problem coz when I dial my PSTN line, the first line it show on CLI> is

Thanks.

You’re going to need to post your dialplan, too. I.e. the relevant contexts in extensions.conf.

Sorry. In my haste I missed that. Now, I hope this will help. Am really praying it does. Else just ask and I will get the relevant sections.

[quote]
[from-pstn]
include => from-pstn-custom ; create this context in extensions_custom.conf to include customizations
include => ext-did-direct ; MODIFICATOIN (PL) put before ext-did to take precedence
include => ext-did
include => from-did-direct ; MODIFICATOIN (PL) for findmefollow if enabled, should be bofore ext-local
exten => fax,1,Goto(ext-fax,in_fax,1)

[macro-dialout]
exten => s,1,Macro(user-callerid,SKIPTTL)
exten => s,2,GotoIf($["${ECID${CALLERID(number)}}" = “”]?5) ;check for CID override for exten
exten => s,3,Set(CALLERID(all)=${ECID${CALLERID(number)}})
exten => s,4,Goto(7)
exten => s,5,GotoIf($["${OUTCID_${ARG1}}" = “”]?7) ;check for CID override for trunk
exten => s,6,Set(CALLERID(all)=${OUTCID_${ARG1}})
exten => s,7,Set(length=${LEN(${DIAL_OUT_${ARG1}})})
exten => s,8,Dial(${OUT_${ARG1}}/${ARG2:${length}})
exten => s,9,Playtones(congestion)
exten => s,10,Congestion(5)
exten => s,109,Macro(outisbusy)

; dialout using default OUT trunk - no prefix

[macro-dialout-default]
exten => s,1,Macro(user-callerid,SKIPTTL)
exten => s,2,Macro(record-enable,${CALLERID(number)},OUT)
exten => s,3,Macro(outbound-callerid,${ARG1})
exten => s,4,Dial(${OUT}/${ARG1})
exten => s,5,Playtones(congestion)
exten => s,6,Congestion(5)
exten => s,105,Macro(outisbusy)

; dialout using a trunk, using pattern matching (don’t strip any prefix)
; arg1 = trunk number, arg2 = number, arg3 = route password
;
; MODIFIED (PL)
;
; Modified both Dial() commands to include the new TRUNK_OPTIONS from the general
; screen of AMP
;

[macro-dialout-trunk]
exten => s,1,Set(DIAL_TRUNK=${ARG1})

; If NODEST is set, clear it. No point in remembering since dialout-trunk will just end in the
; bit bucket. But if answered by an outside line with transfer capability, we want NODEST to be
; clear so a subsequent transfer to an internal extension works and goes to voicmail or other
; destinations.
;
exten => s,n,Set(_NODEST=)

exten => s,n,Set(DIAL_NUMBER=${ARG2})
exten => s,n,Set(ROUTE_PASSWD=${ARG3})
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS}) // will be reset to TRUNK_OPTIONS if not intra-company
exten => s,n,GotoIf($["${ROUTE_PASSWD}" = “”]?noauth) ; arg3 is pattern password
exten => s,n(auth),Authenticate(${ROUTE_PASSWD})
exten => s,n(noauth),Set(GROUP()=OUT_${DIAL_TRUNK})
exten => s,n,Macro(user-callerid,SKIPTTL)
exten => s,n,Macro(record-enable,${CALLERID(number)},OUT)
exten => s,n,GotoIf($["${INTRACOMPANYROUTE}" = “YES”]?skipoutcid) ;Set to YES if treated like internal
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS})
exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK})
exten => s,n(skipoutcid),GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = “foo”]?nomax)
exten => s,n(checkmax),GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)
exten => s,n(nomax),DeadAGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial string for this trunk
exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER}) ; OUTNUM is the final dial number
exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)}) ; Custom trunks are prefixed with “AMP:“
exten => s,n,GotoIf($[”${custom}” = “AMP”]?customtrunk)
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,${DIAL_TRUNK_OPTIONS}) ; Regular Trunk Dial
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${DIAL_TRUNK},$,1)})
exten => s,n,Set(the_num=${CUT(OUT_${DIAL_TRUNK},$,2)}) ; this is where we expect to find string OUTNUM
exten => s,n,Set(post_num=${CUT(OUT_${DIAL_TRUNK},$,3)})
exten => s,n,GotoIf($["${the_num}" = “OUTNUM”]?outnum:skipoutnum) ; if we didn’t find “OUTNUM”, then skip to Dial
exten => s,n(outnum),Set(the_num=${OUTNUM}) ; replace “OUTNUM” with the actual number to dial
exten => s,n(skipoutnum),Dial(${pre_num:4}${the_num}${post_num},300,${DIAL_TRUNK_OPTIONS})
exten => s,n,Goto(s-${DIALSTATUS},1)

exten => s,n(chanfull),Noop(max channels used up)

exten => s-BUSY,1,NoOp(Dial failed due to trunk reporting BUSY - giving up)
exten => s-BUSY,2,Busy(20)

exten => s-NOANSWER,1,NoOp(Dial failed due to trunk reporting NOANSWER - giving up)
exten => s-NOANSWER,2,Playtones(congestion)
exten => s-NOANSWER,3,Congestion(20)

exten => s-CANCEL,1,NoOp(Dial failed due to trunk reporting CANCEL - giving up)
exten => s-CANCEL,2,Playtones(congestion)
exten => s-CANCEL,3,Congestion(20)

exten => _s-.,1,NoOp(Dial failed due to ${DIALSTATUS} - failing through to other trunks)

exten => h,1,Macro(hangupcall)

; Adds a dynamic agent/member to a Queue
; Prompts for call-back number - in not entered, uses CIDNum

[from-internal]
; applications are now mostly all found in from-internal-additional in _custom.conf
include => parkedcalls
include => from-internal-custom
;allow phones to dial other extensions
include => ext-fax
;allow phones to access generated contexts
;
; MODIFIED (PL)
;
; Currently the include for findmefollow is being auto-generated before ext-local which is the desired behavior.
; However, I haven’t been able to do anything that I know of to force this. We need to determine if it should
; be hardcoded into here to make sure it doesn’t change with some configuration. For now I will leave it out
; until we can discuss this.
;
include => from-internal-additional
include => ext-local-confirm
; This causes grief with ‘#’ transfers, commenting out for the moment.
; include => bad-number
exten => s,1,Macro(hangupcall)
exten => h,1,Macro(hangupcall)

;------------------------------------------------------------------------
; [bad-number]
;------------------------------------------------------------------------
; This is where all calls go that don’t have any other destination provided
;
;------------------------------------------------------------------------

[from-zaptel]
exten => _X.,1,Set(DID=${EXTEN})
exten => _X.,n,Goto(s,1)
exten => s,1,NoOp(Entering from-zaptel with DID == ${DID})
; Some trunks require a RINGING be sent before an Answer.
exten => s,n,Ringing()
; If ($did == “”) { $did = “s”; }
exten => s,n,Set(DID=${IF($["${DID}"= “”]?s:${DID})})
exten => s,n,NoOp(DID is now ${DID})
exten => s,n,GotoIf($["${CHANNEL:0:3}"=“Zap”]?zapok:notzap)
exten => s,n(notzap),Goto(from-pstn,${DID},1)
; If there’s no ext-did,s,1, that means there’s not a no did/no cid route. Hangup.
exten => s,n,Macro(hangup)
exten => s,n(zapok),NoOp(Is a Zaptel Channel)
exten => s,n,Set(CHAN=${CHANNEL:4})
exten => s,n,Set(CHAN=${CUT(CHAN,-,1)})
exten => s,n,Macro(from-zaptel-${CHAN},${DID},1)
; If nothing there, then treat it as a DID
exten => s,n,NoOp(Returned from Macro from-zaptel-${CHAN})
exten => s,n,Goto(from-pstn,${DID},1)
exten => fax,1,Goto(ext-fax,in_fax,1)[/quote]

Thanks

Hi there.
Did you manage to get anything from the details I posted?:roll:

I am so stuck it hurts :cry:

When I dial into the PSTN line from another phone the iax/sip extension phone rings, however when I answer it the call does not get picked up and the person dialing continues to hear ringing.

I have also yet to get outbound calling working either.

Help.

Thanks