I have a IVR script written which "Originates" a call which is then supposed to bridge the originated call to the current call, but I am not sure of the variable name for the "current channel". Please advise.
- b
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well I was able to figure the variable issue, I ended up using $agi->get_variable('CHANNEL');. But now I receive the following: "bridge_exec: Bridge failed because channel Array does not exists or we cannot get its lock" Any guidance is appreciated….
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
get_variable will return an array - look at the 'data' element for the value. Alternatively pass TRUE as get_variable's second parameter to only receive the data value.
/***Fetchthevalueofavariable.**Doesnotworkwithglobalvariables.Doesnotworkwithsomevariablesthataregeneratedbymodules.**@linkhttp://www.voip-info.org/wiki-get+variable*@linkhttp://www.voip-info.org/wiki-Asterisk+variables*@paramstring$variablename*@paramboolean$getvaluereturnthevalueonly*@returnarray,seeevaluateforreturninformation.['result']is0ifvariablehasn't been set, 1 if it has. ['data'] holds the value. returns value if $getvalue is TRUE*/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a IVR script written which "Originates" a call which is then supposed to bridge the originated call to the current call, but I am not sure of the variable name for the "current channel". Please advise.
- b
Well I was able to figure the variable issue, I ended up using $agi->get_variable('CHANNEL');. But now I receive the following: "bridge_exec: Bridge failed because channel Array does not exists or we cannot get its lock" Any guidance is appreciated….
get_variable will return an array - look at the 'data' element for the value. Alternatively pass TRUE as get_variable's second parameter to only receive the data value.