[Freeswitch-dev] Question on sofia_glue_execute_sql_callback()

Jerry Richards jerry.richards at teotech.com
Wed Jun 30 08:42:43 PDT 2010


I have a couple of questions regarding to sofia_glue_execute_sql_callback().

1) If a given sql select statement results in a matching entry in the .db
file, then the callback
   function should be invoked.  True?

2) Does the following select statement query the db/sofia_reg_internal.db
database?

   select sip_registrations.sip_user, '192.168.72.38',
sip_registrations.status,
      sip_registrations.rpid,'', sip_dialogs.uuid, sip_dialogs.state,
sip_dialogs.direction,
      sip_dialogs.sip_to_user, sip_dialogs.sip_to_host,
sip_presence.status,sip_presence.rpid
      from sip_registrations left join sip_dialogs on
(sip_dialogs.sip_from_user =
      sip_registrations.sip_user and sip_dialogs.sip_from_host =
sip_registrations.sip_host)
      left join sip_presence on
(sip_registrations.sip_user=sip_presence.sip_user and
      sip_registrations.sip_host=sip_presence.sip_host and
sip_registrations.profile_name=
      sip_presence.profile_name) where sip_registrations.sip_user='5381' and
     (sip_registrations.sip_host='192.168.72.38' or
sip_registrations.presence_hosts like
     '%192.168.72.38%')

The reason I'm asking is because I don't see the callback function getting
called, but if I run the query in a separate sqlite3 session, it does find a
matching entry in the db/sofia_reg_internal.db.  Do you know why the
callback function is not getting invoked?

Best Regards,
Jerry




More information about the FreeSWITCH-dev mailing list