Thanks Chris. I thought OpenSIPS wanted to know about changes in its subscriberDB, that it didn't look them up every time. Understood the inner workings now better.
Best Regards, Matti On 15/05/2009 08:26, "Chris Maciejewski" <[email protected]> wrote: > Hi Matti, > > Below is a PHP snippet I use do add subscribers directly to MySQL database: > > $username = 'some_user'; > $realm = 'my.sip.com'; > $password = 'top_secret'; > > $ha1 = md5($username.':'.$realm.':'.$password); > $ha1b = md5($username.'@'.$realm.':'.$realm.':'.$password); > > $query = " > INSERT INTO subscriber ( > username, > domain, > password, > ha1, > ha1b > ) > VALUES > ('%s','%s','%s','%s','%s') > "; > $sql = sprintf($query, $username, $realm, $password, $ha1,$ha1b); > > mysql_query($sql); > > Regards, > Chris > > 2009/5/14 Matti Zemack <[email protected]>: >> Hi, >> That does sound interesting. Yes please. >> Regards, >> Matti Zemack >> >> Sent from Matti Zemacks iPhone. >> On 14 May 2009, at 18:34, "Romanov Vladimir" <[email protected]> wrote: >> >> I can post sources on C#. >> >> >> >> ----------------- >> >> Vladimir Romanov >> >> Yota Lab | http://www.yota.ru >> >> CTO >> >> +7 (960) 239-0853 >> >> >> >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Matti Zemack >> Sent: Thursday, May 14, 2009 6:55 PM >> To: Romanov Vladimir; [email protected] >> Subject: Re: [OpenSIPS-Users] Adding subscribers? >> >> >> >> Hi, >> >> >> >> Thanks for your response. >> >> May I ask if that¹s done by direct MySQL INSERTs? >> >> >> >> Regards, >> >> Matti Zemack, Stockholm, Sweden >> >> >> >> From: Romanov Vladimir [mailto:[email protected]] >> Sent: den 14 maj 2009 16:54 >> To: Matti Zemack; [email protected] >> Subject: RE: Adding subscribers? >> >> >> >> I wrote small windows application to bulk add subscribers for performance >> test. Using this application I add 1 000 000 users in minute >> >> >> >> ----------------- >> >> Vladimir Romanov >> >> Yota Lab | http://www.yota.ru >> >> CTO >> >> +7 (960) 239-0853 >> >> >> >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Matti Zemack >> Sent: Thursday, May 14, 2009 6:23 PM >> To: [email protected] >> Subject: [OpenSIPS-Users] Adding subscribers? >> >> >> >> Hi all, >> >> >> >> How do you all add new subscribers to your systems? >> >> Today we do it by calling ³opensipsctl add sdh...@asdjkhsd djhjhd² from our >> admin-php. >> >> Looking through the code of opensipsctl it seems to make an SQL query >> inserting the new user straight into the Databse without passing FIFO or >> such. >> >> >> >> Does there exist a more ³modern² way of doing this or is this the procedure >> used nowadays? >> >> >> >> BTW, Anyone interested in the final PHP code of triggering a reboot of >> Linksys and Grandstream using XML-RPC, just let me know. Actually also some >> code of reboot of Siemens devices, although not through opensips. >> >> >> >> Best Regards, >> >> Matti Zemack, Stockholm, Sweden >> >> >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
