[Serusers] ACK relaying?

Greg Fausak lgfausak at august.net
Thu Nov 27 16:19:33 CET 2003


 >                 if (method=="INVITE") {

this is the same mistake I made...

		if (method=="INVITE" | method=="ACK")

The ACK is a independant message, so the loose_route
doesn't pick it up.

---greg


Igor Diakonov wrote:
> 
> I'm new to ser. I'm trying to setup ser to handle registrations, local call's and forward all other call's to PSTN gateway.
> 
> 
> I cant get SER to send ACK's recieved from local client to PSTN gate...
> What am I doing wrong?
> 
> Here's my config file:
> 
> loadmodule "/usr/local/lib/ser/modules/mysql.so"
> 
> loadmodule "/usr/local/lib/ser/modules/sl.so"
> loadmodule "/usr/local/lib/ser/modules/tm.so"
> loadmodule "/usr/local/lib/ser/modules/rr.so"
> loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> 
> loadmodule "/usr/local/lib/ser/modules/registrar.so"
> loadmodule "/usr/local/lib/ser/modules/textops.so"
> 
> 
> loadmodule "/usr/local/lib/ser/modules/auth.so"
> loadmodule "/usr/local/lib/ser/modules/auth_db.so"
> 
> # ----------------- setting module-specific parameters ---------------
> 
> modparam("usrloc", "db_mode", 1)
> modparam("auth_db", "calculate_ha1", yes)
> modparam("auth_db", "password_column", "password")
> modparam("rr", "enable_full_lr", 1)
> 
> # -------------------------  request routing logic -------------------
> 
> # main routing logic
> 
> route{
>         if (!mf_process_maxfwd_header("10")) {
>                 sl_send_reply("483","Too Many Hops");
>                 break;
>         };
>        if (msg:len >=  max_len ) {
>                 sl_send_reply("513", "Message too big");
>                 break;
>         };
>         if (!method=="REGISTER") record_route();        
> 
>         # subsequent messages withing a dialog should take the
>         # path determined by record-routing
>         if (loose_route()) {
>                 # mark routing logic in request
>                 append_hf("P-hint: rr-enforced\r\n"); 
>                 route(1);
>                 break;
>         };
> 
>     if (uri==myself) {
>                 if (method=="REGISTER") {
>                         if (!www_authorize("quantum.ru", "subscriber")) {
>                                 www_challenge("quantum.ru", "0");
>                                 break;
>                         };
>                         save("location");
>                         break;
>                 };
>                 if (method=="INVITE") {
>                     if(lookup("location")) {
>                         append_hf("P-hint: usrloc applied\r\n"); 
>                         route(1);
>                         break;
>                     } else {
>                         if (uri=~"^sip:10372[0-9][0-9]@.*") {
>                             log(1,"**** user not found");
>                             sl_send_reply("404", "Not Found");
>                             break;
>                         } else {
>                              log (1, "Forwarding to PSTN");
>                              rewritehostport("194.186.xx.xx:5060");
>                              route(1);
>                             break;
>                         };
>                     };
>                 break;
>                 };
>     };
> }
> 
> 
> route[1] 
> {
>         # send it out now; use stateful forwarding as it works reliably
>         # even for UDP2TCP
>         if (!t_relay()) {
>                 sl_reply_error();
>         };
> }
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
> 
> 





More information about the sr-users mailing list