[Asterisk-Users] YAC and IPs
Josiah Bryan
jbryan at productiveconcepts.com
Tue Apr 26 07:59:22 MST 2005
On Tuesday 26 April 2005 9:58 am, Anton Krall wrote:
> Guys.
>
> Im using YAC to send callerid info to PCs and I was wondering if there is a
> way to get the IP of a certain SIP or IAX client/technology when a dial
> command is issued.
>
> For example, if the dialplan has a dial sip/client or iax2/client, is there
> a way to get the current clients IP so I can pass the parameters to the
> system call that send the YAC callerid info?
Simplest way probably would be to parse the output of 'sip show peers' or a
similar IAX CLI command (I dont use IAX, so I dunno.) I've got a small perl
script that parses 'sip show peers' to get the peer name (SIP/whatever) and
the matching IP address - just a simple regex exercise, really. It could
easily be converted to AGI where one could call:
exten => s,1,AGI(tech2ip.pl|SIP/whatever) ; IP is put in TECH_IP
If anybody wants the script, let me know.
Cheers!
-josiah
More information about the asterisk-users
mailing list