[asterisk-users] agi voicemail callback

vip killa vipkilla at gmail.com
Wed Apr 6 09:02:32 CDT 2011


Wow, thanks so much, couldn't i just eliminate the top portion of that code
up until: $astman->host($man_addr);
and replace                $astman->host($man_addr); with
$astman->host('localhost');

?

On Wed, Apr 6, 2011 at 9:54 AM, Danny Nicholas <danny at debsinc.com> wrote:

>  Here’s a snippet to place a call using Asterisk Manager (AMI) and PERL
>
>      open (my $man_in, "/etc/asterisk/manager.conf") or $man_ok=undef;
>
>                if ($man_ok) {
>
>                   while (<$man_in>) {
>
>                      if ($_ =~ /^bindaddr/) {
>
>                         (undef,$man_addr) = split /\=/, $_;
>
>                         }
>
>                      }
>
>                   close $man_in;
>
>                   }
>
>                $man_addr =~ s/\s//g;
>
>                ( $man_addr )=( $man_addr =~ /(.*)/ );
>
>                $astman->host($man_addr);
>
>                $astman->connect || die "Could not connect to " .
> $astman->host . "!\n";
>
>
>
>                my %resp = $astman->sendcommand(  Action => 'Originate',
>
>                                                            Channel =>
> $extval,
>
>                                                            Variable =>
> "ARG1=$fileval",
>
>                                                            Exten =>
> $extval,
>
>                                                            Context =>
> 'recordit',
>
>                                                            priority => 1,
>
>                                                            Number =>
> 5551212
>
>                                                            );
>
>
>
>                %resp = $astman->sendcommand(  Action => 'Logoff');
>
>
>   ------------------------------
>
> *From:* asterisk-users-bounces at lists.digium.com [mailto:
> asterisk-users-bounces at lists.digium.com] *On Behalf Of *vip killa
> *Sent:* Wednesday, April 06, 2011 8:49 AM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] agi voicemail callback
>
>
>
> like a perl script? could you originate a call using Perl and AMI ?
>
> On Wed, Apr 6, 2011 at 9:13 AM, Steve Edwards <asterisk.org at sedwards.com>
> wrote:
>
> On Wed, 6 Apr 2011, vip killa wrote:
>
> What about a executing an AGI script with:
> [general]
> externnotify = /some_agi_script.agi
>
> Would that work?
>
>
>
> No.
>
> What makes a program (compiled or interpreted script) an AGI is that it
> follows the AGI protocol.
>
> Very simplistically, the AGI protocol consists of 2 things:
>
> 1) the AGI environment sent to the AGI's STDIN
>
> 2) a defined interface to ask Asterisk to do things in the form of a
> request and a response.
>
> Externnotify will work if the program is not an AGI.
>
>
>
> --
> Thanks in advance,
> -------------------------------------------------------------------------
> Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
> Newline                                              Fax: +1-760-731-3000
>
> --
> _____________________________________________________________________
>
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>              http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110406/d15ac911/attachment.htm>


More information about the asterisk-users mailing list