On Wednesday, March 11, 2015 06:08:04 PM Anthony Messina wrote: > I'm trying to do an sql_pvquery() and have PostgreSQL return the default > value using COALESCE (if the other parts of the query return NULL) rather > than placing the $null check on the return in the Kamailio script. I seem > to be coming up on a parser issue, perhaps too many nested parentheses: > > sql_pvquery("kamailio", > "SELECT COALESCE((SELECT value FROM usr_preferences WHERE > attribute='callee_rtp_transport' > AND (uuid='$sht(rtpengine=>$ci::$T_branch_idx::callee_ip)' > OR username='$rU') LIMIT 1), 'RTP/AVP')", > "$sht(rtpengine=>$ci::$T_branch_idx::callee_rtp_transport)"); > > <core> [cfg.y:3428]: yyerror_at(): parse error in config file > /etc/kamailio/kamailio.cfg, line 1444, column 14: syntax error > > Is this query "too complex" for the parser, or is there something I've > missed above? > > Thanks. -A
Nevermind... I was missing a '}' earlier in the script :( Sorry for the noise. -A -- Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users