[Asterisk-Users] Asterisk realtime extensions context inclusion

bbench at mail.bg bbench at mail.bg
Mon Nov 14 04:39:34 MST 2005


Don't know will this do, but a simple comparison 
may give you a hint:
1.2-rc2 extentions.conf
[default]
switch => Realtime/internal at extentions
switch => Realtime/astcc at extentions
;switch => Realtime/test at extentions

1.0.9 extentions.conf
[default]
include => astcc
include => internal
[astcc]
exten => _011N.,1,Set(CALLERID(name)="${CALLERIDNAME}" - ${CALLERIDNUM})
exten => _011N.,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4)
exten => _011N.,3,Hangup
[internal]
exten => _4XXX,1,Dial(sip/${EXTEN},20,r)
or_whatever => _way, you, use
Both do the same job. See how simple is with realtime?
You could do also:
[default]
switch => Realtime/internal at extentions
switch => Realtime/astcc at extentions
[default_vonage]
switch => Realtime/internal at extentions
[default_sipgate]
switch => Realtime/internal at extentions
Hope it helps?
benchev

On Monday 14 November 2005 09:44, Daniel Clark wrote:
> Thanks for the reply, it's an approach I didn'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'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's possible to include all the information in each
> context, however I'm dealing with 15,000 users and would like a database
> small enough to fit on the hard disk!
>
>
>
> 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 => 1,1,Goto(context2) or something like
> that?
>
>
>
> I have to stick with the database option as there are other applications
> that need quick access to the information it holds. It'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.
>
>
>
>   _____
>
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of snacktime
> Sent: 14 November 2005 07:24
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] Asterisk realtime extensions context
> inclusion
>
>
>
>
>
> On 11/13/05, Daniel Clark <clarkd2 at cs.man.ac.uk> wrote:
>
> Hi
>
>
>
> 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.
>
>
> You can't.  Since those other contexts are in the database, why not just
> select them and then insert them into the newly created context?
>
> Or better yet dump realtime and generate extensions.conf from your own
> database schema.   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.
>
> Asterisk doesn't handle database failures very well.  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.  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.  I still think it's
> a good idea,  and I don't mean to disparage those who put all the work into
> it, but it's implementation leaves something to be desired.
>
> Chris



More information about the asterisk-users mailing list