Limit number of channel for trunk IAX


I have a problem.
I created a trunk IAX on my server to communicate with an other server asterisk. All is ok. If I use “outbound routes”, all is ok, i can limit then number of channels to 1, 2,…

But if I use the file “extensions_custom”, to give 2 ways : one with IAX trunck, then if the 1st is busy, use gateway ISDN, My limit of channels is disable.

This is an example of my extensions_custom :
exten => 02200,2,Dial(IAX2/IAX03/02200)
exten => 02200,3,Dial(SIP/[email protected])

My trunk name IAX is IAX03 and my gateway is “Gateway”.
Calls are ok, but not limited when I use extensions_custom !


I can’t arrive to limit with macro, but I found the parameter “maxcallnumbers=X” that could be good with what I want to do. (in the iax_custom.conf)
But I have seen that on a few server, the number call current is bloqued to 3 and not 0 and on the others, it bloqued to 1 and not 0. Do you have an idea ?
I know there is a little delay before the count increase, but the last is very very very long.

Is that normal ?

Ok, but whera can I put macro-dialout-trunk ? Can I put it in extensions_custom ?
Do you think it could be ok if I found syntax in detail peer of my trunk like call-limit=1 ? Is there a syntax for trunk to limit not with freepbx but with asterisk, to put in detail peers of my trunk or in other file ?

My trunk IAX is ok, but if I can’t limit number of channels, there is no interest, and it will be a big problem.

by writing your own custom dialplan to access your trunks, you are bypassing all the logic that tracks concurrency.

your best bet is to use FreePBX to do what you are trying to do. If that is not an option, go have a look at the macro-dialout-trunk dialplan to see where it counts concurrency and make sure you do the same.


Nobody has an answer for me ??? pleaaaase !!!