Thanks for the great input again. It was the phpagi path that I had wrong in 
the .agi file. Once that was set properly everything works fine. Now, I need to 
find out a way to check status of a registered peer. Wondering if there is a 
request I can send for that in the phpagi?!


Thanks,
Bruce

> Date: Mon, 14 Jun 2010 16:13:33 -0400
> From: j...@netdirect.ca
> To: het...@hotmail.com
> CC: asterisk@uc.org
> Subject: Re: [on-asterisk] How to pass ${EXTEN} from dialplan to php file 
> which accept variable $did_numb ???
> 
> ----- Original Message -----
> > However when doing a NoOp I am getting channel info like ip and sip
> > info for the variable. It seems to me that the variable is not passed
> > the right way back to the dial-plan.
> > 
> > NoOp reults:
> > 
> > NoOp("SIP/64.64.65.65-00000d31", "") in new stack
> 
> Just so I'm clear, your doing something like:
> 
> exten => s,n,NoOP(${var})
> 
> And getting the results you mention? that doesn't show a channel name, but 
> rather that ${var} contains "".
> 
> You probably want quite on the php, that could screw up the set_variable 
> stuff.
> 
> #!/usr/bin/php -q
> 
> Of use the -q argument when invoking php.
> 
> 
> P.S. There is a typo in my code below. The get_variable command should be:
> 
> $agi->get_variable("EXTEN");
> 
> 
> > Maybe the problem:
> > 
> > $agi->set_variable("var", $var);
> > >
> > > // Get a variable from dial plan
> > > $agi->get_variable($EXTEN);
> > >
> > > // do something, like assign a value to $var
> > > $var = "something";
> > >
> > > // Set a dial plan variable
> > > $agi->set_variable("var", $var);
> > >
> > > exit(0);
> > > ?>
> > >
> > > -- John Van Ostrand
> > > CTO, co-CEO
> > > Net Direct Inc.
> > > 564 Weber St. N. Unit 12, Waterloo, ON N2L 5C6
> > > Ph: 866-883-1172 x5102
> > > Fx: 519-883-8533
> > >
> > > Linux Solutions / IBM Hardware
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
> > > For additional commands, e-mail: asterisk-h...@uc.org
> > >
> > 
> > _________________________________________________________________ Game
> > on: Challenge friends to great games on Messenger
> > http://go.microsoft.com/?linkid=9734387
> 
> -- 
> John Van Ostrand 
> CTO, co-CEO 
> Net Direct Inc. 
> 564 Weber St. N. Unit 12, Waterloo, ON N2L 5C6 
> Ph: 866-883-1172 x5102 
> Fx: 519-883-8533 
> 
> Linux Solutions / IBM Hardware 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
> For additional commands, e-mail: asterisk-h...@uc.org
> 
                                          
_________________________________________________________________
Look 'em in the eye: FREE Messenger video chat
http://go.microsoft.com/?linkid=9734386

Reply via email to