Hello guys. I have a sip account defined in sip.conf like that:
[7265]
type=friend
context=office
host=dynamic
secret=1234
insecure=invite,port
nat=no
setvar=TESTVAR=YUP
‘sip show peer 7265’ confirms that variable is set properly:
Variables :
TESTVAR = YUP
I would like to check status of this variable in my dialplan so I’m trying to use chanvarname item of SIPPEER function according to: https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_SIPPEER but it constantly gives me nothing. I tried like below
NoOp(${SIPPEER(7265,chanvarname)})
NoOp(${SIPPEER(7265,chanvarTESTVAR)})
NoOp(${SIPPEER(7265,chanvarname(TESTVAR))})
NoOp(${SIPPEER(7265,chanvarname,TESTVAR)})
and many others but did not succeed - always returns nothing. What do I miss? Other items like ip, port etc are returned correctly. Hope you can help.
Tested on Asterisk 11.6-cert4 built by root on a x86_64 running Linux on 2017-04-19 13:31:04 UTC but checked also on 13-cert and behaves the same way.