I am transferring my dialplan to the new pjsip channel driver and I cannot find the built in variable that will give me the ip address of the current endpoint.
I was using this variable before but it is not recognized anymore by asterisk when using PJSIP:
${CHANNEL(peerip)}
By the way, where can I find all the builtin variables available for a channel with PJSIP?
Thanx a lot! Here is a complete example working for me:
It is a bit more work than before it’s ok.
exten => *63,1,NoOp()
same => n,Verbose(${CHANNEL(endpoint)})
same => n,Set(IP=${PJSIP_AOR(${CHANNEL(endpoint)},contact)})
same => n,Set(IP=${CUT(IP,:,2)})
same => n,Set(IP=${CUT(IP,@,2)})
same => n,Verbose(My IP Is ${IP})
same => n,Hangup()