[OpenSIPS-Users] register to a sip server
Alexey K.
kurgan-rus at inbox.ru
Fri Apr 13 07:57:06 EDT 2018
Hello
As the simplest example, having 10 or smth like that DIDs/inner phone numbers,
you may use just core functions -
https://www.opensips.org/Documentation/Script-CoreFunctions-2-3#toc18
and core variables https://www.opensips.org/Documentation/Script-CoreVar-2-3#toc75
to determine the username in incoming INVITE (e.g. 00498970043400)
and forward this request to desirable destination '1000'
if(method=="REGISTER" && $rU==00498970043400) {
forward("10.0.0.10:5060"); # ip of 1000
}
OpenSIPS is extremely flexible, you may set/rewrite almost any SIP parameter using it -
destination IP, destination username in uri and so on.
But of course hardcoding in the script is not the best way. If you have a lot of relations
"DID - inner exten" it's better to have a static code with AVP variables and get the values from
some database, using some of CACHEDB_ module.
PS: I'm not a experienced user of OpenSIPS, so check my advice twice...
-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180413/27c3500f/attachment-0001.html>
More information about the Users
mailing list