[Asterisk-Dev] help needed

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Jul 25 21:49:35 MST 2005


On Mon, Jul 25, 2005 at 04:34:33PM +0200, Hoai-Anh Ngo-Vi wrote:
> Dear all
> 
> I am using Asterisk 1.0.7 on Debian Sarge with Kernel 2.6.8-2-686.
> 
> The Problem: I've written a C programm 

Why would you use C for that?

echo -e '#!/bin/sh\necho hello1\necho hello2>&2" >/usr/share/asterisk/agi-bin/test_agi
chmod +x /usr/share/asterisk/agi-bin/test_agi

> and placed it into /usr/share/asterisk/agi-bin, where the AGI scripts should be placed. Extension.conf edited as follows:
> ...
> exten => 336, 4, AGI(a.out)

Write a wrapper strace script to have a better idea of what's happening:

echo -e '#!/bin/sh\nexec strace -o /tmp/trace ./a.out" >/usr/share/asterisk/agi-bin/trace_a.out
chmod +x /usr/share/asterisk/agi-bin/trace_a.out

exten => 336, 4, AGI(trace_a.out)

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-dev mailing list