<div>Thanks, Russ!</div>
<div> </div>
<div>Any suggestions on how to apply a subnet mask so that I can match an IP that belongs to <a href="http://192.168.0.0/23">192.168.0.0/23</a>, for example? Or would the only way be to match the string using REGEX?</div>
<div><br> </div>
<div><span class="gmail_quote">On 9/6/06, <b class="gmail_sendername">Rushowr</b> <<a href="mailto:rushowr@phreaker.net">rushowr@phreaker.net</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Rushowr wrote:<br>> Steve Hsieh wrote:<br>>> Greetings,
<br>><br>>> Is it possible to create a conditional IF inside extensions.conf based<br>>> on the source IP address of a SIP phone (as opposed to extension)? What<br>>> I would like to do is the following:
<br>><br>><br>>> 1. If SIP phone IP belongs to <a href="http://192.168.0.0/24">192.168.0.0/24</a> <<a href="http://192.168.0.0/24">http://192.168.0.0/24</a>><br>>> subnet, set CALLERID=xxxx<br>>> 2. Else, set CALLERID=yyyy
<br>><br>>> Thanks in advance for any examples or help.<br>><br>>> Steve<br>><br>><br>>> ------------------------------------------------------------------------<br>><br>>> _______________________________________________
<br>>> --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>><br>>> asterisk-users mailing list<br>>> To UNSUBSCRIBE or update options visit:<br>>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> Steve, yes you can do it.<br>><br>> You'll need to use the SIPPEER function (available in trunk only I<br>> believe) to get ${SIPPEER(ipaddr)}. You can then use Set and If() to do
<br>> what you want.<br>><br>> SKM<br><br>I'm sorry, you need ${SIPPEER(${EXTEN}|ipaddr)} to retrieve the data you<br>want<br></blockquote></div>