Ticket #2459 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

Max Channels fails with Asterisk 1.4

Reported by: p_lindheimer Assigned to: p_lindheimer
Priority: major Milestone: 2.4
Component: Core - Trunks/Routing Version: 2.3.1
Keywords: Cc:
Confirmation: Need testing Distro:
Backend Engine: Asterisk 1.4.x Distro Ver:
Backend Ver: 1.4.13 SVN Revision (if applicable):

Description

details can be seen here: http://freepbx.org/forum/freepbx/users/maximum-channels-not-working-with-sip-trunk The Asterisk GROUP_COUNT() function is not defaulting to the current default group as defined in the Set(GROUP()=OUT_${ARG1}) statement.

This is really an Asterisk Bug but this provides a fix that will work around it.

The following will force it to work and should be fine even when the Asterisk is fixed.

Index: extensions.conf
===================================================================
--- extensions.conf     (revision 5137)
+++ extensions.conf     (working copy)
@@ -675,7 +675,7 @@
 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(checkmax),GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} > ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)
 exten => s,n(nomax),AGI(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:"
@@ -767,7 +767,7 @@
 exten => s,n,Macro(outbound-callerid,${ARG1})
 exten => s,n,Set(GROUP()=OUT_${ARG1})
 exten => s,n,GotoIf($["${OUTMAXCHANS_${ARG1}}foo" = "foo"]?nomax)
-exten => s,n,GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${ARG1}} ]?nochans)
+exten => s,n,GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} > ${OUTMAXCHANS_${ARG1}} ]?nochans)
 exten => s,n(nomax),Set(DIAL_NUMBER=${ARG2})
 exten => s,n,Set(DIAL_TRUNK=${ARG1})
 exten => s,n,AGI(fixlocalprefix)  ; this sets DIAL_NUMBER to the proper dial string for this trunk

Change History

10/24/07 00:53:12 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.