<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt">Hey all<br />
<br />
I have an issue that I have been bumping up against. We have some inbound fax services and occasionally an inbound fax that successfully came in would fail to store it's references in the database. <br />
<br />
We are using a function in func_odbc to update a database table. We call the function from the dialplan and pass in all the opt_xxx return values as well as other important values we need to store. The issue we are having is this.<br />
<br />
In some cases values such as Caller ID, Remote Station ID and Header Info will have a comma in them. Even though these values are being encoded using SQL_ESC the comma is being interpreted as an extra parameter and messing up the storage values and causing the database insert to fail. Is there a way to encode variables with commas in their values so they can be sent into the func_odbc function as a parameter without causing the process to thing it has more parameters?<br />
<br />
Exp... <br />
<br />
If the ${CALLERID(number)} or ${FAXOPT(remotestationid)} or others in the line below have a comma in them then the parameter order pushed buy one and the value is broken up when building the insert statement. <br />
<span lang="EN">
<p>exten => Do-Store,n,Set(FAX-DO-STORE()=${CALLERID(number)},${CALLERID(name)},${l_faxFile_Path},${l_faxFile_FullName},${FAXOPT(ecm)},${FAXOPT(filename)},${FAXOPT(localstationid)},${FAXOPT(headerinfo)},${FAXOPT(remotestationid)},${FAXOPT(maxrate)},${FAXOPT(minrate)},${l_storeRate},${FAXOPT(pages)},${FAXOPT(resolution)},${FAXOPT(error)},${FAXOPT(status)},${FAXOPT(statusstr)})<br />
<br />
Any ideas suggestions on how to over come this. Would be appreciated.<br />
<br />
Thanks<br />
Bryant</p>
</span>Any ideas suggestions on how to over come this. Would be appreciated.ThanksBryant</span>