Hi ,
Can any one tell how to get the variables sent from channel originate function in StasisAppEventHandler() function , i have tried to print event variable but no luck
public function StasisAppEventHandler()
{
$this->stasisEvents->on('StasisStart', function ($event) {
$this->stasisLogger->notice("Event received: StasisStart");
$this->stasisChannelID = $event->channel->id;
//$this->stasisLogger->notice("CHANNL ID " . $this->stasisChannelID);
print_r($event);
$this->phpariObject->channels()->channel_answer($this->stasisChannelID);
$this->phpariObject->channels()->channel_playback($this->stasisChannelID, 'sound:demo-congrats', NULL, NULL, NULL, 'play1');
});
originate function
$response = $channels->channel_originate(
'PJSIP/'.'6001',
NULL,
array(
"extension" => "6001",
"context" => 'internal',
"priority" => 1,
"app" => "asterleaf",
"appArgs" => "",
"callerId" => "111",
"timeout" => -1,
"channelId" => $channel_id,
"otherChannelId" => ""
),
**array("var1" => "Value1")**
);
the variable var1 is not getting in StasisAppEventHandler