[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bayonne-devel] My TGI/Perl works BUT...
From: |
David Sugar |
Subject: |
Re: [Bayonne-devel] My TGI/Perl works BUT... |
Date: |
Tue, 19 Apr 2005 12:56:21 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050403) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Interesting...tgi=perl has to do with pre-loading the perl interpreter
into the gateway process box, so that when forking to a perl app, it can
do so without having to exec /bin/perl. Perhaps there is some other odd
perl interaction involved. I am not sure if anything had been changed
between 1.2.12 and 13 related to this though...
Michel Think wrote:
> Sorry, I forgot to tell you what I did :-p
>
> I changed " tgi=perl " to ";tgi=perl" .
> This raise me some new questions : why did It work before with bayonne
> 1.2.12 and not now with 1.2.13? When ";tgi=perl" (in comment) what
> is the default values for tgi interpreters?
>
> bye
>
>
>
> On 4/19/05, Michel Think <address@hidden> wrote:
>
>>SORRYYY for disturbing you!! I am an idiot :-P
>>I upgraded my bayonne server but I didnt pay attention about my
>>configuration file... now it works fine!!
>>
>>Thanks you!!
>>
>>On 4/19/05, Michel Think <address@hidden> wrote:
>>
>>>Thank you for your (very ;-)) fast reply!!
>>>
>>>As you told me, I do ' print "SET&0&result&200\n" ' directly in my tgi app.
>>>For the first call, (as you told me before) it prints
>>>"SET&0&result&200" two times and I get the expected result. But, for
>>>the following calls, the ' print "SET&0&result&200\n" ' doesnt print
>>>and it behaves like before (empty result).
>>>
>>>Here are the 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=SET&0&result&200
>>>fifo: cmd=wait 0 6044
>>>fifo: cmd=exit 0 0
>>>dummy(0): Result = 200
>>>--
>>>Second call :
>>>---
>>>tgi: cmd=mytgi.pl query=v1=10&v2=20 digits= clid=UNKNOWN dnid=UNKNOWN
>>>fifo: cmd=wait 0 6046
>>>fifo: cmd=exit 0 0
>>>dummy(0): Result =
>>>
>>>any ideas? ;-)
>>>
>>>thanks a lot!
>>>
>>>On 4/19/05, David Sugar <address@hidden> wrote:
>>>
> Hmm...normally stdout points to the fifo when your perl app runs, so the
> set command really just expands into a perl "print" statment. What
> happens if you do a print "SET&0&result&200\n" directly in your tgi app?
>
> Michel Think wrote:
>
>>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 mailing list
>>address@hidden
>>http://lists.gnu.org/mailman/listinfo/bayonne-devel
>
>
>>>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCZTg1JlWtSTiTVsYRAiSXAJ4m1yW+EYSExrtCvW3CYVZYezNmZgCdH4lj
K9shacwdK4UQn6tnNAbm6zE=
=rxcs
-----END PGP SIGNATURE-----
dyfet.vcf
Description: Vcard