[Freeswitch-users] Freeswitch + MSSQL

Gregor Nanger gregor at infomedia.si
Sun Mar 4 15:05:05 MSK 2012


Thanks Peter!

It's working now. I also had to set core-db-dsn in switch.conf to works...




2012/3/4 Peter Olsson <peter.olsson at visionutveckling.se>

> Did you try to set this parameter in switch.conf.xml?
>
> <param name="core-dbtype" value="MSSQL"/>
>
> According to the code this should enable different method for concat() for
> MS SQL.
>
> /Peter
>
> ________________________________
> Från: freeswitch-users-bounces at lists.freeswitch.org [
> freeswitch-users-bounces at lists.freeswitch.org] för Gregor Nanger [
> gregor at infomedia.si]
> Skickat: den 4 mars 2012 01:22
> Till: FreeSWITCH Users Help
> Ämne: Re: [Freeswitch-users] Freeswitch + MSSQL
>
> This is sql that is generated:
> select sip_registrations.sip_user, sip_registrations.sub_host,
> 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,sip_dialogs.presence_id,
> sip_pre
> sence.open_closed,'','','' from sip_registrations left join sip_dialogs on
> sip_dialogs.hostname = sip_registrations.host
> name and sip_dialogs.profile_name = sip_registrations.profile_name and
> (sip_dialogs.presence_id = sip_registrations.sip_
> user || '@' || sip_registrations.sub_host or (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_presence.hostname=sip_registrations.hostname and
>  (sip_registrations.sip_user=sip_presence.sip_user and
> sip_registrations.orig_server_host=sip_presence.sip_host and sip_
> registrations.profile_name=sip_presence.profile_name) where
> sip_registrations.hostname='WIN-SERVER2008' and sip_registra
> tions.profile_name='internal' and sip_dialogs.call_info_state != 'seized'
> and sip_dialogs.presence_id='1002 at 192.168.1.<mailto:1002 at 192.168.1.>
> 150' or (sip_registrations.sip_user='1002' and
> (sip_registrations.orig_server_host='192.168.1.150' or sip_registration
> s.sub_host='192.168.1.150' ))]
> [STATE: 42000 CODE 102 ERROR: [Microsoft][ODBC SQL Server Driver][SQL
> Server]Incorrect syntax near '|'.
>
>
> But in source code it is:
> "sip_dialogs.presence_id = sip_registrations.sip_user %q '@' %q
> sip_registrations.sub_host "
>
> It looks like parameters are not inserted at runtime...
>
> What do you think?
>
>
> 2012/3/4 Brian Foster <bdfoster at endigotech.com<mailto:
> bdfoster at endigotech.com>>
>
> I think that has to do with ymthe specific ODBC driver you are using. I'd
> check your configs and see of there's anything amiss. I could be wrong
> though, as I haven't dealt with MSSQL. I have experience with MYSQL and
> postgres with ODBC though.
>
> -BDF
>
> On Mar 3, 2012 6:19 PM, "Gregor Nanger" <gregor at infomedia.si<mailto:
> gregor at infomedia.si>> wrote:
> Hi!
>
> I am using Freeswitch with Windows. I hope I am not the only one.
>
> I also want to make mod_sofia to talk via ODBC with MSSQL. I can connect,
> but on call I get error, when sofia wants to write to mssql:
>
> [STATE: 42000 CODE 102 ERROR: [Microsoft][ODBC SQL Server Driver][SQL
> Server]Incorrect syntax near '|'.
> ]
>
> Is this know issue? Any suggestions?
>
> On MySQL it is working ok..
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org<mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto:
> 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
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org<mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto:
> 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
>
>
> !DSPAM:4f53366632766912397640!
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120304/a439457d/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list