<HTML><BODY>Hello<br><br>As the simplest example, having 10 or smth like that DIDs/inner phone numbers,<br>you may use just core functions - <br>https://www.opensips.org/Documentation/Script-CoreFunctions-2-3#toc18<br><br>and core variables <a href="https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75">https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75</a> <br><br>to determine the username in incoming INVITE (e.g. <em style="font-family: inherit; white-space: pre-wrap;">00498970043400)<br></em>and forward this request to desirable destination '1000'<br><br><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; margin-top: 0px; margin-bottom: 0px; color: #666666;" data-mce-style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; margin-top: 0px; margin-bottom: 0px; color: #666666;">if(method=="REGISTER" && $rU==<em style="font-family: inherit; white-space: pre-wrap;" data-mce-style="font-family: inherit; white-space: pre-wrap;">00498970043400</em>) {</pre><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; margin-top: 0px; margin-bottom: 0px; color: #666666;" data-mce-style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; margin-top: 0px; margin-bottom: 0px; color: #666666;">    forward("10.0.0.10:5060");    # ip of 1000<br>}</pre><br>OpenSIPS is extremely flexible, you may set/rewrite almost any SIP parameter using it - <br>destination IP, destination username in uri and so on.<br><br><br>But of course hardcoding in the script is not the best way. If you have a lot of relations<br>"DID - inner exten" it's better to have a static code with AVP variables and get the values from<br>some database, using some of CACHEDB_ module.<br><br>PS: I'm not a experienced user of OpenSIPS, so check my advice twice...<br><br>-----------------------------------------------<br><span style="font-size: 15px;" data-mce-style="font-size: 15px;">BR, Alexey</span><br style="font-size: 15px;" data-mce-style="font-size: 15px;"><span style="font-size: 15px;" data-mce-style="font-size: 15px;">http://alexeyka.zantsev.com/</span><br><style type="text/css"></style></BODY></HTML>