[asterisk-users] Disabling a trunk at runtime

Telium Support Group support at telium.ca
Fri Oct 12 06:59:52 CDT 2018


I have an Asterisk system with 2 trunks (as shown below).  I need to be able
to disable a trunk at runtime. I may not change the dialplan but I can
change sip.conf and reload.

 

Any attempt to dial in the dialplan uses trunk A and trunk B in that order.
Normally calls will route through trunk A, but if I disable A I want calls
to go to trunk B.

 

Is there a creative way to effectively disable a trunk at runtime given
these parameters?  I don't think there is an "enabled" key-value pair for
sip.conf stanzas.  If I change the host key value to 0.0.0.0 and reload will
that effectively cause the dialplan to use trunk B?

 

 

[trunk_A]

context=from-trunk-sip-trunk_A

 

[trunk_A_in]

type=peer

qualify=yes

host=1.2.3.4

context=from-trunk

 

[trunk_B]

context=from-trunk-sip-trunk_B

 

[trunk_B_in]

type=peer

qualify=yes

host=1.2.3.4

context=from-trunk

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20181012/1a691200/attachment.html>


More information about the asterisk-users mailing list