[asterisk-users] GROUP() issues for me
Nicholas Blasgen
nicholas at blasgen.com
Thu Sep 20 17:18:36 CDT 2007
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 => _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.
--
/Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070920/1ca3c0f3/attachment.htm
More information about the asterisk-users
mailing list