<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">The answer is probably "no", but I would like
someone else to confirm it.<br>
<br>
When using The Asterisk RealTime Architecture, can context work in
sip.conf like it does for extensions.conf ?<br>
<br>
</font><font size="-1"><tt>switch =>
Realtime/[context]@[family][/options]</tt></font><font size="-1"><br>
<br>
More specific, is there a way to use a single table and limit the
query results to a specific subset for sip.conf ?</font><br>
<font size="-1"><font size="-1">I know this can be solved using VIEW
in MySQL, but I want to avoid that.<br>
<br>
</font></font><font size="-1"><tt>WORKS: SELECT * F</tt><tt>ROM
extensions.conf WHERE context = [context];</tt><tt><br>
</tt><tt>DOES NOT WORK: SELECT * from sip.conf WHERE context =
[context</tt><tt>];</tt></font><font size="-1"><br>
<br>
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?<br>
<br>
<br>
Sincerely,<br>
Brian LaVallee<br>
<br>
<br>
</font><font size="-1"><tt>---===</tt><tt><br>
</tt><tt>;# extconfig.conf</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>[settings]</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>sippeers => mysql,database,sippeers</tt><tt><br>
</tt><tt>moresippeers => mysql,database,moresippeers</tt><tt><br>
</tt><tt>extensions => mysql,database,extensions</tt><tt><br>
</tt><tt>other => mysql,database,other</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>; end</tt><tt> ===---</tt><tt><br>
</tt><tt><br>
</tt><tt>---===</tt><tt><br>
</tt><tt>;# extensions.conf</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>[unique85]</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>switch => Realtime</tt><tt><br>
</tt><tt>; Equivalent to: SELECT * FROM database.extensions WHERE
context = "unique85";</tt><tt><br>
</tt><tt>; - uses current [this] context.</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>switch => Realtime/limited@extensions</tt><tt><br>
</tt><tt>; Equivalent to: SELECT * FROM database.extensions WHERE
context = "limited";</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>switch => Realtime/specific@other</tt><tt><br>
</tt><tt>; Equivalent to: SELECT * FROM database.other WHERE
context = "specific";</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>; end ===---</tt><tt><br>
</tt><tt><br>
</tt><tt>---===</tt><tt><br>
</tt><tt>
;# sip.conf</tt><tt><br>
</tt><tt>
;</tt><tt><br>
</tt><tt>
[general]</tt><tt><br>
</tt><tt>
;</tt><tt><br>
</tt><tt>
switch => Realtime</tt><tt><br>
</tt><tt>; Equivalent to: SELECT * FROM database.sippeers;</tt><tt><br>
</tt><tt>;</tt><tt><br>
</tt><tt>
switch => Realtime/anything@moresippeers</tt><tt><br>
</tt><tt>; Equivalent to: SELECT * FROM database.moresippeers;</tt><tt><br>
</tt><tt>; NOT EQUIVALENT TO: SELECT * FROM database.moresippeers
WHERE context = "anything";</tt><tt><br>
</tt><tt>
;</tt><tt><br>
</tt><tt>
; end ===---</tt><tt><br>
</tt></font><font size="-1"><br>
</font>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</body>
</html>