[SR-Users] dispatcher didnt use the gateway

Karsten Horsmann khorsmann at gmail.com
Tue Apr 17 11:35:47 CEST 2012


Hi Reda,


i fix it. forward() is stateless and so one then i breaks many things
in my multihomed setup.
I use transaction for it and then it works.

To prevent internal Invites to get dispatched, i used the dst_ip.
I just want external incoming calls to be dispatched.

route[INVITE] {

        # -----------------------------------------------------------------
        # INVITE Message Handler
        # -----------------------------------------------------------------
        setflag(6);

        lookup("aliases");
        if (uri!=myself) {
                route(NAT);
                route(RELAY);
                return;
        };

#!ifdef WITH_DISPATCHER
        if (lookup("location") && (dst_ip==222.222.222.222)) {
                if(ds_select_domain("1", "4")) {
                      xlog("DISPATCHER ds_select_domain\n");
                      route(NAT);
                      xlog("DISPATCHER was in route-NAT now route-RELAY\n");
                      route(RELAY);
                      xlog("DISPATCHER was in route-RELAY\n");
                      return;
                }
        }
#!endif

        if (!lookup("location")) {
                xlog("404 User not found\n");
                sl_send_reply("404", "User Not Found");
                return;
        };

        route(NAT);
        route(RELAY);
}

route[RELAY] {

        # -----------------------------------------------------------------
        # Default Message Handler
        # -----------------------------------------------------------------

        t_on_reply("1");

        if (!t_relay()) {
                if (method=="INVITE" && isflagset(6)) {
                        unforce_rtp_proxy();
                };
                sl_reply_error();
        };
}



-- 
Mit freundlichen Grüßen
*Karsten Horsmann*



More information about the sr-users mailing list