[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 09:47:42 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050403) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
iD8DBQFCZQv+JlWtSTiTVsYRAjCgAKCkItraKEEcPZ5xiw3E9SNgl6JtwQCdHBhP
ahzYIiRIUf8P5bxQVfuDCPk=
=MlqW
-----END PGP SIGNATURE-----
dyfet.vcf
Description: Vcard