All Circuits Are Busy Message When Invalid Number Dialed

jhurff
Posts: 9
Member Since:
2008-04-10

This message is returned to the user when they dial an invalid number. It is confusing because the dialer thinks there is something wrong with the PBX or network connection when in actuality, the number they dialed is not in service. Is this a dial plan issue? How can I correct it so that a more applicable message is returned to the dialer when they "fat finger" the key pad?



atilio
Posts: 288
Member Since:
2006-06-01
You could add a custom

You could add a custom message to the sounds directory and use it on the dial plan when that problem occurs.
/var/lib/asterisk/sounds



onecomms
Posts: 289
Member Since:
2006-10-26
The file you are looking for

The file you are looking for is "all-circuits-busy"
Just replace it with something else & rename it to that!

--

_________________________________
Andy Thompson
1comms
http://www.1comms.co.uk
sales@1comms.co.uk



dodgly
Posts: 47
Member Since:
2007-08-12
The Ideal...

I think there should be two possible paths here--sometimes we do want to say 'all circuits are busy' not 'the number you dialed is not in service...' like...when the circuits are actually busy. :)

I might engage the FreePBX crew on a change to the [macrop-outisbusy] which is the only place the 'all-circuits-busy-now' message is played. Just need a way to determine if it was a fat-finger mistake or some system problem.

Good short-term fix to enhance the message, and it could be more thorough in the explanation of the two possible problems.

--

--Lyle E. Dodge
trixbox.org@lyledodge.com



mrobinson
Posts: 5
Member Since:
2008-02-26
I was wondering if anyone

I was wondering if anyone had a fix for this? We have recently implemented a trixbox setup but miss knowing the call status we received from our old telephone system e.g line dead, line busy etc without the all circuits are busy message.



SkykingOH
Posts: 9678
Member Since:
2007-12-17
There is a patch over at

There is a patch over at FreePBX.org that look encouraging. I did not have a chance to check it out. It's maps a half a dozen or so release codes.

--

Scott

aka "Skyking"



mrobinson
Posts: 5
Member Since:
2008-02-26
I found the relevant post at

I found the relevant post at freepbx.org http://www.freepbx.org/forum/freepbx/users/potential-incorrect-ha... I was wondering where/how I can apply the patch?



PaulOliver
Posts: 20
Member Since:
2006-08-11
We patched this using a

We patched this using a modified copy of the macro-dialout-trunk code. This was copied from the extensions_additional.conf file into a file called extensions_override_freepbx.conf as anything in this override file is used in preference to the normal macro code.

Using this method means you can easily undo any changes by simply deleting the macro from extensions_override_freepbx.conf so the system reverts to the default code (after a restart).

Our current version is:

[macro-dialout-trunk]
include => macro-dialout-trunk-custom
exten => s,1,Set(DIAL_TRUNK=${ARG1})
exten => s,n,ExecIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]],Authenticate,${ARG3})
exten => s,n,GotoIf($["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]?disabletrunk,1)
exten => s,n,Set(DIAL_NUMBER=${ARG2})
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS})
exten => s,n,Set(GROUP()=OUT_${DIAL_TRUNK})
exten => s,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax)
exten => s,n,GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} > ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)
exten => s,n(nomax),GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid)
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS})
exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK})
exten => s,n(skipoutcid),AGI(fixlocalprefix)
exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)})
exten => s,n,GotoIf($[$["${MOHCLASS}" = "default"] | $["foo${MOHCLASS}" = "foo"]]?gocall)
exten => s,n,Set(DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS})
exten => s,n(gocall),Macro(dialout-trunk-predial-hook,)
exten => s,n,GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass,1)
exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk)
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,${DIAL_TRUNK_OPTIONS})
exten => s,n,Noop(HangupClause ${HANGUPCAUSE} Dialstatus ${DIALSTATUS}) ;temp bugfixing line
exten => s,n,Goto(s-${HANGUPCAUSE},1) ;new line
;exten => s,n,Goto(s-${DIALSTATUS},1) ;old line
exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${DIAL_TRUNK},$,1)})
exten => s,n,Set(the_num=${CUT(OUT_${DIAL_TRUNK},$,2)})
exten => s,n,Set(post_num=${CUT(OUT_${DIAL_TRUNK},$,3)})
exten => s,n,GotoIf($["${the_num}" = "OUTNUM"]?outnum:skipoutnum)
exten => s,n(outnum),Set(the_num=${OUTNUM})
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)
; For each ISDN cause code specify the messages/tones to play to the user
exten => s-1,1,Noop(Trunk Hangupcause l - Unallocated/unassigned number)
exten => s-1,n,Playback(ss-noservice,noanswer)
exten => s-1,n,Congestion(20)
exten => s-2,1,Noop(Trunk Hangupcause 2 - No route to specified transit network)
exten => s-2,n,Playback(cannot-complete-network-error,noanswer)
exten => s-2,n,Congestion(20)
exten => s-3,1,Noop(Trunk Hangupcause 3 - No route to destination)
exten => s-3,n,Playback(ss-noservice,noanswer)
exten => s-3,n,Congestion(20)
exten => s-6,1,Noop(Trunk Hangupcause 6 - channel unacceptable)
exten => s-6,n,Playtones(busy)
exten => s-6,n,Busy(20)
exten => s-17,1,Noop(Trunk Hangupcause 17 - user busy)
exten => s-17,n,Playtones(busy)
exten => s-17,n,Busy(20)
exten => s-18,1,Noop(Trunk Hangupcause 18 - no user responding)
exten => s-18,n,Playback(pls-try-call-later,noanswer)
exten => s-18,n,Busy(20)
exten => s-19,1,Noop(Trunk Hangupcause 19 - no answer from user)
exten => s-19,n,Playback(pls-try-call-later,noanswer)
exten => s-19,n,Congestion(20)
exten => s-21,1,Noop(Trunk Hangupcause 21 - call rejected)
exten => s-21,n,Playtones(busy)
exten => s-21,n,Busy(20)
exten => s-22,1,Noop(Trunk Hangupcause 22 - number changed)
exten => s-22,n,Playback(ss-noservice,noanswer)
exten => s-22,n,Congestion(20)
exten => s-27,1,Noop(Trunk Hangupcause 27 - destination out of order)
exten => s-27,n,Playback(cannot-complete-otherend-error,noanswer)
exten => s-27,n,Congestion(20)
exten => s-28,1,Noop(Trunk Hangupcause 28 - invalid number format)
exten => s-28,n,Playback(ss-noservice,noanswer)
exten => s-28,n,Congestion(20)
exten => s-31,1,Noop(Trunk Hangupcause 31 - normal. unspecified)
exten => s-31,n,Playback(ss-noservice,noanswer)
exten => s-31,n,Congestion(20)
exten => s-34,1,Noop(Trunk Hangupcause 34 - no circuit/channel available)
exten => s-34,n,Playback(cannot-complete-network-error,noanswer)
exten => s-34,n,Congestion(20)
exten => s-38,1,Noop(Trunk Hangupcause 38 - network out of order)
exten => s-38,n,Playback(cannot-complete-network-error,noanswer)
exten => s-38,n,Congestion(20)
exten => s-41,1,Noop(Trunk Hangupcause 41 - temporary failure)
exten => s-41,n,Playback(cannot-complete-temp-error,noanswer)
exten => s-41,n,Congestion(20)
exten => s-42,1,Noop(Trunk Hangupcause 42 - switching equipment congestion)
exten => s-42,n,Playback(cannot-complete-network-error,noanswer)
exten => s-42,n,Congestion(20)
exten => s-43,1,Noop(Trunk Hangupcause 43 - access information discarded)
exten => s-43,n,Playback(ss-noservice,noanswer)
exten => s-43,n,Congestion(20)
exten => s-44,1,Noop(Trunk Hangupcause 44 - requested circuit/channel not available)
exten => s-44,n,Playback(ss-noservice,noanswer)
exten => s-44,n,Congestion(20)
exten => s-88,1,Noop(Trunk Hangupcause 88 - incompatible destination)
exten => s-88,n,Playback(ss-noservice,noanswer)
exten => s-88,n,Congestion(20)
exten => s-95,1,Noop(Trunk Hangupcause 95 - invalid message, unspecified)
exten => s-95,n,Playback(ss-noservice,noanswer)
exten => s-95,n,Congestion(20)
exten => s-102,1,Noop(Trunk Hangupcause 102 - recovery on timer expiry)
exten => s-102,n,Playback(cannot-complete-network-error,noanswer)
exten => s-102,n,Congestion(20)
exten => s-111,1,Noop(Trunk Hangupcause 111 - protocol error, unspecified)
exten => s-111,n,Playback(cannot-complete-network-error,noanswer)
exten => s-111,n,Congestion(20)
exten => s-127,1,Noop(Trunk Hangupcause 127 - Inter-working, unspecified)
exten => s-127,n,Playback(cannot-complete-network-error,noanswer)
exten => s-127,n,Congestion(20)
; Back to the existing dialstatus handling
exten => s-BUSY,1,Noop(Dial failed due to trunk reporting BUSY - giving up)
exten => s-BUSY,n,Playtones(busy)
exten => s-BUSY,n,Busy(20)
exten => s-NOANSWER,1,Noop(Dial failed due to trunk reporting NOANSWER - giving up)
exten => s-NOANSWER,n,Playtones(congestion)
exten => s-NOANSWER,n,Congestion(20)
exten => s-CANCEL,1,Noop(Dial failed due to trunk reporting CANCEL - giving up)
exten => s-CANCEL,n,Playtones(congestion)
exten => s-CANCEL,n,Congestion(20)
exten => _s-.,1,GotoIf($["x${OUTFAIL_${ARG1}}" = "x"]?noreport)
exten => _s-.,n,AGI(${OUTFAIL_${ARG1}})
exten => _s-.,n(noreport),Noop(TRUNK Dial failed due to ${DIALSTATUS} - failing through to other trunks)
exten => disabletrunk,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} DISABLED - falling through to next trunk)
exten => bypass,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-trunk-predial-hook)
exten => h,1,Macro(hangupcall,)

The main change is in line 23 where we use the HANGUPCODE rather than the DIALSTATUS to determine what to do. From line 32 onwards we have inserted lines to handle each of the common ISDN hangup codes and play an appropriate message.

For example the hangupcode for a mis-dialed or invalid number is usually 1 which now plays the ss-noservice recording "the number you have dialled is not in service, please check the number and try again".

Paul.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.