<div id="WISESTAMP_SIG_4684"><div>Thanks Peter!</div><div><font face="Verdana, Arial, Helvetica, sans-serif"><br></font></div><div><font face="Verdana, Arial, Helvetica, sans-serif">It's working now. I also had to set </font><font face="Verdana, Arial, Helvetica, sans-serif">core-db-dsn in switch.conf to works...</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br></font></div><div><font face="Verdana, Arial, Helvetica, sans-serif"><br></font></div></div><br><br><div class="gmail_quote">2012/3/4 Peter Olsson <span dir="ltr"><<a href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Did you try to set this parameter in switch.conf.xml?<br>
<br>
<param name="core-dbtype" value="MSSQL"/><br>
<br>
According to the code this should enable different method for concat() for MS SQL.<br>
<br>
/Peter<br>
<br>
________________________________<br>
Från: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] för Gregor Nanger [<a href="mailto:gregor@infomedia.si">gregor@infomedia.si</a>]<br>
Skickat: den 4 mars 2012 01:22<br>
Till: FreeSWITCH Users Help<br>
Ämne: Re: [Freeswitch-users] Freeswitch + MSSQL<br>
<div class="im"><br>
This is sql that is generated:<br>
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<br>
sence.open_closed,'','','' from sip_registrations left join sip_dialogs on sip_dialogs.hostname = sip_registrations.host<br>
name and sip_dialogs.profile_name = sip_registrations.profile_name and (sip_dialogs.presence_id = sip_registrations.sip_<br>
user || '@' || sip_registrations.sub_host or (sip_dialogs.sip_from_user = sip_registrations.sip_user and sip_dialogs.sip<br>
_from_host = sip_registrations.sip_host)) left join sip_presence on sip_presence.hostname=sip_registrations.hostname and<br>
(sip_registrations.sip_user=sip_presence.sip_user and sip_registrations.orig_server_host=sip_presence.sip_host and sip_<br>
registrations.profile_name=sip_presence.profile_name) where sip_registrations.hostname='WIN-SERVER2008' and sip_registra<br>
</div>tions.profile_name='internal' and sip_dialogs.call_info_state != 'seized' and sip_dialogs.presence_id='<a href="mailto:1002@192.168.1.">1002@192.168.1.</a><mailto:<a href="mailto:1002@192.168.1">1002@192.168.1</a>.><br>
<div class="im">150' or (sip_registrations.sip_user='1002' and (sip_registrations.orig_server_host='192.168.1.150' or sip_registration<br>
s.sub_host='192.168.1.150' ))]<br>
[STATE: 42000 CODE 102 ERROR: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '|'.<br>
<br>
<br>
</div><div class="im">But in source code it is:<br>
"sip_dialogs.presence_id = sip_registrations.sip_user %q '@' %q sip_registrations.sub_host "<br>
<br>
It looks like parameters are not inserted at runtime...<br>
<br>
What do you think?<br>
<br>
<br>
</div>2012/3/4 Brian Foster <<a href="mailto:bdfoster@endigotech.com">bdfoster@endigotech.com</a><mailto:<a href="mailto:bdfoster@endigotech.com">bdfoster@endigotech.com</a>>><br>
<div class="im"><br>
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.<br>
<br>
-BDF<br>
<br>
</div><div class="im">On Mar 3, 2012 6:19 PM, "Gregor Nanger" <<a href="mailto:gregor@infomedia.si">gregor@infomedia.si</a><mailto:<a href="mailto:gregor@infomedia.si">gregor@infomedia.si</a>>> wrote:<br>
Hi!<br>
<br>
I am using Freeswitch with Windows. I hope I am not the only one.<br>
<br>
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:<br>
<br>
[STATE: 42000 CODE 102 ERROR: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '|'.<br>
]<br>
<br>
Is this know issue? Any suggestions?<br>
<br>
On MySQL it is working ok..<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
</div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><mailto:<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>><br>
<div class="im"><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
</div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>><br>
<div class="im"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
</div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><mailto:<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>><br>
<div class="im"><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
</div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>><br>
<div class="im"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
</div>!DSPAM:4f53366632766912397640!<br>
<div class="HOEnZb"><div class="h5"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>