[Serusers] PDT problem

Alessio Focardi alessiof at interconnessioni.it
Thu Nov 13 11:42:02 CET 2003


After some hassles I succesfully installed pdt module.

Now when I compose 22220 before a number the uri is rewritten with
"iptel.org", here is a transcript:

11(14926) SIP Request:
11(14926)  method:  <INVITE>
11(14926)  uri:     <sip:222220555555 at sferica.net>
11(14926)  version: <SIP/2.0>
11(14926) parse_headers: flags=1
11(14926) Found param type 235, <rport> = <n/a>; state=6
11(14926) Found param type 232, <branch> = <z9hG4bK6D151D75538C4C19987ADC66F1B9505F>; state=16
11(14926) end of header reached, state=5
11(14926) parse_headers: Via found, flags=1
11(14926) parse_headers: this is the first via
11(14926) After parse_msg...
11(14926) preparing to run routing scripts...
11(14926) DEBUG : is_maxfwd_present: searching for max_forwards header
11(14926) parse_headers: flags=128
11(14926) end of header reached, state=9
11(14926) DEBUG: get_hdr_field: <To> [32]; uri=[sip:222220555555 at sferica.net]
11(14926) DEBUG: to body [<sip:222220555555 at sferica.net>
]
11(14926) get_hdr_field: cseq <CSeq>: <34431> <INVITE>
11(14926) DEBUG: is_maxfwd_present: value = 70
11(14926) PDT: update_new_uri: sip:555555 at iptel.org


but, in the software client what I get is a "403 No relay" error.

I'cant understand if the error is coming from my server, or from
iptel.org ....

Here is my config, any help will be appreciated, tnx !

debug=7
fork=yes
log_stderror=yes
alias=sferica.net



check_via=no    # (cmd. line: -v)
dns=no          # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)

#port=5060
#children=4

fifo="/tmp/ser_fifo"

# ------------------ module loading ----------------------------------


loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/pdt.so"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"

modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
modparam("pdt", "db_url", "sql://ser:heslo@localhost/pdt")    
modparam("pdt", "db_table", "domains")
modparam("pdt", "prefix", "2")
modparam("pdt", "start_range", 2000)
modparam("pdt", "hsize_2pow", 2)


# -------------------------  request routing logic -------------------

# main routing logic

route{

        
        
        # initial sanity checks -- messages with
        # max_forwards==0, or excessively long requests

        if (!mf_process_maxfwd_header("10")) {
                sl_send_reply("483","Too Many Hops");
                break;
        };
        
        if (len_gt( max_len )) {
                sl_send_reply("513", "Message too big");
                break;
        };
        
        
        prefix2domain();
                        
        # we record-route all messages -- to make sure that
        # subsequent messages will go through our proxy; that's
        # particularly good if upstream and downstream entities
        # use different transport protocol
        
        record_route(); 
        
        
        # loose-route processing
        
        
        
        if (loose_route()) {
                t_relay();
                break;
        };

        

        # if the request is for other domain use UsrLoc
        # (in case, it does not work, use the following command
        # with proper names and addresses in it)
        
                
        if (uri==myself) {

                if (method=="REGISTER") {

# Uncomment this if you want to use digest authentication
        
                        if (!www_authorize("sferica.net", "subscriber")) {
                                www_challenge("sferica.net", "0");
                                break;
                        };

                        save("location");
                        break;
                };
        
                        
                # native SIP destinations are handled using our USRLOC DB
                
                if (!lookup("location")) {
                
                        sl_send_reply("402", "Offline");
                        break;
                        
                        
                        # voicemail forward
                                                                
                        #rewritehostport("interconnessioni.it:5090");
                        #t_relay_to_udp("interconnessioni.it", "5090");
                        #break;
                };
        
        };
        
        # forward to current uri now; use stateful forwarding; that
        # works reliably even if we forward from TCP to UDP
        
                
        if (!t_relay()) {
                sl_reply_error();
        };

}


 
  

-- 
Best regards,
 Alessio                          mailto:alessiof at interconnessioni.it




More information about the sr-users mailing list