[asterisk-users] URgent - capturing 'answered'

Zarko Zivanovic outlaw011 at gmail.com
Mon Jul 26 09:40:31 CDT 2010


Ok Lief, here's an update:

I changed the ruby script line to:

$my.query("UPDATE call_log SET local='${CDR(dstchannel)}', endtime = NOW()
WHERE id = #{call_log_id}")

As you suggested, but now in mysql local field i have exactly this written:

${CDR(dstchannel)}

If wasnt changed to a variable, instead it was directly written to mysql.
Any suggestions?


Zarko


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Leif Madsen
Sent: Monday, July 26, 2010 3:44 PM
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] URgent - capturing 'answered'

On 10-07-26 08:10 AM, Zarko Zivanovic wrote:
> Hello Steve and thanks for your answer,
> However I tried:
>
> $my.query("UPDATE call_log SET local='#{CDR(dstchannel)}', endtime = NOW()
> WHERE id = #{call_log_id}")
>
> And it does write nothing to the database.
>
> I guess there is a error in ruby expression above but I am not sure what
is
> wrong - if you have any idea please help.

If that is your literal quote, then I think you need to change the # to a $
as 
Asterisk dialplan functions and variables start with ${ vs #{

Unless that is some special indication in SQL that I'm unfamiliar with.

Leif Madsen.

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5314 (20100726) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5314 (20100726) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 




More information about the asterisk-users mailing list