AW: [Asterisk-Users] auto load SIP peers on startup

Reto Kortas retokortas at gmx.de
Fri Jan 20 07:20:56 MST 2006


Did you solve it?
May be I get some time on weekend to go for it....

reto



-----Ursprüngliche Nachricht-----
Von: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] Im Auftrag von Moises Silva
Gesendet: Mittwoch, 18. Januar 2006 20:24
An: Asterisk Users Mailing List - Non-Commercial Discussion
Betreff: Re: [Asterisk-Users] auto load SIP peers on startup

you mean it did not compile? no time now to check, but i remember
realtime_user() receives a char pointer and returns a sip_user pointer.
"cat" is a char pointer and "user" is a sip_user pointer, it should work
tough. Well any way, i hope you can test my new patch in the night or
tomorrow.

If you solve it, please let me know

Regards

On 1/18/06, Reto Kortas <retokortas at gmx.de> wrote:
> Your patch didn't work, because method invocation 'realtime_user(cat)' 
> is not equal to the method signature ;-)
>
> You are right, the use of a php script is not very smart because we 
> plan to setup a system for many thousand users.
> I also take a look at chan_sip.c to get it fixed but my c programming 
> skills are not very good.
>
> But I have to solve this topic for me...
>
> Reto
>
> -----Ursprüngliche Nachricht-----
> Von: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] Im Auftrag von Moises 
> Silva
> Gesendet: Mittwoch, 18. Januar 2006 15:56
> An: Asterisk Users Mailing List - Non-Commercial Discussion
> Betreff: Re: [Asterisk-Users] auto load SIP peers on startup
>
> No, actually we dont use asterisk realtime, our system saves in file 
> the extensions and executes "sip reload" and other funny stuff 
> everytime a new extensions is added or modified. The patch was a quick 
> & dirty idea that just came to my mind in the moment i saw your post 
> because i think in the future could be helpfull to us, and besides is 
> fun ;) . Yesterday i played a little bit more with chan_sip.c, may be 
> in the night i will post again a complete patch as a solution, i think 
> i got it. Ah, a simple solution without the need of writing patchs, 
> could be start a php script everytime asterisk starts, the script will 
> execute "sip show peer XX" where XX is a peer name/extension, that 
> will cause asterisk load the realtime peer if its not already loaded.
> Of course, for many extensions could not be suitable.
>
> Regards
>
> On 1/18/06, Reto Kortas <retokortas at gmx.de> wrote:
> > Thanks for the patch, I'll give him a try.
> >
> > Did you use the patch for yourself?
> > How does your system fetching the peers from db on startup?
> > Did you use the stupid dummy entries in sip.conf ;-)?
> >
> >
> > Thx,
> >
> > reto
> >
> >
> >
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: asterisk-users-bounces at lists.digium.com
> > [mailto:asterisk-users-bounces at lists.digium.com] Im Auftrag von 
> > Moises Silva
> > Gesendet: Dienstag, 17. Januar 2006 20:27
> > An: Asterisk Users Mailing List - Non-Commercial Discussion
> > Betreff: Re: [Asterisk-Users] auto load SIP peers on startup
> >
> > by the way, you MUST create peer contexts in sip.conf.
> > For example, if you have peer 10 in your db, you should write at 
> > least
> >
> > [10]
> > type=peer
> >
> > in sip.conf, so it will attempt to load the rest of the info from the
DB.
> > Hhehe, i know is kind of useless for now, but if it works, i can 
> > make it to read all from database since the beginning without 
> > needing to add a dummy entry in sip.conf
> >
> > regards
> >
> > On 1/17/06, Moises Silva <moises.silva at gmail.com> wrote:
> > > i cannot take any responsability if your computer explodes or 
> > > something, but im attaching you a patch that you may want to give 
> > > a try.
> > >
> > > regards
> > >
> > > On 1/17/06, Reto Kortas <retokortas at gmx.de> wrote:
> > > >
> > > >
> > > > In extconfig.conf I have:
> > > >
> > > > voicemail => odbc,asterisk,voicemail_users sipusers => 
> > > > odbc,asterisk,sip_users sippeers => odbc,asterisk,sip_users
> > > >
> > > > Asterisk version is 1.2.1
> > > >
> > > > When asterisks starts, I don't saw any SQL queries in my mysql log.
> > > > First, when a user calls his own mailbox, I saw a sql querie and 
> > > > the sip peer is created from db.
> > > >
> > > >
> > > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: asterisk-users-bounces at lists.digium.com
> > > > [mailto:asterisk-users-bounces at lists.digium.com] Im Auftrag von 
> > > > Moises Silva
> > > > Gesendet: Dienstag, 17. Januar 2006 17:39
> > > > An: Asterisk Users Mailing List - Non-Commercial Discussion
> > > > Betreff: Re: [Asterisk-Users] auto load SIP peers on startup
> > > >
> > > > hum. I tought that as long as you have a "real time engine"  in 
> > > > extconfig.conf the peers should be loaded at start up. What do 
> > > > you have in your extconfig.conf?
> > > >
> > > > Regards
> > > >
> > > > On 1/17/06, Reto Kortas <retokortas at gmx.de> wrote:
> > > > > Hi all,
> > > > >
> > > > > we use OpenSER together with Asterisk.
> > > > > All SIP users registers with OpenSER and asterisk is doing the 
> > > > > voicemail thing.
> > > > >
> > > > > We use the Asterisk RealtimeArchitecture for voicemail users 
> > > > > and SIP
> > > > peers.
> > > > > The database table for the sip peers is a view from the 
> > > > > OpenSER subscriber table.
> > > > >
> > > > > The MWI for a user will only work, if the user object (sip 
> > > > > peer) is loaded into memory and visible with the CLI command 
> > > > > "sip show
> > peers".
> > > > > This happens, for example, if the user call his own mailbox 
> > > > > for checking
> > > > voicemail.
> > > > >
> > > > > Is their a possibility to load all peers from database on 
> > > > > asterisk startup so that the users will get their NOTIFY 
> > > > > without calling their own mailbox first?
> > > > >
> > > > > Another question for me is, how long a SIP peer object will 
> > > > > stay in memory without being used? Is their a kind of "garbage 
> > > > > collector" for old, unused peer objects?
> > > > >
> > > > > Thx Reto
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > --Bandwidth and Colocation provided by Easynews.com --
> > > > >
> > > > > Asterisk-Users mailing list
> > > > > To UNSUBSCRIBE or update options visit:
> > > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > > > >
> > > >
> > > >
> > > > --
> > > > "Su nombre es GNU/Linux, no solamente Linux, mas info en
> > http://www.gnu.org"
> > > > _______________________________________________
> > > > --Bandwidth and Colocation provided by Easynews.com --
> > > >
> > > > Asterisk-Users mailing list
> > > > To UNSUBSCRIBE or update options visit:
> > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > > >
> > > > _______________________________________________
> > > > --Bandwidth and Colocation provided by Easynews.com --
> > > >
> > > > Asterisk-Users mailing list
> > > > To UNSUBSCRIBE or update options visit:
> > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > > >
> > >
> > >
> > > --
> > > "Su nombre es GNU/Linux, no solamente Linux, mas info en
> > http://www.gnu.org"
> > >
> > >
> > >
> >
> >
> > --
> > "Su nombre es GNU/Linux, no solamente Linux, mas info en
> http://www.gnu.org"
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > Asterisk-Users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > Asterisk-Users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
>
> --
> "Su nombre es GNU/Linux, no solamente Linux, mas info en
http://www.gnu.org"
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>


--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list