[asterisk-users] GROUP() issues for me
Julian Lyndon-Smith
asterisk at dotr.com
Thu Sep 20 18:18:18 CDT 2007
try
Nicholas Blasgen wrote:
> I've got a macro that tries to find the first available SIP trunk to send
> outgoing calls on. It tracks the usage of the lines (since each trunk has a
> call-limit of 2) by using GROUP(). My problem is that once a call switched
> to ANSWER state, ``group show channels`` stops listing it and then my Macro
> starts screwing up because it's sending calls to a line that sometimes is
> full even though GROUP() shows it as being less than 2. I'm tempted to send
> this to the Asterisk Dev team just because I believe it's an issue of the
> GROUP information being released when Asterisk consolidates the channels
> (removes all the MASQ channels) once the call is answered. But maybe it's
> something else so I'll ask here first.
>
> The dialplan setup:
>
> exten => 555,1,Dial(Local/1234567890)
exten => 555,1,Dial(Local/1234567890/n)
note the /n
> exten => _NXXNXXXXXX,1,Macro(which-line,${EXTEN})
>
> [macro-which-line]
> exten => s,1,set(GROUP()=${DIALSTRING})
> exten => s,n,Dial(${DIALSTRING}/1${ARG1})
> Things are a bit more complex, but it's all just logic. The extensions
> above should give a decent representation of what's going on. I think each
> time you switch extensions, Asterisk creates a MASQ channel and that's
> what's causing the issue since the GROUP() is set only at the end, inside
> the macro. Are there any EVENTS for unlocking of GROUPs? Anything I can do
> to better show where this is happening?
>
> I'd love some help if anyone has a guess.
that's my guess
Julian
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
>
> Sign up now for AstriCon 2007! September 25-28th. http://www.astricon.net/
>
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list