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?
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
On Tue, 2005-04-26 at 08:58 -0500, Anton Krall wrote:> 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?I use the same system. I have a couple of perl agi scripts that fill the gap. One of them finds a hardcoded IP in a hash of extensions, the other sends the callerid information in YAC format. Email me if you want a copy. Adam. p.s. CC adam@<mydomain> to make sure I see it if you reply.> _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
This example is on voip-info.org ----- Original Message ----- From: "Anton Krall" <akrall-lists@intruder.com.mx> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" <asterisk-users@lists.digium.com> Sent: Tuesday, April 26, 2005 9:58 AM Subject: [Asterisk-Users] YAC and IPs> 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? > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users