FUNC_SHARED not honoring variable in chan option

Hi All,

So I’ve been trying to use originate via AMI to do some specific power dialing (Using call files is not an option unfortunately ergo the originate). All works well except when I’m trying to handle short abandons on the channel to the B-side (Local/xxxxxx;2 leg).

I though of perhaps getting a time of call variable from the B-side leg and passing it to the A-Side however variable inheritance does not work in this situation i.e. Set(__SOMEVARIABLE). So I did a bit more reading and came across the SHARED function. Now in theory this would work really well for me except for the face that I cannot get it to work with a variable in the channel option. If I hard code a the channel prefix i.e Set(SHARED(VARname,Local/xxxx)=yyyy) it works 100% however I need a specific variable per channel i.e Set(SHARED(VARname,${CHAN_VAR})=xxxx) where CHAN_VAR is defined in an earlier priority.

Please advise if there is a way that I can achieve the above, I’ve been trying to find something online without bugging forums for over 2 weeks with no luck :frowning:

Maybe you could put stuff into internal Asterisk database with DB() functions, based on parent CHANNEL() details, accessed from a Gosub on the B-leg using the ‘b’ option of the Dial() application ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.