[asterisk-users] call-limit on a per destination basis
Jean-Michel Hiver
jhiver at ykoz.net
Fri Feb 27 06:37:12 CST 2009
Hello
OK I have tried this in my dialplan:
exten => _0262XXXXXX,1,Set(GROUP()=Reunion)
exten => _0262XXXXXX,2,GotoIf(${GROUP_COUNT(Reunion)} > 24 ? 500)
exten => _0262XXXXXX,n,NoOp(This channel is member of group: ${GROUP()})
exten => _0262XXXXXX,n,NoOp(Number of channels is ${GROUP_COUNT(Reunion)})
exten => _0262XXXXXX,n,Set(SPYGROUP=1003)
exten => _0262XXXXXX,n,Dial(IAX2/dedibox-etang-sale/${EXTEN})
exten => _0262XXXXXX,n,Congestion()
exten => _0262XXXXXX,500,NoOp(Total channels congested, retuning NOCAV)
exten => _0262XXXXXX,501,Congestion()
However here's what i see on the CLI:
-- IAX2/dedibox-etang-sale-34 is making progress passing it to
SIP/5060-006edf50
-- IAX2/dedibox-etang-sale-6 is making progress passing it to
SIP/5060-007654f0
-- Executing [0262211459 at route:1] Set("SIP/5060-0070b9d0",
"GROUP()=Reunion") in new stack
-- Executing [0262211459 at route:2] GotoIf("SIP/5060-0070b9d0", "21 > 24 ?
500") in new stack
-- Goto (route,0262211459,500)
-- Executing [0262211459 at route:500] NoOp("SIP/5060-0070b9d0", "Total
channels congested| retuning NOCAV") in new stack
-- Executing [0262211459 at route:501] Congestion("SIP/5060-0070b9d0", "")
in new stack
I am *totally puzzled* with this:
GotoIf("SIP/5060-0070b9d0", "21 > 24 ? 500") in new stack
-- Goto (route,0262211459,500)
What???? GotoIf 21 > 24 returns true????
Any ideas?
Cheers
Jean-Michel.
2009/2/26, Klaus Darilion <klaus.mailinglists at pernau.at>:
>
> I have no clue about IAX, but if IAX does not support it you can program
> it yourself using the GROUP and GROUPCOUNT functions.
>
> regards
> klaus
>
>
> Jean-Michel Hiver wrote:
> > Hello,
> >
> > I use asterisk to to IAX2 trunking between London POP & Reunion Island
> > pop. I would like to know if it's possible to do a kind of call-limit
> > (i.e. restrict to XX) channels but on a per dialcode and / or
> > destination basis.
> >
> >
> > For example:
> >
> > [trunk]
> > ; reunion proper, i want to send no more than 24 channels
> > exten => _0262XXXXXX,1,Dial(IAX2/mytrunk/${EXTEN})
> >
> > ; reunion mobile, i want to send no more than 12 channels
> > exten => _0692XXXXXX,1,Dial(IAX2/mytrunk/${EXTEN})
> > exten => _0693XXXXXX,1,Dial(IAX2/mytrunk/${EXTEN})
> >
> >
> > How would you go about it? Currently my IAX2 peer definition looks like
> > this:
> >
> > # machine in london
> > [mytrunk]
> > type=friend
> > host=$reunion_ip
> > trunk=yes
> > qualify=yes
> > context=route
> >
> > # machine in reunion island
> > [mytrunk]
> > type=friend
> > host=$london_ip
> > trunk=yes
> > qualify=yes
> > context=route
> >
> > I use version Asterisk 1.4.11, production environment currently doing
> > 25,000 minutes / day (that means if i want to upgrade i need to do it on
> > separate servers just in case something goes wrong).
> >
> >
> > Cheers,
> > Jean-Michel.
> >
> >
>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > -- 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
>
>
> _______________________________________________
> -- 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
>
>
--
Jean-Michel Hiver - Synapse co-founder & CTO
GSM +262 692 828 070
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090227/f0217e8c/attachment.htm
More information about the asterisk-users
mailing list