On 27.01.2020 16:38, Alexander Perkins wrote:
when a call comes into my OpenSIPS server, I'd to send it to another SIP server.  Here's the flow

Call Comes In -> Hits OpenSIPS Server -> Needs to route to 2125551212@1.2.3.4 <mailto:2125551212@1.2.3.4>

How would I go about doing this?

Hi Alexander,

Starting from the default opensips.cfg [1], instead of looking up a registered device (the entire "if" block I linked), act as a proxy by rewriting the Request URI [2] of
your SIP request:

$ru = "sip:2125551212@1.2.3.4";

, then relay the request (no change needed there):

...
route(relay);
}

If you need to proxy the request further without editing its Request URI, you must set
the "Destination URI" or $du [3] variable instead.

Best regards,

[1]: https://github.com/OpenSIPS/opensips/blob/master/etc/opensips.cfg#L209
[2]: https://www.opensips.org/Documentation/Script-CoreVar-3-1#toc75
[3]: https://www.opensips.org/Documentation/Script-CoreVar-3-1#toc36

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020
  www.opensips.org/events
OpenSIPS Bootcamp, Miami, March 2020
  www.opensips.org/training

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to