[asterisk-users] Perl-AGI process
Abdul
abdul_zu at yahoo.com
Sat Jan 12 08:35:17 CST 2008
HI Trevor,
Thank you for your suggestion.
I configured to use what u told as following but not working still.
routes.pl
$dgw = 'SIP/5556'; #A-Z carrier
$opt = 'L(60000:10000)';
$AGI->set_variable(routecall-destination, $dgw);
$AGI->set_variable(routecall-args, $opt);
Extnenitons.conf
[testwell]
exten => _x.,1,Set(TIMEOUT(absolute)=3660)
exten => _x.,2,AGI(routes.pl)
exten => _x.,3,Dial(${routecall-destination},${routecall-args})
exten => h,1,DeadAGI(stop.pl)
Warnning :
[Jan 12 14:34:22] WARNING[27323]: app_dial.c:863 dial_exec_full: Dial requires an argument (technology/number)
== Spawn extension (testwell, 9745424620, 9) exited non-zero on 'SIP/8098179675-b726f5e8'
Could you please find out where is the problem?
Abdul <abdul_zu at yahoo.com> wrote: Hi All,
i have created one prepaid PERL AGI script to integrate asterisk users in our current Oracle Billing System. I am using $AGI->exec('Dial', $dialstr); in script after getting the MAX time out for the priticular call.
But when the channels increase on my asterisk more than 50-60 asterisk get crashed and i am suspecting the cause is of AGI Script. because when i check ps on server i found lot of process for routing.pl file which is the main to check balance and max credit time.
[root at hatifserver3 root]# ps -aux|grep asterisk
root 16419 0.0 0.0 5288 1072 pts/1 S 10:46 0:00 /bin/sh /usr/sbin/safe_asterisk
root 16421 32.5 0.4 39404 17604 pts/1 S 10:46 22:39 /usr/sbin/asterisk -f -vvvg -c
root 24537 0.0 0.2 96392 10472 pts/1 S 11:29 0:00 /usr/local/bin/perl /var/lib/asterisk/agi-bin/routing.pl
root 26821 0.0 0.2 96392 10472 pts/1 S 11:41 0:00 /usr/local/bin/perl /var/lib/asterisk/agi-bin/routing.pl
root 27177 0.0 0.2 96384 10476 pts/1 S 11:43 0:00 /usr/local/bin/perl /var/lib/asterisk/agi-bin/routing.pl
it is more than this just i put only few for example.
I think the routing.pl file continue running till the call hangup.
My question is, Is there anyway to kill the routing.pl once $AGI->exec('Dial', $dialstr); will run and the call should be continue?
--------
Regard,
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
--------
Regard,
---------------------------------
Never miss a thing. Make Yahoo your homepage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080112/a340123b/attachment-0001.htm
More information about the asterisk-users
mailing list