[Asterisk-Users] Realtime Static/Dynamic Preference

Douglas Garstang dgarstang at oneeighty.com
Tue Dec 27 13:17:50 MST 2005


Actually, who says this is supposed to work anyways? When Asterisk fails to connect to the database when querying a number, does it have the logic to then fail over and try the same number in contexts that follow? If it doesn't, then there's no point.

-----Original Message-----
From: Douglas Garstang 
Sent: Tuesday, December 27, 2005 1:16 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Realtime Static/Dynamic Preference


Yes, I tied something like this. I included the database context first (the one that has the realtime switch) followed by the context that has the extensions locally. I shut the database down and Asterisk returns fast busy when dialling the number. Doesn't appear to work.

[OffNet]
#include "inc/OffNet/master.conf"

[OnNetFlat]
exten => 3250071,1,Dial(SIP/a00090101,20,tr)
exten => 3250072,1,Dial(SIP/a00090201,20,tr)
exten => 3250073,1,Dial(SIP/a00090301,20,tr)

[OnNetDB]
switch => Realtime/OnNet at extensions

[OffNet]
#include "inc/OffNet/master.conf"

[Master]
include => OnNetDB
include => OnNetFlat

;
; User enters here.
;
[c_a00090101]
include => a00090101
include => Company1
include => Master
include => OffNet




-----Original Message-----
From: Kevin P. Fleming [mailto:kpfleming at digium.com]
Sent: Tuesday, December 27, 2005 10:58 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Realtime Static/Dynamic Preference


Douglas Garstang wrote:
> It seems that Asterisk gives priority to extensions in the extensions.conf file over what's access in the db via the switch statement. For example, if you have an entry in extensions.conf and realtime for the same extension, Asterisk won't look in the db. 

This is true in general for Asterisk dialplans, it has nothing to do 
with Realtime.

Extensions defined in the context itself are always searched before any 
included contexts or switches. If you want to control the search order, 
you must put _all_ your extensions into separate contexts (by type or 
whatever other grouping you wish) and then use a 'master' context with 
include/switch statements in the order you wish them to be processed.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list