Catching variable sent from PHP ARI originate

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);
                $this->phpariObject->channels()->channel_playback($this->stasisChannelID, 'sound:demo-congrats', NULL, NULL, NULL, 'play1');

originate function

$response = $channels->channel_originate(
        "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

I havnt used such class, but here you can contact the developers

Thanks, i found the solution , we have to enable the variables in ari.cionf

1 Like

I was almost asking you what was the option because I checked the ari.conf sample configuration file and didn’t find it, but as you said you found a solution I continue searching and found the option channelvars so I think it should be added to the ari.conf sample configuration file