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

Anthony Minessale anthony.minessale at gmail.com
Thu Jul 17 06:15:21 PDT 2008


What method did you use to determine that constant 1216188443 ?

The code that generates this stmt uses this template:

switch_snprintf(sql, sizeof(sql), "delete from sip_registrations where
expires > 0 and expires <= %ld", (long) now);

'now' is the current time on the box.  So when the phone registers we insert
an exptime of current time + double the number of seconds specified as the
expire time.

My only guess is the 2 box do not have the clock set right so when you
register to one or the other the exp times are not synced.

Considering this is a nonstandard usage of FreeSWITCH by messing with the db
underneath and not using it the way we are used to, and considering it's
FREE and you are not paying for support.  I prefer next time you send an
email you do not open with some rhetoric about how miserable a time you had
etc.  Imagine how hard it was to write all this free code.  You don't hear
me complaining.......







2008/7/17 Aadilkhan Maniyar <amaniyar at velankani.com>:

>  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 listFreeswitch-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>
>
>    ------------------------------
>
> _______________________________________________
> Freeswitch-users mailing listFreeswitch-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://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 <mkumar at velankani.com>
> URL:    www.velankani.com**
> "*Every Customer is a Reference Customer"*
>
> ------------------------------
>
> _______________________________________________
> Freeswitch-users mailing listFreeswitch-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://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 <mkumar at velankani.com>
> URL:    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
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080717/c9b1b675/attachment-0002.html 


More information about the FreeSWITCH-users mailing list