Thanks Lloyd,

 

That's exactly what I am looking for. Though i am not too familiar with phpagi 
and hence using floAPI (it does the dirty work for connecting to AMI, passing 
commands, etc...). I was wondering if there is a way to do it through floAPI as 
well. With floAPI you don't have the option to send 4 or 5 line commands at the 
same time and then end it with CR+LF. It's goes like this:

 

echo($sampleapi->request("COMMAND", array("COMMAND" => "originate SIP/$x 
extension 1...@from-internal")));

 

Where originate is simply borrowed from Asterisk CLI originate and not the 
manager command originate.

 

I will explore phpagi as I guess I'd rather not waste time on floAPI if it's 
limited in usuage. 

 

Thanks again,

Bruce


 


 
> Date: Sun, 6 Dec 2009 22:08:47 -0500
> From: [email protected]
> To: [email protected]
> CC: [email protected]; [email protected]
> Subject: Re: [on-asterisk] Tackling some AMI/PHP issue - Originate and 
> Channel Status
> 
> Here is the archive link From TAUG user list. Feb 2008 I answer for the
> another question. Which will help you
> 
> http://www.mail-archive.com/[email protected]/msg06537.html
> 
> 
> Thank you
> 
> Lloyd
> 
> 
> 
> On Sun, Dec 6, 2009 at 10:03 PM, Aloysius Thevarajah Lloyd <
> [email protected]> wrote:
> 
> > Here is the some of my production scripts
> >
> >
> > 'Originate',
> > array('Channel'=>"Local/1...@orig/n",
> > 'Context'=>'outboundbroadcast',
> > 'Exten'=>'s',
> > 'Async'=>'1',
> > 'MaxRetries' => '1',
> > 'RetryTime' => '10',
> > 'Priority'=>1,
> > 'Account'=>"$phonenumber",
> > 'Callerid'=>"$callid",
> >
> > 'Variable'=>"dial=$phonenumber|dialdatetime=$dialtime|ID=$ID|RE=$RE|MW=$MW|RR=$RR|HR=$HR|MR=$MR)"));
> >
> > You can send any number of variables.
> >
> >
> >
> >
> > On Sun, Dec 6, 2009 at 9:39 PM, Bruce N <[email protected]> wrote:
> >
> >>
> >> Thanks for the feedback.
> >>
> >>
> >> Call files are not always reliable and they come back with the same
> >> results as well. In addition, I think there has been some discussion about
> >> call files not being processed when large number of calls are placed.
> >> Though, I think there is a limit of 100 or so concurrent connections to AMI
> >> as well but it gives action status back in events. Something that spool 
> >> call
> >> files can't do.
> >>
> >> On top of my previous question, I am wondering if anyone knows how to pass
> >> CallerID variable along with originate command.
> >>
> >> Any other gurus?
> >> Thanks,
> >> Bruce
> >>
> >>
> >> > From: [email protected]
> >> > To: [email protected]
> >> > Date: Sun, 6 Dec 2009 21:20:31 -0500
> >> > CC: [email protected]
> >> > Subject: Re: [on-asterisk] Tackling some AMI/PHP issue - Originate and
> >> Channel Status
> >> >
> >> > Check out the call files. Easier to use and debug.
> >> >
> >> > You can also telnet to port 5038 and do the AMI commands yourself to
> >> > test.
> >> >
> >> > Sent from my iPhone
> >> >
> >> > On 2009-12-06, at 12:07 PM, Bruce N <[email protected]> wrote:
> >> >
> >> > >
> >> > > Hi Guys,
> >> > >
> >> > > Just playing around to get php to dial an outside number through the
> >> > > broswer and to play a custom message.
> >> > >
> >> > > I am using floAPI (http://www.phpclasses.org/browse/package/
> >> > > 2521.html) and here is my dial request:
> >> > >
> >> > >
> >> > > echo($sampleapi->request("COMMAND", array("COMMAND" => "originate
> >> > > SIP/$x extension 1...@from-internal")));
> >> > >
> >> > > Vairable $x is what I pass to this and it dials the extension first,
> >> > > once picked up, then it connects to 1...@from-internal which is my
> >> > > custom message (tt-monkeys). This works nicely.
> >> > >
> >> > > But if I do: originate SIP/testTrunk/$x extension 1...@from-internal
> >> > > The moment it starts ringing to $x through "testTrunk" it starts
> >> > > playing 1...@from-internal, hence if the outside party picks up
> >> > > after two rings then they miss hearing a great deal of the monkey
> >> > > noise. Basically, Asterisk can't tell channel status because it's
> >> > > not local to it. What is the workaround for this "if any"? maybe
> >> > > check channel status?
> >> > >
> >> > > If there is a totally different way of doing this rather than using
> >> > > originate command then please enlighten me. I appreciate the feedback.
> >> > >
> >> > > Thanks,
> >> > > Bruce
> >> > > _________________________________________________________________
> >> > > Windows Live: Make it easier for your friends to see what you’re up
> >> > > to on Facebook.
> >> > > http://go.microsoft.com/?linkid=9691816
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [email protected]
> >> > For additional commands, e-mail: [email protected]
> >> >
> >>
> >> _________________________________________________________________
> >> Ready. Set. Get a great deal on Windows 7. See fantastic deals on Windows
> >> 7 now
> >> http://go.microsoft.com/?linkid=9691818
> >
> >
> >
                                          
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail 
you.
http://go.microsoft.com/?linkid=9691817

Reply via email to