[OpenSIPS-Users] Adding subscribers?

Matti Zemack matti.zemack at rtcfactory.com
Fri May 15 09:52:11 CEST 2009


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" <chris at wima.co.uk> 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 <Matti.Zemack at rtcfactory.com>:
>> Hi,
>> That does sound interesting. Yes please.
>> Regards,
>> Matti Zemack
>> 
>> Sent from Matti Zemacks iPhone.
>> On 14 May 2009, at 18:34, "Romanov Vladimir" <VRomanov at yota.ru> wrote:
>> 
>> I can post sources on C#.
>> 
>> 
>> 
>> -----------------
>> 
>> Vladimir Romanov
>> 
>> Yota Lab | http://www.yota.ru
>> 
>> CTO
>> 
>> +7 (960) 239-0853
>> 
>> 
>> 
>> From: users-bounces at lists.opensips.org
>> [mailto:users-bounces at lists.opensips.org] On Behalf Of Matti Zemack
>> Sent: Thursday, May 14, 2009 6:55 PM
>> To: Romanov Vladimir; users at lists.opensips.org
>> 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:VRomanov at yota.ru]
>> Sent: den 14 maj 2009 16:54
>> To: Matti Zemack; users at lists.opensips.org
>> 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: users-bounces at lists.opensips.org
>> [mailto:users-bounces at lists.opensips.org] On Behalf Of Matti Zemack
>> Sent: Thursday, May 14, 2009 6:23 PM
>> To: users at lists.opensips.org
>> 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 sdhgsd at 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
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> 




More information about the Users mailing list