<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for the reply, it&#8217;s an
approach I didn&#8217;t think of to simply include the information from the
other contexts into where I would be including from. In most cases that would
work, but not in my case. Each user of my system will be able to place outgoing
calls using their own sip connection (as in one they create with sipgate or
vonage etc). To ensure that each user can dial out with their own sip
connection and nobody else&#8217;s they are each getting their own context and
that context is the only place in the dialplan to dial that particular external
sip connection. For a small amount of users it&#8217;s possible to include all
the information in each context, however I&#8217;m dealing with 15,000 users
and would like a database small enough to fit on the hard disk!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Would it not be possible to do something
with the Goto app? In each persons dialplan I can have an extension to catch
internal numbers and then forward to another context using exten =&gt; 1,1,Goto(context2)
or something like that?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I have to stick with the database option
as there are other applications that need quick access to the information it
holds. It&#8217;s not really possible to generate the flat file for all the
contexts when at some times that would mean generating the file over 1,000 a
day and reloads of the database each time. If I can stick with the realtime
database in any way, I would much prefer to.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>snacktime<br>
<b><span style='font-weight:bold'>Sent:</span></b> 14 November 2005 07:24<br>
<b><span style='font-weight:bold'>To:</span></b> Asterisk Users Mailing List -
Non-Commercial Discussion<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Asterisk-Users]
Asterisk realtime extensions context inclusion</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 11/13/05, <b><span style='font-weight:bold'>Daniel
Clark</span></b> &lt;<a href="mailto:clarkd2@cs.man.ac.uk">clarkd2@cs.man.ac.uk</a>&gt;
wrote:</span></font></span><o:p></o:p></p>

<div>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I'm
using asterisk realtime to control all of my extensions. As part of this I need
to be able to dynamically create new contexts and extensions. The new contexts
I create will also include existing contexts. Does anybody know the how to
specify context inclusion for asterisk realtime as the database only has colums
for id, context, exten, priority, app and appdata. </span></font><o:p></o:p></p>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
You can't.&nbsp; Since those other contexts are in the database, why not just
select them and then insert them into the newly created context?<br>
<br>
Or better yet dump realtime and generate extensions.conf from your own database
schema.&nbsp;&nbsp; You could even use the realtime schema with just a couple
of extra fields for things like include files, that way you dont' have to throw
away the work you have already done.<br>
<br>
Asterisk doesn't handle database failures very well.&nbsp; Maybe it's been
fixed now, but for instance a dialplan reload used to wipe out your whole
dialplan if the database was down instead of just skipping the reload.&nbsp; I
spent quite a bit of time writing an application for ARA at one point, only to
toss it all out after seeing how it actually worked.&nbsp; I still think it's a
good idea,&nbsp; and I don't mean to disparage those who put all the work into
it, but it's implementation leaves something to be desired.<br>
<br>
Chris&nbsp; <br>
<br>
<br>
<o:p></o:p></span></font></p>

</div>

</body>

</html>