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?


Thanks,
Ed



On Fri, Oct 19, 2012 at 6:17 AM, Vitaliy Aleksandrov <vitalik.v...@gmail.com
> wrote:

>  If I understood you right you just need to rewrite R-URI domain and
> forward MESSAGE if a user in not registered.
>
> if (!lookup("location")) {
>     switch($retcode) {
>         case -1:
>             $rd = "gatewaydomain.com";
>             t_relay();
>             exit;
>         default:
>             sl_send_reply("404", "Not Found");
>             exit;
>     }
> }
>
>
> 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.
>
> User A sends a message addressed to "sip:12345678...@mydomain.com"
> Kamailio at mydomain.com checks if 12345678900 is a registered user in
> the system.
> If not, the message header is translated to
> "sip:12345678...@gatewaydomain..com" <sip:12345678...@gatewaydomain..com>and 
> forwarded.
> Incoming messages need to be accepted from their IP as well.
>
> It would also be useful if the address came as "
> sip:2345678...@mydomain.com" could be translated to "sip:*1*
> 2345678...@gatewaydomain.com".
>
>
> Is there any built in functionality I can configure for this, or will this
> need to be scripted?
>
>
> Thanks,
> Ed
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to