The answer is probably "no", but I would like someone else to confirm it.

When using The Asterisk RealTime Architecture, can context work in sip.conf like it does for extensions.conf ?

switch => Realtime/[context]@[family][/options]

More specific, is there a way to use a single table and limit the query results to a specific subset for sip.conf ?
I know this can be solved using VIEW in MySQL, but I want to avoid that.

WORKS: SELECT * FROM extensions.conf WHERE context = [context];
DOES NOT WORK: SELECT * from sip.conf WHERE context = [context];

Below, you can see how it works for extensions and does NOT work on the context field of the sippeers table, is there any field that can be used?


Sincerely,
Brian LaVallee


---===
;# extconfig.conf
;
[settings]
;
sippeers => mysql,database,sippeers
moresippeers => mysql,database,moresippeers
extensions => mysql,database,extensions
other => mysql,database,other
;
; end===---

---===
;# extensions.conf
;
[unique85]
;
switch => Realtime
; Equivalent to: SELECT * FROM database.extensions WHERE context = "unique85";
; - uses current [this] context.
;
switch => Realtime/limited@extensions
; Equivalent to: SELECT * FROM database.extensions WHERE context = "limited";
;
switch => Realtime/specific@other
; Equivalent to: SELECT * FROM database.other WHERE context = "specific";
;
; end ===---

---===
;# sip.conf
;
[general]
;
switch => Realtime
; Equivalent to: SELECT * FROM database.sippeers;
;
switch => Realtime/anything@moresippeers
; Equivalent to: SELECT * FROM database.moresippeers;
; NOT EQUIVALENT TO: SELECT * FROM database.moresippeers WHERE context = "anything";
;
; end ===---

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to