Hi All,<br><br>I&#39;m trying to achieve the following:<br><br>- If &lt;sip/iax user&gt; logs in from home, they can dial internal extensions only (this is to avoid employees going wild on local/mobile calls from home)<br>
- If &lt;sip/iax user&gt; logs in from the office, they can call anyone they want.<br><br>Since I have my users defined in an LDAP tree, I&#39;d like to stick to one-account-per-user (each account is setup for both - IAX and SIP logins - to allow the employee to use IAX from home and SIP at work, or whatever combination they prefer).<br>
<br>So, I thought I would simply look at the IP address of the originating call. If the SIP/IAX user has an IP address outside the local subnet -&gt; allow calls to extensions only. Else -&gt; allow all. I thought the best way of doing this would be using AGI with a Perl script. The only problem I&#39;m having is determining the IP address of the originating call. I can&#39;t find any channel variable that gives me this info.<br>
<br>The reason why I mentioned that I&#39;d like to stick to one-account-per-user is that I know I could fix this simply by having 2 accounts per user (one that allows connections from the local subnet, and the other to login from outside and use different contexts for each), but it&#39;d be much nicer to avoid having 2 accounts per user.<br>
<br>If anyone has any suggestions on how to achieve the above, I&#39;d love to read them!<br><br>Thanks in advance.<br>Gonzalo<br>