On Thursday 05 August 2010, SIP Projects wrote:
> doh!
> 
> here is the actual variable i'm trying to hack together:
> 
> $var(reg_time) = $time(year) + "-" + $time(mon) + "-" + $time(mday)
> + " " + $time(hour) + ":" + $time(min) + ":" + $time(sec);

Hi Matt,

with regards to your first question, about changing the value in the flatstore 
module, its of course possible to just change the code of the database module.

I've tried your script variable in current git master, here it works (with 
some casting warnings..), and also in 1.5.2, where i could reproduce it:

Aug  9 17:43:20 [987] ERROR:core:eval_elem: invalid numeric operands
Aug  9 17:43:20 [987] ERROR:core:do_assign: no value in right expression
Aug  9 17:43:20 [987] ERROR:core:do_assign: error at line: 30

So the issue is that the script interpreter can not concat the time values 
(which are int only) to the string seperators. As i workaround i've tried to 
start with an empty string in the var:

$var(reg_time) = "" + $time(year) + "-" + $time(mon) + "-" + $time(mday) + " " 
+ $time(hour) + ":" + $time(min) + ":" + $time(sec);

this seems to work:

Entering Route TEST 2010-8-9 18:8:0

Cheers,

Henning

_______________________________________________
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

Reply via email to