[Freeswitch-users] [Fwd: Openser + FreeSwitch Integration.]

Matt Klein mklein at nmedia.net
Thu Jul 17 01:11:39 PDT 2008


Aadil:

Re: your 1216188443 number -- that appears to be an old epoch number.


Here:

<?php
print date('Y-m-d H:i:sP', 1216188443);
?>

Run that. Value is: 2008-07-15 23:07:23



I'm sure that you're a day or two behind.



Try this:

<?php
print date('Y-m-d H:i:sP', 1216195543);
?>


It makes complete sense to me to remove expired sip registrations from sqlite.

Explain more ?


Thanks,
Matt


On Thu, 17 Jul 2008, Aadilkhan Maniyar wrote:

> Hi Guys,
>
> Well my last query was unanswered. I hope this time round some one can clear 
> my doubts.
>
> After a lot of debugging and some very miserable days, I was able to pin 
> point the root cause of the problem.
>
> It turns out that FreeSwtich regularly queries the  database and deletes the 
> entries in the sip_registrations tables whose expires value is > 0 and < 
> 1216188443.
>
> I would like to know the number 1216188443 (looks like a random number to 
> me), where is it derived from.
> Also why is there such a behavior wherein the FS deletes database entries at 
> regular intervals.
>
> Thanks & Regards,
> Aadil
>
> Aadilkhan Maniyar wrote:
>> Hi All,
>> 
>> I gave this a shot. And it works. But I am facing a unique issue.
>> 
>> What I have done is created a view called sip_registrations for FS from the 
>> schema for location table in OpenSER. (For details please refer my earlier 
>> mails)
>> Now when I register a user, the registration is successfully done. I am 
>> able to see the entry in the database.
>> 
>> But when I again execute a SQL query to display the registrations done, 
>> nothing is displayed. Somehow the registrations are being deleted.
>> 
>> I have set the registration timeout as 3600 in the UA. So there is no way 
>> the UA is sending a de-register. Also in the traces I do not see any 
>> de-register message being sent.
>> I have observed this peculiar behaviour only when OpenSER and FS are 
>> sharing the database. If I run only OpenSER the database entries are not 
>> being deleted.
>> 
>> Could it be possible that FS is for some reason deleting the entries in the 
>> database? Can anyone please help me out here.
>> 
>> Thanks & Regards,
>> Aadil 
>> Aadilkhan Maniyar wrote:
>>> Thanks for the input guys...
>>> 
>>> I have set the odbc-dsn in the internal.xml file under the sip_profiles 
>>> directory.
>>> The dsn works fine with isql. Also there are no errors while FS starts up.
>>> 
>>> I got the schema for the tables like sip_registrations, sip_subscriptions 
>>> etc from the file sofia_glue.c.
>>> Now I have created a view for the sip_registrations in the OpenSER 
>>> database and also created the other tables.
>>> 
>>> Let us see how things work... :)
>>> 
>>> Thanks & Regards,
>>> Aadil
>>> 
>>> John Skopis (Lists) wrote:
>>>> Brian West wrote:
>>>> 
>>>>> On Jun 18, 2008, at 1:11 AM, Aadilkhan Maniyar wrote:
>>>>> 
>>>>>> Thanks for the reply Brian.
>>>>>> 
>>>>>> So what you mean to say is that I need not configure 
>>>>>> mod_spidermonkey_odbc at all in order to store registration data in the 
>>>>>> MySQL database?.
>>>>>> 
>>>>> Correct this is just a way to access odbc from Spidermonkey.
>>>>>
>>>>> 
>>>>>> If I configure FS with --enable-core-odbc and set the /odbc-dsn/ 
>>>>>> parameter in one of the sip profile xml, i should be able to store the 
>>>>>> registrations in the MySQL database.
>>>>>>
>>>>>> 
>>>>> Do you see any errors during startup?  Does isql work with your dsn?
>>>>> 
>>>>>
>>>>> 
>>>>>> Brian West wrote:
>>>>>> 
>>>>>>> Considering that mod_spidermonkey_odbc isn't for this that would 
>>>>>>> explain why that wasn't working.
>>>>>>> 
>>>>>>> You need to configure freeswitch with --enable-core-odbc-support
>>>>>>>
>>>>>>> 
>>>> 
>>>> In addition to what Brian said you need to configure FS to use the odbc 
>>>> dsn. grep in the conf dir:
>>>> grep -RHin dsn *
>>>> 
>>>> to see how.
>>>> 
>>>> _______________________________________________
>>>> Freeswitch-users mailing list
>>>> Freeswitch-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>> 
>>>>
>>>> 
>>> ------------------------------------------------------------------------
>>> 
>>> _______________________________________________
>>> Freeswitch-users mailing list
>>> Freeswitch-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>> 
>> 
>> -- 
>> *Velankani Software Pvt. Ltd*.
>> 
>> **43, Electronics City, Phase – II,
>> Hosur Road, Bangalore – 560 100. India.
>> T: +91 80 4037 5757
>> M: +91 9886798572
>> E-mail: amaniyar at velankani.com <mailto:mkumar at velankani.com>
>> URL:    www.velankani.com <http://www.velankani.com/>**
>> 
>> "*Every Customer is a Reference Customer"*
>> ------------------------------------------------------------------------
>> 
>> _______________________________________________
>> Freeswitch-users mailing list
>> Freeswitch-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>> 
>
> -- 
> *Velankani Software Pvt. Ltd*.
>
> **43, Electronics City, Phase – II,
> Hosur Road, Bangalore – 560 100. India.
> T: +91 80 4037 5757
> M: +91 9886798572
> E-mail: amaniyar at velankani.com <mailto:mkumar at velankani.com>
> URL:    www.velankani.com <http://www.velankani.com/>**
>
> "*Every Customer is a Reference Customer"*
>


More information about the FreeSWITCH-users mailing list