Askozia Forums
February 09, 2012, 12:53:13 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: r1390 disabled provider bug: wrong context included  (Read 475 times)
Scapal
Full Member
***

Karma: 3
Posts: 58



View Profile
« on: March 03, 2010, 04:54:19 pm »

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:

Code:
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
Code:
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.
Logged
giovanni.v
Hero Member
*****

Karma: 51
Posts: 666


View Profile
« Reply #1 on: March 03, 2010, 06:07:28 pm »

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)

The developer snaphot based on revision 1395 includes also a fix specific for this problem, try it.

https://wush.net/trac/askozia/changeset/1395
http://downloads.askozia.com/pbx/snapshots/r1395/
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.072 seconds with 19 queries.