[*] Re: [on-asterisk] Obtaining the IP address of a device via an
AGI script?
Reza - Asterisk Enthusiast
asterisk at neoEnova.com
Fri Sep 21 15:01:50 CDT 2007
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:sip_account at 192.168.xxx.xxx;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" <john.lange at open-it.ca>
To: "Asterisk Users Group" <asterisk at uc.org>; "Asterisk SIG"
<asterisk at muug.mb.ca>
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: asterisk-unsubscribe at uc.org
For additional commands, e-mail: asterisk-help at uc.org
More information about the Asterisk
mailing list