[Asterisk-Users] Asterisk RealTime Question, Please help

Benchev bbench at mail.bg
Tue Mar 14 04:58:02 MST 2006


> > > > 	I was able to install Asterisk and Asterisk-addons and use them
> > > > successfully. But I have a problem now, I have many contexts and it
> > > > looks like Asterisk is unable to find the context given directly in
> > > > Mysql DB unless I specify it in Extensions.conf to switch it to
> > > > RealTime. If I add a new context in Mysql then I have to add it in
> > > > Extensions.conf and reload extensions whenever I need a new context.
> > > > Please tell me if there is a way to avoid all this and make Asterisk
> > > > take contexts directly from Mysql without mentioning that context in
> > > > Extensions.conf. If this is possible then I can make my Asterisk
> > > > RealTime actually and modify contexts directly in Mysql.
> >
> > Idea from the wiki:
> > ; If regcontext is specified, Asterisk will dynamically create and
> > destroy a ; NoOp priority 1 extension for a given peer who registers or
> > unregisters with ; us.  The actual extension is the 'regexten' parameter
> > of the registering ; peer or its name if 'regexten' is not provided. 
> > More than one regexten may ; be supplied if they are separated by '&'. 
> > Patterns may be used in regexten. ;
> > ;regcontext=sipregistrations
> > That means that you should creat a "mother" context in extensions.conf:
> > [sipregistrations]
> >
> > But first I would try to add a field "regcontext" along with
> > "regexten"(which already there) in sip_users table since for the trick to
> > work ... read http://www.voip-info.org/wiki-Asterisk+sip+regcontext
> >
> OK, that will enable the auto generation of a context but as the new
> context won't have a switch statement it doesn't help with this
> problem... I may try writing a "default switch if no matching context
> found" type patch.
Well, it wont generate a context, it would rather "register" the extension of 
the new user under [sipregistrations]

And, maybe now is the time to warn that regexten was created to facilitate
a sip-user extensions' "propagation" within an * network; there is a 
discussion "Clustering" going on the list, see for details.

As for the switch, since "context is optional:
 (switch => Realtime/@realtime_ext) and if left off, RealTime will use the 
current context, in this case "sipregistrations"."
Means:
[sipregistrations]
switch => Realtime/@realtime_ext ;realtime_ext or whatever the table name is

Ok i'am guessing "sans voir" here since I don't understand why so many
contexts are needed?
Hope it helps,
Benchev




More information about the asterisk-users mailing list