Defining SIP trunk groups


How do I create a group for my SIP trunks?

I have 12 trunks and several Dial Plans I don’t want to create 36 lines of code. How do I group the SIP trunks into a “group” and then define that “group” in my code.


Try this

towards the bottom.

Thank you for the reply, I have already extensively searched via google. I have clicked thru your link and I still don’t get how I set a global variable? to define a group of SIP trunks. I think this is what I want.

Most of the docs talk about grouping calls etc which is not what I want. Is there an example of what I am trying to do?

Thank you for your time.


Create a macro that all external calls are sent to and. That way you only need to define the trunks once


Thank you for the reply, I only have 2 contexts accessing these trunks so a macro is not really helping me, but you are right if I had a larger system this would be useful.

Am really looking for someone to just give me an example of how to define a group variable for multiple SIP trunks.


AFAIK you cant, Thats why you use a macro.


Ahh probably why I can’t find the answer in google thank you for clearing that up. I guess I will stick to my 30+ lines of code.

Thanks again.