<HTML><BODY><p>for: <a href="http://lists.opensips.org/pipermail/users/2018-April/039206.html">http://lists.opensips.org/pipermail/users/2018-April/039206.html</a> <br><br><br>Hello</p><p>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</p><p>and core variables https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75</p><p>to determine the username in incoming INVITE (e.g. 00498970043400)<br>and forward this request to desirable destination '1000'</p><p>if(method=="REGISTER" && $rU==00498970043400) {<br> forward("10.0.0.10:5060"); # ip of 1000<br>}<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.</p><p><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.</p><p>PS: I'm not a experienced user of OpenSIPS, so check my advice twice...</p><br><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;"><a href="http://alexeyka.zantsev.com/">http://alexeyka.zantsev.com/</a> </span></BODY></HTML>