Asterisk retrieve the IP of extension?

I need to send http action to the Snom Phone via Http. So I need the IP for extension. have a way to get it Dynamically by Manager or Dialplan?


Will push it out to the script, you will need to do a bit of manipulation of the header to extract the IP. But this works.


what is myscript?

Its the script i’m sending the variables to .


now I see you talking about SIP_HEADER(VIA) that return Header.
But which header is return? Callee or Caller?

Now I find that have ${SIPPEER(203,ip) , have a reason that you address to use SIP_HEADER(VIA) ?


I used the via for historic reasons, But yes SIPPEER does work, what are you trying to do ?


I try to Control my Phone like thaht: ;get dial tone ;dial

I still have q:

+why this below line is not work, even it work wrom browser?
exten => 9777,n,sendurl(,wait)

+it’s reasonable to call SIPPEER every time I need to send http? or beter way is use with fix IP? (what is the overhead of this call?)

+How I can execute App from Managar API? and specially how I exec sippeer?

+I see on Manager Action:
Action : SIPShowPeer
Peer: 205

but is not recognize this action!?
and Action SIPpeers it’s return All list, and take lot of resource when my need is only one sip.