[asterisk-users] ARA: realtime: sip.conf: context

Brian LaVallee b.lavallee at globaltank.jp
Tue Dec 3 02:57:31 CST 2013


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 at extensions
; Equivalent to: SELECT * FROM database.extensions WHERE context = 
"limited";
;
switch => Realtime/specific at 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 at moresippeers
; Equivalent to: SELECT * FROM database.moresippeers;
; NOT EQUIVALENT TO: SELECT * FROM database.moresippeers WHERE context = 
"anything";
;
; end ===---

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


More information about the asterisk-users mailing list