[asterisk-users] Realtime SIP registration for multiple Asterisk servers

Atis Lezdins atis at iq-labs.net
Mon Jun 2 09:08:06 CDT 2008


On Mon, Jun 2, 2008 at 4:24 PM, Mindaugas Kezys <mkezys at gmail.com> wrote:
> I need this solution and I'm interested in developing such functionality.
>
> What would be the best way to do this, how do you think?
>
> Sip reload is a must. I can initiate it through GUI using AMI.
>
> I'm not familiar with #exec stuff and can't find it described anywhere.
>
> If I understand you correctly - it is possible to include some script in
> sip.conf file which can generate "registry =>" lines from DB?
>
> That would be the solution. No additional development would be necessary.
>
> Can somebody point me to the info about #exec stuff?

Hi,

I haven't played with it, but as i've heard, you should add #exec
my_script at top of file, and as i just found in google - add
execincludes=yes in asterisk.conf

Then, the script "my_script" should just print corresponding config
lines in stdout, which will be processed by Asterisk.

Regards,
Atis

>
> Regards,
> Mindaugas Kezys
> http://www.kolmisoft.com
>
>
>> -----Original Message-----
>> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
>> bounces at lists.digium.com] On Behalf Of Atis Lezdins
>> Sent: Monday, June 02, 2008 2:54 PM
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> Subject: Re: [asterisk-users] Realtime SIP registration for multiple
>> Asterisk servers
>>
>> On Mon, Jun 2, 2008 at 2:11 PM, Mindaugas Kezys <mkezys at gmail.com>
>> wrote:
>> > Hello,
>> >
>> > We are building solution from multiple Asterisk servers. They are
>> using
>> > Realtime. Servers can be added dynamically over GUI.
>> >
>> > Each server can register to different provider/carrier over SIP.
>> >
>> > Question would be: how to make it work using pure Realtime - without
>> editing
>> > .conf files?
>> >
>> > We can't use same sip.conf in the Realtime database because servers
>> register
>> > to different provider/carriers and for other server-specific options
>> > (externip/etc).
>> >
>> > That could be possible if only 1 Aserisk server would be in the
>> system. What
>> > to do with many Asterisk servers?
>> >
>> > Is here any workaround to get registration work with different
>> servers using
>> > only Realtime?
>> >
>>
>> Hi Mindaugas,
>>
>> well, unfortunately there is no way how to add "register" entries in
>> realtime. Main problem behind this is that those entries are read on
>> asterisk startup and if You would want to add some peer dynamically,
>> Asterisk would need to get notified about this.
>>
>> Only solution that could work is generating "register =>" entries from
>> database by custom script in "#exec" (i suppose You have to enable
>> execincludes in asterisk.conf). So, upon start or reload of chan_sip
>> asterisk will execute your script, which would return correct
>> providers. So, after adding provider dynamically, You would need to
>> reload chan_sip.
>>
>> If you would be interested in developing some kind of mechanism to
>> allow reading "register" entries from realtime, I could assist You in
>> some way, as this would be useful to me too, but specification of this
>> should be first discussed within asterisk-dev.
>>
>> Regards,
>> Atis
>>
>> --
>> Atis Lezdins,
>> VoIP Project Manager / Developer,
>> atis at iq-labs.net
>> Skype: atis.lezdins
>> Cell Phone: +371 28806004
>> Cell Phone: +1 800 7300689
>> Work phone: +1 800 7502835
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-users mailing list