[Asterisk-Users] Auto Dialing

Brian Wilkins brian at hcc.net
Thu Nov 18 02:18:06 MST 2004


You can do a couple of things. If you are using a SIP device, or a device that 
uses a PLAR code (Private Line Automatic Ringdown) then you can put that 
number that you want to dial when the phone goes off-hook in that section. 
That way, when you pick up the phone it will dial that number first which 
will then prompt you via some sort of IVR. Or, you could create an AGI script 
(observe below) to Dial the number, wait ten seconds, then Dial the dialed 
digits when you receive confirmation. 

--script--

extensions.conf
----
[default]
exten => _.,1,agi,savings.agi|${EXTEN}
exten => _.,2,Hangup

/var/lib/asterisk/agi-bin/savings.agi  # Set chmod 755 in order to execute
----
#!/usr/bin/perl

use Asterisk::AGI;

$AGI = new Asterisk::AGI;

my %input = $AGI->ReadParse();
$AGI->setcallback(\&mycallback);

print STDERR "AGI Environment Dump:\n";

foreach $i (sort keys %input) {
   print STDERR "-- $i = $input{$i}\n";
}

my $userid = $input{'calleridname'};
my $exten = $input{'extension'};
my $savings_number = "74949000";

if($exten eq 'h') { exit; }

$AGI->exec("Dial", "Zap/g1/$savings_number"); # Replace with way that you are 
dialing out to PSTN
sleep(10000);

--end script--


On Thursday 18 November 2004 06:16 am, Simon wrote:
> In my house i am using an autodialer to dial 74949000 to access to
> gateway and then i dial my mobile or local number to benefit from the
> saving Can we do that in asterisk to autodial to the gateway 74949000 and
> wait 10 before i eneter my destination number
>
> Please advise me on that how to make a effective dialplan...suing the
> above information
>
> Thanking you in advance
>
>
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Brian Wilkins
Software Engineer
brian at hcc.net

Heritage Communications Corporation
  Melbourne, FL     USA     32935
321.308.4000 x33
http://www.hcc.net




More information about the asterisk-users mailing list