[Freeswitch-users] Using odbc in FS core

Mike Tkachuk mike at yes.net.ua
Sat Nov 21 04:02:07 PST 2009


Hello,

 Looks like the issue is not in multi statements in one request.
 Manually creating DB schema helped and everything started up.
 I will continue testing

 Also in code I see such construction:
 > switch_cache_db_execute_sql(dbh, "begin;delete from channels where hostname='';delete from channels where hostname='';commit;", &err);
 Anyone can explain why to do such delete twice and in transaction?

 Thanks.



Saturday, November 21, 2009 1:41:06 PM, you wrote:

MT> Hello Folks,

MT>  I'm interesting in completely moving away from sqlite and use
MT>  postgresql everywhere including core ( switch_core.c )

MT>  All other applications can use odbc without issues (sofia, limit,
MT>  fifo etc), but as I see in core only sqlite3 supported.

MT>  I correctly set 'core-db-dsn' parameter, but looks like the problem
MT>  that latest psqlodbc_08_04_0100 don't support multiple statements in
MT>  one request that is often used in switch_core_sqldb.c:

>> sql = switch_mprintf(
>>   "update channels set uuid='%q' where uuid='%q' and hostname='%q';"
>>   "update calls set caller_uuid='%q' where caller_uuid='%q' and hostname='%q';"
>>   "update calls set callee_uuid='%q' where callee_uuid='%q' and hostname='%q'",
>>   switch_event_get_header_nil(event, "unique-id"),
>>   ... SKIP ...

MT>  So, does anyone have any clue how to us postgresql in the FS core?

MT>  Thanks.

MT> --
MT> Mike Tkachuk



--
Mike Tkachuk





More information about the FreeSWITCH-users mailing list