[Asterisk-Users] RE: Can't pass variables using Originate in PHPAGI 2.14

Anish Basu anish at softelinc.com
Wed Dec 21 15:43:39 MST 2005


Not sure if this email actually went through before.

-----Original Message-----
From: Anish Basu [mailto:anish at softelinc.com] 
Sent: Monday, December 19, 2005 11:08 AM
To: asterisk-users at lists.digium.com
Subject: Can't pass variables using Originate in PHPAGI 2.14

No matter what I try, I can't seem to pass variables to the local channel
when using the Originate command through PHPAGI.  Here is a small snippet of
the PHP code:

/***************************************************************************
**/
$channel = 'Local/warning at default/1';
$exten = '';
$context = '';
$priority = '';
$application = 'Meetme';
$data = '500|qt|1234';
$timeout = '20000';
$callerid = '';
$variable = 'minutes=5';
$account = '';
$async = true;
$actionid = rand();

$asm->Originate($channel, $exten, $context, $priority, $application, $data,
$timeout, $callerid, $variable, $account, $async, $actionid);
/***************************************************************************
**/

The Originate command succeeds and joins one leg of the call to Meetme and
the other leg to the local extension warning in the context default.  But,
the variable ${minutes} is not useable in the dialplan.  NoOp(${minutes})
does not return anything.  I added some echo statements in the
phpagi-asmanager.php so that I could see the commands being passed to the
Asterisk manager:

Action: Originate
Channel: Local/warning at default/1
Application: Meetme
Data: 500|qt|1234
Timeout: 20000
Variable: minutes=5
Async: true
ActionID: 20

The command sent to the manager seems to be fine, and I'm not trying to pass
multiple variables.  Has anyone had similar problems passing variables?

Thank you,
Anish Basu
Field Systems Engineer
Softel, Inc.
Phone: (732) 705-9202
Cell: (732) 312-6634 




More information about the asterisk-users mailing list