Version: r1390
Under some conditions, there is a mismatch in the includes contexts when disabling a provider.
I use 2 SIP accounts on the same provider (actually it is the same IP address but different vendors)
Here is the config when they are both enabled:
pbx*CLI> dialplan show SIP-PHONE-1509994276497f5a82e776e
[ Context 'SIP-PHONE-1509994276497f5a82e776e' created by 'pbx_config' ]
Include => 'internal' [pbx_config]
Include => 'SIP-PROVIDER-3768425774b8e72a429819' [pbx_config]
Include => 'SIP-PROVIDER-1558117932494632c8dc380' [pbx_config]
Include => 'outgoing-uri' [pbx_config]
pbx*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
810/810 10.25.9.192 D N 5060 OK (10 ms)
SIP-PROVIDER-155811793249 85.119.188.3 N 5060 OK (45 ms)
SIP-PROVIDER-3768425774b8 85.119.188.3 N 5060 OK (45 ms)
and here is the problem when I disable the first one
pbx*CLI> dialplan show SIP-PHONE-1509994276497f5a82e776e
[ Context 'SIP-PHONE-1509994276497f5a82e776e' created by 'pbx_config' ]
Include => 'internal' [pbx_config]
Include => 'SIP-PROVIDER-3768425774b8e72a429819' [pbx_config]
Include => 'outgoing-uri' [pbx_config]
pbx*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
810/810 10.25.9.192 D N 5060 OK (7 ms)
SIP-PROVIDER-155811793249 85.119.188.3 N 5060 OK (58 ms)
As you can see
the wrong provider context is included in the phones dialplan.
The context SIP-PROVIDER-3768425774b8e72a429819 is included while the only active provider's context is SIP-PROVIDER-1558117932494632c8dc380
It seems this is due to a different sort order between the sip peer list (ordered by context name ie. SIP-PROVIDER-...) and the included context order (sorted by Provider Name ie. Nomado).
If I change the providers name by prefixing them with a number, making them matching the context name sort order, the correct context is included.
Btw I'm always putting a prefix in my provider name to control the dialplan priority.