Will this also permit incoming messages from this domain? Do I need to add the gateway in any other settings besides the one you outlined?<br><br><br>Thanks,<br>Ed<br><br><br><br><div class="gmail_quote">On Fri, Oct 19, 2012 at 6:17 AM, Vitaliy Aleksandrov <span dir="ltr"><<a href="mailto:vitalik.voip@gmail.com" target="_blank">vitalik.voip@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
If I understood you right you just need to rewrite R-URI domain and
forward MESSAGE if a user in not registered.<br>
<br>
if (!lookup("location")) {<br>
switch($retcode) {<br>
case -1:<br>
$rd = "<a href="http://gatewaydomain.com" target="_blank">gatewaydomain.com</a>";<br>
t_relay();<br>
exit;<br>
default:<br>
sl_send_reply("404", "Not Found");<br>
exit;<br>
}<br>
}<br>
<br>
<blockquote type="cite"><div><div class="h5"><br>
I am trying to route SIP messages to a gateway. I am using SIP
MESSAGE over UDP as well as the MSILO module for storing messages
for users that aren't currently logged in. I have read through the
Dynamic Routing module info but am not able to determine the best
way to accomplish the routing I require. Our scenario is outlined
below.<br>
<br>
User A sends a message addressed to "<a href="mailto:sip%3A12345678900@mydomain.com" target="_blank">sip:12345678900@mydomain.com</a>"<br>
Kamailio at <a href="http://mydomain.com" target="_blank">mydomain.com</a>
checks if <a href="tel:12345678900" value="+12345678900" target="_blank">12345678900</a> is a registered user in the system. <br>
If not, the message header is translated to
<a href="mailto:sip:12345678900@gatewaydomain..com" target="_blank">"sip:12345678900@gatewaydomain..com"</a> and forwarded.<br>
Incoming messages need to be accepted from their IP as well.<br>
<br>
It would also be useful if the address came as "<a href="mailto:sip%3A2345678900@mydomain.com" target="_blank">sip:2345678900@mydomain.com</a>"
could be translated to "sip:<u>1</u><a href="mailto:2345678900@gatewaydomain.com" target="_blank">2345678900@gatewaydomain.com</a>".<br>
<br>
<br>
Is there any built in functionality I can configure for this, or
will this need to be scripted?<br>
<br>
<br>
Thanks,<br>
Ed<br>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br>