So, you only changed the column type (for cpl_bin) from BLOB to BYTEA ?
Regards,
Bogdan
Ola Karlsson wrote:
Bogdan..
I changed the column type in the database to bytea for cgi-bin and
stuff started working , seems the decode only happened for BLOB type
not for text.
When debugging I got a \ instead of 0x01 så figured something was
wrong getting stuff out of the database.
/Ola
On Mon, Apr 7, 2008 at 10:50 AM, Bogdan-Andrei Iancu
<bogdan(a)voice-system.ro <mailto:bogdan@voice-system.ro>> wrote:
Hello Ola,
That is strange as the len of the script is taken from the
postgres driver (via openser API) - the returned columns must be
BLOB type. Check the types of the cpl_* columns; otherwise I
suspect a postgres driver (in openser) issue.
Best regards,
Bogdan
Ola Karlsson wrote:
Hi Users!
Have a problem with CPL scripts and postgres.
I've tried to make the simplest possible script for debugging
which resulted in the following in the 'cpl_xml' column.
'<cpl>\012 <incoming>\012 <reject
status="reject"
reason="I reject anonymous calls"/>\012
</incoming>\012</cpl>\012\012'
Loading it with openserctl that gets translated to this in the
cpl_bin field.
'\001\001\000\000\000\006\002\001\000\000\000\006\026\000\002\000\000\000\002[\000\001\000\031I
reject anonymous calls\000\000'
The reason I figure that postgres could have something to do
with this is that I've got this working before(before being
quite a while ago though. ) with MySQL.
Turning on debugging gives this information.
Mar 31 18:13:18 fuj /sbin/openser[601]: cpl-c B4script
Mar 31 18:13:18 fuj /sbin/openser[601]:
DBG:cpl-c:get_dest_user: trying to get user from new_uri
Mar 31 18:13:18 fuj /sbin/openser[601]:
DBG:cpl-c:get_dest_user: trying to get user from R_uri
Mar 31 18:13:18 fuj /sbin/openser[601]:
DBG:cpl-c:get_user_script: fetching script for user <olak>
Mar 31 18:13:18 fuj /sbin/openser[601]:
DBG:cpl-c:get_user_script: we got the script len=0
Mar 31 18:13:18 fuj /sbin/openser[601]: cpl-c After Script
OpenSER says that the length of the script is 0 whatever
script I load?.
I changed that in the CPL-C module so we get the right length
of the compiled script but then it falls over on the sanity
check for NODE_CPL = 001 , and if you skip that check it
starts complaining about unknown nodes ( in my case 92 ) ...
So my question is if anyone uses postgres and CPL, if so can
you give me some pointers?
Would be good to know if this happens to be a bug or an
untested area in that case I have no problem fixing the
problem just don't want to burn alot of time on something
already fixed or me doing something stupid with configuration.
Regards
/Ola Karlsson
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)lists.openser.org <mailto:Users@lists.openser.org>
http://lists.openser.org/cgi-bin/mailman/listinfo/users