John: When you do a "sip show peer sip_account" you get two important information that is relevant to your needs:
Addr->IP : 74.xxx.xxx.xxx Port 1611 Reg. Contact : sip:[EMAIL PROTECTED];transport=udp The ADDR->IP gives you the internet class IP address where the phone/device is connected from The IP address in the " Reg. Contact " gives you the LAN assigned IP address of the phone if its behind a NAT. And yes, there are ways to get the above information through your AGI script, depending on which programming/scripting language you use. You can get that information even at the AMI level, if you are using your AGI script to connect to the management interface. We provide professional services in writing such applications and if you are having difficulty writing the app yourself - you may consider our services to do the work for you. Cheers! Reza. ----- Original Message ----- From: "John Lange" <[EMAIL PROTECTED]> To: "Asterisk Users Group" <[email protected]>; "Asterisk SIG" <[EMAIL PROTECTED]> Sent: Friday, September 21, 2007 1:03 PM Subject: [on-asterisk] Obtaining the IP address of a device via an AGI script? Is there a way inside an AGI script to determine the IP address of the phone or device which triggered the script? I've examined the channel variables and I don't even see a way to get the name of the peer that triggered the script. If I had that I might be able to look up the IP address. John --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
