Problem with external number in Ring group & Follow Me in FreePBX 2.4.0.2

I am trying to add an external number in the extension list of the Ring Group .

The string that I entered is 813641895504#
(external number that it is suppose to call is 13641895504 , and 8 is the prefix for it to route the outbound call through Zap/4 ).

I have two Zap channels that has PSTN line connected… Zap/3 and Zap/4.

In my test … a caller will call the PSTN number bound to Zap/3 … zap/3 inbound route is set to call Ring Group 600 which has one entry in the extension list : 813641895504#

so theorectically when Ring Group 600 is executed, it should place a call to External phone number13641895504 by setting up the call through Zap/4

But as you can see from the trace I attached, Zap/4 is never called.

I have reproduced the same problem in Follow Me.

Module version:

Core: 2.4.0.2
FreePBX framework : 2.4.0.1

Ring Group : 2.4.0.2
Follow Me : 2.4.14.2

Any assistance will be greatly appreciated

– AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] NoOp(“Zap/3-1”, “No recording needed”) in new stack
– Executing [[email protected]:12] Set(“Zap/3-1”, “RingGroupMethod=ringall”) in new stack
– Executing [[email protected]:13] Macro(“Zap/3-1”, “dial|20|tr|813641895504#”) in new stack
– Executing [[email protected]:1] GotoIf(“Zap/3-1”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing [[email protected]:3] AGI(“Zap/3-1”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi: Caller ID name is ‘13917229072’ number is '13917229072’
dialparties.agi: USE_CONFIRMATION: 'FALSE’
dialparties.agi: RINGGROUP_INDEX: ''
dialparties.agi: Methodology of ring is ‘ringall’
– dialparties.agi: Added extension 813641895504# to extension map
– dialparties.agi: Extension 813641895504# cf is disabled
> dialparties.agi: extnum 813641895504# has: cw: 0; hascfb: 0 [] hascfu: 0 []
> dialparties.agi: Built External dialstring component for 813641895504: Local/[email protected]/n
– dialparties.agi: Filtered ARG3: 813641895504
> dialparties.agi: NODEST: 600 adding M(auto-blkvm) to dialopts: trM(auto-blkvm)
> dialparties.agi: NODEST: 600 blkvm enabled macro already in dialopts: trM(auto-blkvm)
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:7] Dial(“Zap/3-1”, “Local/[email protected]/n|20|trM(auto-blkvm)”) in new stack
– Called [email protected]/n
– Executing [[email protected]:1] Macro(“Local/[email protected],2”, “user-callerid|SKIPTTL|”) in new stack
– Executing [[email protected]:1] NoOp(“Local/[email protected],2”, “user-callerid: 13917229072 13917229072”) in new stack
– Executing [[email protected]:2] Set(“Local/[email protected],2”, “AMPUSER=13917229072”) in new stack
– Executing [[email protected]:3] GotoIf(“Local/[email protected],2”, “1?report”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing [[email protected]:13] NoOp(“Local/[email protected],2”, “TTL: 64 ARG1: SKIPTTL”) in new stack
– Executing [[email protected]:14] GotoIf(“Local/[email protected],2”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [[email protected]:23] NoOp(“Local/[email protected],2”, “Using CallerID “13917229072” <13917229072>”) in new stack
– Executing [[email protected]:2] Set(“Local/[email protected],2”, “_NODEST=”) in new stack
– Executing [[email protected]:3] Macro(“Local/[email protected],2”, “record-enable|13917229072|OUT|”) in new stack
– Executing [[email protected]:1] GotoIf(“Local/[email protected],2”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] AGI(“Local/[email protected],2”, “recordingcheck|20080620-010409|1213895049.121”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20080620-010409|1213895049.121: No AMPUSER db entry for 13917229072. Not recording
– AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] NoOp(“Local/[email protected],2”, “No recording needed”) in new stack
– Executing [[email protected]:4] Macro(“Local/[email protected],2”, “dialout-trunk|3|13641895504||”) in new stack
– Executing [[email protected]:1] Set(“Local/[email protected],2”, “DIAL_TRUNK=3”) in new stack
– Executing [[email protected]:2] ExecIf(“Local/[email protected],2”, “0|Authenticate|”) in new stack
– Executing [[email protected]:3] GotoIf(“Local/[email protected],2”, “0?disabletrunk|1”) in new stack
– Executing [[email protected]:4] Set(“Local/[email protected],2”, “DIAL_NUMBER=13641895504”) in new stack
– Executing [[email protected]:5] Set(“Local/[email protected],2”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“Local/[email protected],2”, “GROUP()=OUT_3”) in new stack
– Executing [[email protected]:7] GotoIf(“Local/[email protected],2”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“Local/[email protected],2”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“Local/[email protected],2”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“Local/[email protected],2”, “outbound-callerid|3”) in new stack
– Executing [[email protected]:1] ExecIf(“Local/[email protected],2”, “1|SetCallingPres|allowed_not_screened”) in new stack
== Spawn extension (macro-outbound-callerid, s, 1) exited non-zero on ‘Local/[email protected],2’ in macro ‘outbound-callerid’
== Spawn extension (macro-outbound-callerid, s, 1) exited non-zero on ‘Local/[email protected],2’ in macro ‘dialout-trunk’
== Spawn extension (macro-outbound-callerid, s, 1) exited non-zero on ‘Local/[email protected],2’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [[email protected]:8] Set(“Zap/3-1”, “DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing [[email protected]:14] Set(“Zap/3-1”, “RingGroupMethod=”) in new stack
– Executing [[email protected]:15] GotoIf(“Zap/3-1”, “0?nodest”) in new stack
– Executing [[email protected]:16] Set(“Zap/3-1”, “__NODEST=”) in new stack
– Executing [[email protected]:17] DBdel(“Zap/3-1”, “BLKVM/600/Zap/3-1”) in new stack
– DBdel: family=BLKVM, key=600/Zap/3-1
– Executing [[email protected]:18] Goto(“Zap/3-1”, “app-blackhole|hangup|1”) in new stack
– Goto (app-blackhole,hangup,1)
– Executing [[email protected]:1] NoOp(“Zap/3-1”, “Blackhole Dest: Hangup”) in new stack
– Executing [[email protected]:2] Hangup(“Zap/3-1”, “”) in new stack
== Spawn extension (app-blackhole, hangup, 2) exited non-zero on ‘Zap/3-1’
– Hungup ‘Zap/3-1’

The trace you have attached doesn’t show in the forum, or am I missing a link?

It looks like our messages crossed

How are your extensions defined? Are they custom or Zap ?

Thanks for responding …

I have reposted the trace in the"Body" of the forum comment hope you can see it now.

BTW the outbound route through Zap/4 ( when a number is prefixed with 8) has been thoroughly tested (successfully) as I can manually dial out by punching 813641895504 on an extension phone ( attached to Zap/1 or Zap/2 ) … and I can see from the trace that the call is placed through Zap/4 , But when this is done through Ring Group or Follow Me. it just won’t work

the extension are ZAP. Not custom device.

Please note that I did not setup an “extension number” that map to an external phone number …which will then require setting up of custom device.

I simply added the string 813641895504# ( as suggested by the Tooltip ) to the “Extension List” in Ring Group

for example the extension list will look like:

101
201
13641895504#

assuming that 101 & 102 are extensions.

errata …

the extension list may look like this

101
201
813641895504#

so that it is suppose to ring ext 101 , 102 and also ring the external mobile phone 13641895504… 101 and 102 will ring but not 13641895504.

Usually the incoming calls fro a trunk should end up in the context from-trunk.

This is the content of the Zapat-auto.conf. and as you can see the context for the inbound Zap channel is from-Zaptel ( I am using whatevcer tha t Freepbx generates through their GUI… no custom context whatsoever. The install is fPBX_in_a FLASH ( PIAF) .

Zapat-auto.conf.

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

signalling=fxo_ks
; Note: this is an extension. Create a ZAP extension in AMP for Channel 2
context=from-internal
group=1
channel => 2

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

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

extensions.conf

[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)

extensions_additional.conf ( this show the Ring Group 600 which is where I defined the external phone ( a mobile) to dial )

[ext-group]
include => ext-group-custom
exten => 600,1,Macro(user-callerid,)
exten => 600,n,GotoIf($[“foo${BLKVM_OVERRIDE}” = “foo”]?skipdb)
exten => 600,n,GotoIf($["${DB(${BLKVM_OVERRIDE})}" = “TRUE”]?skipov)
exten => 600,n(skipdb),Set(__NODEST=)
exten => 600,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
exten => 600,n,Set(__BLKVM_BASE=${EXTEN})
exten => 600,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
exten => 600,n(skipov),Set(RRNODEST=${NODEST})
exten => 600,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 600,n,Set(RecordMethod=Group)
exten => 600,n,Macro(record-enable,813641895504#,${RecordMethod})
exten => 600,n,Set(RingGroupMethod=ringall)
exten => 600,n(DIALGRP),Macro(dial,20,${DIAL_OPTIONS},813641895504#)
exten => 600,n,Set(RingGroupMethod=)
exten => 600,n,GotoIf($[“foo${RRNODEST}” != “foo”]?nodest)
exten => 600,n,Set(__NODEST=)
exten => 600,n,dbDel(${BLKVM_OVERRIDE})
exten => 600,n,Goto(app-blackhole,hangup,1)
exten => 600,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})

; end of [ext-group]

The ring group is running fine. There is your number being dialed properly:

-- Executing [[email protected]:4] Macro("Local/[email protected],2", "dialout-trunk|3|13641895504||") in new stack

Some thing is breaking when you hit macro-outbound-callerid, you may have something corrupt there. Here is your issue:

== Spawn extension (macro-outbound-callerid, s, 1) exited non-zero on 'Local/[email protected],2' in macro 'outbound-callerid'
== Spawn extension (macro-outbound-callerid, s, 1) exited non-zero on 'Local/[email protected],2' in macro 'dialout-trunk'
== Spawn extension (macro-outbound-callerid, s, 1) exited non-zero on 'Local/[email protected],2'
== Everyone is busy/congested at this time (1:0/0/1)

Everything leading up to that point is fine. Why don’t you make the same call that say is working and post the CLI from that.

I am experiencing the same problem with Ring Group 2.4.0.2 and Followme 2.4.14.2. This issue just began after the recent upgrade. This is a serious problem and I hope someopne will correct it FAST. I have multiple servers and many customers experiencing this issue. Someone please help.

Thanks,

John

if you can please provide a trace of a direct call made that succeeds and the failed call to the same number when using the ringgroup/callforward we might be able to see what is going on.

r5817, r5818

pull the new core module just published 2.4.0.3

Thanks Philippe for responding.

Before I try to update to new core module just published 2.4.0.3,

It may be interesting to note that the same problem exist if I define a virtual extension 650 ( under Custom device that map to the same external cell phone to dial …Local/[email protected]

I can successfully call this mobile by calling extension 650 from say another extension phone 101 and the call will go out to this mobile perfectly. Similarly if some call my inbound zap channel and this is configured to be answered by say extension 101, I can also successfully “bridge” this call to ext 650 ( which will dial out o the cellular)…

Now one more experiment that seems to indicate that thi smay not be an issued confined to Ring Group or Follow Me is when I configure my inbound route to be answered by Extension 650… so thgeorectically whensome call into the inbound zap channel… extension 650 which is mapped to cellular phone will ring. But this is NOT the case.

I have been working all night and day on this problem… and just woke up. I shall update to the latest core…and will post result shortly.

Updating to new core module just published 2.4.0.3, Fixed all the issues mentioned in this post. Thanks a million !

However now there is a new problem I have to deal with…

in the FollowMe , Zap/4 is the outside caller inbound channel and Zap/3 is used by FollowMe to dial out to the cellular… so when caller call in from Zap/4 the cellular can now be successfully dial out to when I enter the string
813641895504# in the “Extension List”.

But when Cellular 13641895504 answered the call and then hang up…

both ZAP/4 and Zap/3 cannot accept further calls. ( when someone call into Zap/4 from external will hear that it keep ringing… but no trace whatsoever …and no activities appear on the Asterisk Console…

and when someone try to call in to Zap/3    there is no ringing at all..        seems that Zap/3  went dead or got lock up..and similarly there is no  activities on Asterisk console.  ( I use a sort of Y-cable  so that the PSTN line will  go into Zap/3 port and also a standalone analog phone...   there is now no dialtone whatsoever  on this independent phone..  so this messup not just Asterisk but the line itself)  

I thought Asterisk is dead … but if I life the handset of the extension phone connected to extension Zap/1 and Zap/2 the console wil immediately show that "starting Simple switch on Zap/1-1 "…

So it seems that Asterisk is not completely dead …

Asterisk will NOT recover from this situation after waiting for what seems like eternity… I have to reboot the entire system…

This is what the trace looks ENDS with when it successfully “Follow Me” the call to cellular and Zap3 & 4 goes dead.

============

– Zap/2-1 is ringing
> fixlocalprefix: Using pattern 9|.
– AGI Script fixlocalprefix completed, returning 0
– Executing [[email protected]:13] Set(“Local/[email protected] l-0c20,2”, “OUTNUM=13641895504”) in new stack
– Executing [[email protected]:14] Set(“Local/[email protected] l-0c20,2”, “custom=ZAP/3”) in new stack
– Executing [[email protected]:15] GotoIf(“Local/[email protected] rnal-0c20,2”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing [[email protected]:17] Macro(“Local/[email protected] nal-0c20,2”, “dialout-trunk-predial-hook|”) in new stack
– Executing [[email protected]:18] GotoIf(“Local/[email protected] rnal-0c20,2”, “0?bypass|1”) in new stack
– Executing [[email protected]:19] GotoIf(“Local/[email protected] rnal-0c20,2”, “0?customtrunk”) in new stack
– Executing [[email protected]:20] Dial(“Local/[email protected] al-0c20,2”, “ZAP/3/13641895504|300|”) in new stack
– Called 3/13641895504
– Zap/2-1 is ringing
– Zap/3-1 answered Local/[email protected],2
– Local/[email protected],1 answered Zap/4-1
– Hungup ‘Zap/2-1’
– Executing [[email protected]:1] Set(“Local/[email protected] 20,1”, “__MACRO_RESULT=”) in new stack
– Executing [[email protected]:2] Set(“Local/[email protected] 20,1”, “__CWIGNORE=”) in new stack
– Executing [[email protected]:3] DBdel(“Local/[email protected] 0c20,1”, “BLKVM/201/Zap/4-1”) in new stack
– DBdel: family=BLKVM, key=201/Zap/4-1

This could be a problem with dial progress detection,

If I’m correct, the situation at the end of above trace is that a call on zap/4 is connected to zap/3, so there is a ‘conversation’ between zap/3 and zap/4 . There are no Hungups on Zap/3 and/or Zap/4 detected.

See http://forums.digium.com/viewtopic.php?p=6758&sid=4791c79e3e92e5abb2d8f1e492f6ba8a

Please note that this is and old forum message, things might have changed since. Since this is a digium card, they are the experts on this, so please contact them.

You are absolutely right that there is a hanging_up problem.

Because if I issue a soft hangup command at Asterisk CLI ( Soft hangup Zap/3-1) … both Zap/3 & Zap/4 gets hangup and can once again accept inbound calls.

While what I detailed earlier relates to FollowMe, I did also reproduce the problem in another manner as follows:

Outside caller dial into Zap/4 ( where a PSTN line is attached) , the call is routed to ring an extension phone ( say Extension 201 ) attached to Zap/2. Receptionist pickup the phone speak to the Caller… Receptionist then do a FlashHOOK on the Phone set ( Flash Or R button) , this put the Caller on hold … … and Receptionist hear a dial tone and dial extension 650 ( Which is actually mapped to a Sales staff mobile phone)…

Asterisk place this leg of the call through Zap/3 ( also with a PSTN line ) and sales staff answer call on his mobile and agree to speak to caller. Receptionist hang up her phone set ( i.e hang up Extension 201) and the call session is now between Caller and sales staff mobile.

( or if the sales staff contacted thru his mobile decline the call, receptionist will FlashHook again and speak to the caller).

So what I am perplexed is that once the Caller and sales staff mobile is " bridged"… both Zap/3 and Zap/4 should be out of the picture and should be hungup… and why then is asterisk unable to know that it should then hangup zap/3 and zap/4 ?

Is this not then an issue with Dialplan Rather than Zap hardware. ?

The logic seems straightforward… bridge the two external call… then hangup zap/3 and Zap/4 .( I am not a Telephony expert and assume that once the two external parties are successfully bridge then this voice sessions happens directly bewteen the 2 external phone ? Or may be I am wrong )

By the way I have to add that the Zap hardware of this setup has no problem detecting mobile or external call hangup in simple scenario of a direct call between a Zap and and external party… whenever external party hangup… Zap channel is hungUp very quickly.

Another reason why I doubt that it is a Zap hardwaree issue is because I have been using this same computer and zap with Trixbox 1.0 for almost a year… and the above scenario of receptionist flashhooking calls … happens very regularly in my environment. While there are occasional issues… in general it has been working quite well until I reinstalled the harddisk with PBX_in_aFlash V1.2 which has Asterisk 1.4 and FreePBX 2.4.

Now with this new setup… it will result in 100% of the cases requiring me to issue a soft hangup to free Zap/3 & 4. So in short it is virtually impractical to route call to external phone.

I’m not sure what is going on with your hung calls and unfortunately don’t have the time to dig into the traces right now (but there are plenty of knowledgeable people around here who probably can). I can say that the issue has nothing to do with the recent bug that was fixed. I can also suspect that it is not related to the dialplan as this part of the dial plan has remained substantially the same.

When Dial options t, T", “h”, “H”, “w”, “W” or “L” (with multiple arguments) are applied, Asterisk will remain in the media path. This is because with these options asterisk needs to be able to react on certain signals, e.g. a transfer request. Therefor it can’t do a native bridge.

When you moved from trixbox to piaf, did you keep your original zap configuration files (zaptel, zapata and their includes)? If they were renewed, and you still have your old ones, please check for differences.

You can also check on the asterisk.org forum and search in the forum for tdm400p. There are a lot of hits.

Also, the proper configuration might be very well depending on the country you live in and sometimes even the region and/or the telco. There are differences in signaling.