Hello,
On 07/11/07 14:08, Bontron wrote:
Hello,
I have this piece of code in my openser.cfg : exec_msg("/usr/local/etc/openser/uri-folder/record '$fu' $$SIP_USER '$ft' 'additionalinfo'"); The instruction 'record' is a c program.
This is supposed to add a record in a mysql database - new incoming call, from caller , to called, date, and an additional info - and as the matter of fact it almost does except that 'record' is unable to append the date. It writes '0000-00-00'.
The strange thing is that when the 'record' instruction is being called from the console, the set of instructions being manually written : record 'joe@....' etc ... it records everything including the right date and time.
Did any one face a similar situation ? Thanks in advance.
I do not know how you get the date there, but if you rely on some environment varibles, beware that openser fakes the environment when executing the command. You may use date functions from the mysql.
As side not, have a look at avp_db_query(), you may achieve same functionality without the need of calling external commands.
Cheers, Daniel
Olivier
Message sent using UebiMiau 2.7.8
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users