[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bayonne-devel] My TGI/Perl works BUT...
From: |
Michel Think |
Subject: |
[Bayonne-devel] My TGI/Perl works BUT... |
Date: |
Tue, 19 Apr 2005 15:16:32 +0200 |
Hi everyone,
My Bayonne server version is 1.2.13. I work with soundcard for the moment.
In my script, I make a TGI call to a perl script :
---------------
set %v1 10
set %v2 20
libexec 30 mytgi.pl %v1 %v2
slog "Result = " %result
hangup
exit
-----------
In mytgi.pl, I make a multiplication between %v1 and %v2 :
-----------
#!/usr/bin/perl
use lib '/usr/local/libexec/bayonne/';
use TGI;
$a = $TGI::QUERY{'v1'};
$b = $TGI::QUERY{'v2'};
$res = $a * $b;
TGI::set("result",$res);
exit
---------------
When I start my bayonne server, it only works fine for the first
(phone)call! After
the first call, "result" is empty! Here are some traces:
--------------------
First call:
tgi: cmd=mytgi.pl query=v1=10&v2=20 digits= clid=UNKNOWN dnid=UNKNOWN
fifo: cmd=SET&0&result&200
fifo: cmd=wait 0 5621
fifo: cmd=exit 0 0
dummy(0): Result = 200
Second Call:
dummy0: step/start...
tgi: cmd=mytgi.pl query=v1=10&v2=20 digits= clid=UNKNOWN dnid=UNKNOWN
fifo: cmd=wait 0 5623
fifo: cmd=exit 0 0
dummy(0): Result= :
--------------
>From the trace above, it seems that in the second call, "TGI::set" doesn't
work...why?
However, if I hang up (restart or stop/start) the bayonne server process, It
will work again for the first call and not for the following calls...
Besides, I noticed that if I made two different TGI calls the second TGI
call wouldn't work even though it is another perl script)
(for example :
...
libexec 30 mytgi.pl %v1 %v2
slog ....
libexec 30 ttggii.pl %v3 %v4
...)
My questions are simple ;-) :
What am I doing wrong? what should I correct in my
scripts? and Why?
Thanks you !
(Ps: I did the same kind of script with bayonne 1.2.12 and it worked...)
- [Bayonne-devel] My TGI/Perl works BUT...,
Michel Think <=