Ami set variable and get on dialplan

Hi all…

I wish i could pass a variable through ami via php script and recall its value in dialplan.

I see php script and variable value but nothing on asterisk cli…

on php i use fputs($socket, “Variable: ID=$var1,\r\n”);

Has anyone a working example ?

Have i to set and export variable with __ ?

I have made several attemps but surely i miss something…sorry
I have search on google and tried different way…


HI Davide…
I’m going to do test soon…could you tell me how do i recall that variable o Dialplan ?
Will it be treated as local ? ${variable_name}

ActionID could be a random string?


It will be treated as local unless the channel name is null. Action ID is returned to you unchanged. It is not otherwise processed by Asteirsk.