<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&#39;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">&lt;<a href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>&gt;</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>
&lt;param name=&quot;core-dbtype&quot; value=&quot;MSSQL&quot;/&gt;<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, &#39;&#39;,  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,&#39;&#39;,&#39;&#39;,&#39;&#39; 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 || &#39;@&#39; || 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=&#39;WIN-SERVER2008&#39; and sip_registra<br>
</div>tions.profile_name=&#39;internal&#39; and sip_dialogs.call_info_state != &#39;seized&#39; and sip_dialogs.presence_id=&#39;<a href="mailto:1002@192.168.1.">1002@192.168.1.</a>&lt;mailto:<a href="mailto:1002@192.168.1">1002@192.168.1</a>.&gt;<br>

<div class="im">150&#39; or (sip_registrations.sip_user=&#39;1002&#39; and (sip_registrations.orig_server_host=&#39;192.168.1.150&#39; or sip_registration<br>
s.sub_host=&#39;192.168.1.150&#39; ))]<br>
[STATE: 42000 CODE 102 ERROR: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near &#39;|&#39;.<br>
<br>
<br>
</div><div class="im">But in source code it is:<br>
&quot;sip_dialogs.presence_id = sip_registrations.sip_user %q &#39;@&#39; %q sip_registrations.sub_host &quot;<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 &lt;<a href="mailto:bdfoster@endigotech.com">bdfoster@endigotech.com</a>&lt;mailto:<a href="mailto:bdfoster@endigotech.com">bdfoster@endigotech.com</a>&gt;&gt;<br>
<div class="im"><br>
I think that has to do with ymthe specific ODBC driver you are using. I&#39;d check your configs and see of there&#39;s anything amiss. I could be wrong though, as I haven&#39;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, &quot;Gregor Nanger&quot; &lt;<a href="mailto:gregor@infomedia.si">gregor@infomedia.si</a>&lt;mailto:<a href="mailto:gregor@infomedia.si">gregor@infomedia.si</a>&gt;&gt; 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 &#39;|&#39;.<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>&lt;mailto:<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>&gt;<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>&lt;mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>&gt;<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>&lt;mailto:<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>&gt;<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>&lt;mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>&gt;<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>