[Asterisk-Users] Can't Dial using perl.
Ricardo Maia
ricardo.maia at gmail.com
Mon Sep 20 13:28:36 MST 2004
I'm trying to dial using this script in perl:
(asterisk_dial.pl)
---
#!/usr/bin/perl
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
$pin = $AGI->get_data("beep", "10000", "3");
chomp($pin);
$AGI->exec('SetVar',"NUMERO=$pin");
exit(0);
---
This script sets 'NUMERO' with any value...
In my extension.conf, i have...:
---
exten => 501,1,agi,asterisk_dial.pl
exten => 501,2,Dial(SIP/${NUMERO},15)
---
... but when i try to dial, asterisk dial but an error
"chan_sip.c:457 __sip_xmit: __sip_xmit of 0x8130cf4 (len 703) to
0.0.1.245 returned -1: Invalid argument."
Any idea?
Regards,
Ricardo Maia, Brazil
More information about the asterisk-users
mailing list