On Fri, Mar 14, 2008 at 9:01 AM, Rizwan Hisham <<a href="mailto:rizwanhasham@gmail.com">rizwanhasham@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I dont know about IAX, but for SIP users you can use the function SIP_HEADER(headername) to get the information u need from the sip packets. for example you can use SIP_HEADER(From) which will give you the From header containing the IP address of the caller. You will have to apply regex on it to extract the ip. <br>
</blockquote><div><br>Hi,<br><br>Thanks to everyone for replying. I did look at SIP_HEADER and it could work, however, I was hoping for something I could use for both SIP and IAX. I think I might have to go with the solution I didn't really like (use 2 accounts for each user with different contexts and permit/deny lines). I thought there must be a way to do it using AGI but it doesn't look like it.<br>
<br>Regards,<br>Gonzalo</div></div>