Trunks - limiting the number of channels


I have configured my asterisk with freepbx. The cell calls are routed through a sip-gsp gateway with one channel, so I set to 1 the parameter maximum channels in the trunk, if this is busy the next cell call is router with a sip provider.

Now I want to use the sip-gsm gateway for incomming calls to. The problem is:

When an incomming call is in progress and I want to make an outbound gsm call asterisk detect the gsm trunk is busy but is not routing the call vis the sip provider, the call is hanged up.

The problem is related with the maximum incomming calls the parameter is not present in freepbx,

someone knows how to limit that?

thanks in advance


I’ll try it tomorrow, but I understood, so now incoming calls and outgoing calls increase the parameter of channel busy.

thanks again.

I should use allways the autogenerated contexts for my trunks?


only if you need the Max Channels to reflect both incoming and outgoing. If not, it is just un-needed overhead.


thanks for reply.

It says from-trunk-sip-1550000 extensions_additional.conf, this is the content:

include => from-trunk-sip-1550000-custom
exten => _.,1,Set(GROUP()=OUT_11)
exten => _.,n,Goto(from-trunk,${EXTEN},1)

Maybe I have to modify the from-trunk-sip-1550000-custom wich is included in this context? If yes, I don’t know where is it.

Thanks in advance

you should just be able to configure that GSM gateway with:


in place of what is there which is probably:


(or from-trunk).

check the tool-tip for Max Channels on the trunk page for that trunk, it will tell you the context you need to use for inbound calls to have them count against the max channels.

in my case the comment:

was in the Peer Details section of the Trunk’s configuration Page. There is nothing in User Details. I am using a gempro GSM gateway

So I changed the comment to:
(ie as advised in the Tool Tip for Maximum Channels)
and it works as advertised