[Serusers] kphone registration problem

Jorge Merlino jorge at teledata.com.uy
Mon Dec 1 14:38:00 CET 2003


Hello:

I'm trying to register kphone to my ser proxy using authentication with user 
and password but I can't make it work. 
In the identity configuration of kphone I have set "jorge" in "user part of 
SIP URL" and "authentication username" and I have set "asterix" in "host part 
of SIP URL" and "outbound proxy"
The same configuration with user and password works fine with windows 
messenger 4.7

---------------------------------------------------------------------------------------------------------

The error messages I get from kphone are these:

SipClient: Sending: 10:09:30.743
--------------------------------
REGISTER sip:asterix SIP/2.0
Via: SIP/2.0/UDP 192.168.2.175:5062
CSeq: 928 REGISTER
To: "jorge" <sip:jorge at asterix>
Expires: 900
From: "jorge" <sip:jorge at asterix>
Call-ID: 1234450217 at 192.168.2.175
Content-Length: 0
User-Agent: KPhone/3.12
Event: registration
Allow-Events: presence
Contact: "jorge" 
<sip:jorge at 192.168.2.175:5062;transport=udp>;q=1.0;methods="INVITE, MESSAGE, 
INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK"


SipClient: Receiving message...

SipClient: Received: 10:09:30.755
---------------------------------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.2.175:5062
CSeq: 928 REGISTER
To: "jorge" <sip:jorge at asterix>;tag=b27e1a1d33761e85846fc98f5f3a7e58.fbe3
From: "jorge" <sip:jorge at asterix>
Call-ID: 1234450217 at 192.168.2.175
WWW-Authenticate: Digest realm="asterix", 
nonce="3fcb14af87f1bd1110526a8d29ad258492f165bd"
Server: Sip EXpress router (0.8.11 (i386/linux))
Content-Length: 0

---------------------------------------------------------------------------------------------------------

And my ser.cfg file is this:

    alias="asterix"
    alias=192.168.2.176

    sip_warning=no

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

    fifo="/tmp/ser_fifo"


# Uncomment this if you want to use SQL database
    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/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)

    route{

      
        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;
        };

        record_route();
     
        if (loose_route()) {
            t_relay();
            break;
        };

      
        if (uri==myself) {

           
            if (uri =~ "^sip:9[0-9]*@asterix") {
                log ("enviando al asterisk\n");
                t_relay_to_udp("192.168.2.175", "5060");
                break;
            };
      
            if (method=="REGISTER") {

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

                save("location");
                break;
            };

            # native SIP destinations are handled using our USRLOC DB
            if (!lookup("location")) {
                sl_send_reply("404", "Not Found");
                break;
            };
        };

         if (!t_relay()) {
            sl_reply_error();
        };

    }








More information about the sr-users mailing list