[Serusers] Debug information

Rick Gocher rgocher at coptalk.com
Thu Dec 18 20:38:39 CET 2003


Hi everyone,

Not sure if this was received,  here is my ser.cfg....


Thank you again for all your help,

Rick

At 07:43 PM 12/16/2003 +0000, Kannaiyan Natesan wrote:
>Can you please attach your ser.cfg file.
>
>Kannaiyan
>
>
>----- Original Message -----
>From: "Rick Gocher" <rgocher at coptalk.com>
>To: "Jesus Rodriguez" <jesusr at voztele.com>
>Cc: <serusers at lists.iptel.org>
>Sent: Tuesday, December 16, 2003 7:39 PM
>Subject: Re: [Serusers] Debug information
>
>
> > Hi,  please accept my apologies for asking the same questions.  I have
>read
> > through the sip tutorial, faqs and other docs with little success.  In my
> > ser.cfg I have uncommented these lines below (www_autorize) and once again
> > get unauthorized user when attempting to register with the ATA and Xten.
>I
> > have placed coptalk.com and sip.coptalk.com in the auth area of ser.cfg
> > with the same results.  In addition, I have tried changing my UID on the
> > ATA from Rick, to Rick at coptalk.com and Rick at sip.coptalk.com, all with bad
> > results.  When I do a serctl show Rick it returns the following;
> > +----------+------------------+-----------+---------------------+
> > | username | domain           | grp       | last_modified       |
> > +----------+------------------+-----------+---------------------+
> > | Rick     | sip.coptalk.com | free-pstn | 2003-12-07 16:56:29 |
> > | Rick     | sip.coptalk.com | local     | 2003-12-07 16:07:13 |
> > +----------+------------------+-----------+---------------------+
> >
> > This means there is a user named Rick and he should be able to register,
>right?
> >
> >
> > Thanks again for all your help,
> >
> > Rick
> >
> >
> >
> > At 11:08 AM 12/16/2003 +0100, Jesus Rodriguez wrote:
> > >On Mon, 15 Dec 2003, Rick Gocher wrote:
> > >
> > >Hi,
> > >
> > > >                  #       if (!www_authorize("coptalk.com",
>"subscriber")) {
> > > >                  #               www_challenge("coptalk.com", "0");
> > >
> > >This is the domain you have to use. The domain that you challenge is the
> > >domain that must be sent in your credentials. If you use sip.coptalk.com,
>then
> > >you have to challenge sip.coptalk.com instead coptalk.com as you are
>doing
> > >now.
> > >
> > >
> > > > At 12:45 PM 12/15/2003 +0100, Jesus Rodriguez wrote:
> > > > >On Fri, 12 Dec 2003, Rick Gocher wrote:
> > > > >
> > > > >Hello,
> > > > >
> > > > > > I'm not sure how to change the way the ata sends it credentials.
>I
> > > have my
> > > > > > name Rick listed for the UID:0 and UID:1 and the password for that
> > > user.  I
> > > > > > filled in the gateway as both an IP and FQDN with neither changing
>the
> > > > > > actual problem.  I tried placing @coptalk.com and @sip.coptalk.com
> > > behind
> > > > > > my UID: i.e. Rick at sip.coptalk.com but then the ngrep reports
> > > Unauthorized.
> > > > > > etc. sip:Rick at sip.coptalk.com@sip.coptalk.com....  If I can't
> > > change the
> > > > > > ata perhaps I can change the way ser challenges?
> > > > >
> > > > >With Cisco ATA you don't need the gateway field. You have to fill:
> > > > >
> > > > >UID0
> > > > >PWD0
> > > > >GkOrProxy
> > > > >UseSIP
> > > > >
> > > > >(and others, but these are required).
> > > > >
> > > > >For example, you have:
> > > > >
> > > > >UID0 = Rick
> > > > >PWD0 = password
> > > > >GkOrProxy = sip.coptalk.com
> > > > >UseSIP = 1
> > > > >
> > > > >Then, in SER you have to set you domain as sip.coptalk.com and NOT
> > > > >coptalk.com. You MUST use the same domain in SER and ATA. If you set
> > > GkOrPRoxy
> > > > >in ATA as coptalk.com then SER must challenge coptalk.com.
> > > > >
> > > > >Regards.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > At 12:42 AM 12/12/2003 +0100, Jesus Rodriguez wrote:
> > > > > > >On Thu, 11 Dec 2003, Rick Gocher wrote:
> > > > > > >
> > > > > > >Hello,
> > > > > > >
> > > > > > > > Just me, still trying to get authentication working...  I have
> > > found by
> > > > > > > > placing a high debug value and starting ser I received some
>errors
> > > > > I never
> > > > > > > > saw before as I had no ata box plugged in during the startup.
>I'm
> > > > > not sure
> > > > > > > > if this points to why I can't authenticate.  When the output
>says
> > > > > there is
> > > > > > > > no routing headers, is that the fault of my ATA?
> > > > > > >
> > > > > > >I think was Jan who gave you the answer. SER is trying to
> > > challenge with
> > > > > > >domain sip.coptalk.com but you are sending credentials as
>coptalk.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) SIP Request:
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583)  method:  <REGISTER>
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583)  uri:
><sip:sip.coptalk.com>
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583)  version: <SIP/2.0>
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) parse_headers: flags=1
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) end of header reached,
>state=5
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) parse_headers: Via found,
>flags=1
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) parse_headers: this is the
> > > first via
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) After parse_msg...
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) preparing to run routing
> > > scripts...
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) entering main route 8(4583)
> > > DEBUG :
> > > > > > > > is_maxfwd_present: searching for max_forwards header
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) parse_headers: flags=128
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) end of header reached,
>state=8
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) DEBUG: get_hdr_field: <To>
>[27];
> > > > > > > > uri=[sip:Rick at sip.coptalk.com]
> > > > > > > > Dec 11 16:07:19 sip ser:
> > > > > > > > Dec 11 16:07:19 sip ser: ]
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) get_hdr_field: cseq <CSeq>:
><7>
> > > > > > > <REGISTER>
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) DEBUG: get_hdr_body :
> > > > > content_length=0
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) found end of header
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) DEBUG: is_maxfwd_present:
> > > > > max_forwards
> > > > > > > > header not found!
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) DEBUG: add_param:
>tag=1804086518
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) end of header reached,
>state=29
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) parse_headers: flags=256
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) find_first_route(): No Route
> > > headers
> > > > > > > found
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) loose_route(): There is no
> > > Route HF
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) check_self - checking if
> > > > > host==us: 16==9
> > > > > > > > &&  [sip.coptalk.com] == [127.0.0.1]
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) check_self - checking if
>port
> > > 5060
> > > > > > > > matches port 5060
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) check_self - checking if
> > > > > host==us: 16==13
> > > > > > > > &&  [sip.coptalk.com] == [64.189.165.205]
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) check_self - checking if
>port
> > > 5060
> > > > > > > > matches port 5060
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) request for registration
>8(4583)
> > > > > > > > check_nonce(): comparing
> > > [3fd907c2aa2d6c72cd666f9109e45155055b2d36] and
> > > > > > > > [3fd907c23a57f75133a55828041f2c9ee7b081c2]
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) pre_auth(): Invalid nonce
>value
> > > > > received,
> > > > > > > > very suspicious !
> > > > > > > > Dec 11 16:07:19 sip ser:
> > > > > > > > Dec 11 16:07:19 sip ser: '
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) parse_headers: flags=-1
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583)
>check_via_address(64.189.165.206,
> > > > > > > > 64.189.165.206, 0)
> > > > > > > > Dec 11 16:07:19 sip ser:  8(4583) receive_msg: cleaning up
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) SIP Request:
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581)  method:  <REGISTER>
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581)  uri:
><sip:sip.coptalk.com>
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581)  version: <SIP/2.0>
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) parse_headers: flags=1
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) end of header reached,
>state=5
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) parse_headers: Via found,
>flags=1
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) parse_headers: this is the
> > > first via
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) After parse_msg...
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) preparing to run routing
> > > scripts...
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) entering main route 6(4581)
> > > DEBUG :
> > > > > > > > is_maxfwd_present: searching for max_forwards header
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) parse_headers: flags=128
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) end of header reached,
>state=8
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) DEBUG: get_hdr_field: <To>
>[27];
> > > > > > > > uri=[sip:Rick at sip.coptalk.com]
> > > > > > > > Dec 11 16:07:19 sip ser:
> > > > > > > > Dec 11 16:07:19 sip ser: ]
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) get_hdr_field: cseq <CSeq>:
><8>
> > > > > > > <REGISTER>
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) DEBUG: get_hdr_body :
> > > > > content_length=0
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) found end of header
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) DEBUG: is_maxfwd_present:
> > > > > max_forwards
> > > > > > > > header not found!
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) DEBUG: add_param:
>tag=1804086518
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) end of header reached,
>state=29
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) parse_headers: flags=256
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) find_first_route(): No Route
> > > headers
> > > > > > > found
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) loose_route(): There is no
> > > Route HF
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) check_self - checking if
> > > > > host==us: 16==9
> > > > > > > > &&  [sip.coptalk.com] == [127.0.0.1]
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) check_self - checking if
>port
> > > 5060
> > > > > > > > matches port 5060
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) check_self - checking if
> > > > > host==us: 16==13
> > > > > > > > &&  [sip.coptalk.com] == [64.189.165.205]
> > > > > > > > Dec 11 16:07:19 sip ser:  6(4581) check_self - checking if
>port
> > > 5060
> > > > > > > > matches port 5060
> > > > > > > > Dec 11 16:07:20 sip ser:  6(4581) request for registration
>6(4581)
> > > > > > > > check_nonce(): comparing
> > > [3fd907e3929aea9bad25fbd47b3ea062d9215574] and
> > > > > > > > [3fd907e3929aea9bad25fbd47b3ea062d9215574]
> > > > > > > > Dec 11 16:07:20 sip ser:  6(4581) get_ha1(): no result for
>user
> > > > > > > > 'Rick at coptalk.com'
> > > > > > > > Dec 11 16:07:20 sip ser:
> > > > > > > > Dec 11 16:07:20 sip ser: '
> > > > > > > > Dec 11 16:07:20 sip ser:  6(4581) parse_headers: flags=-1
> > > > > > > > Dec 11 16:07:20 sip ser:  6(4581)
>check_via_address(64.189.165.206,
> > > > > > > > 64.189.165.206, 0)
> > > > > > > > Dec 11 16:07:20 sip ser:  6(4581) receive_msg: cleaning up
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Serusers mailing list
> > > > > > > > serusers at lists.iptel.org
> > > > > > > > http://lists.iptel.org/mailman/listinfo/serusers
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >Saludos
> > > > > > >JesusR.
> > > > > > >
> > > > > > >-------------------------------
> > > > > > >Jesus Rodriguez
> > > > > > >VozTelecom Sistemas, S.L.
> > > > > > >jesusr at voztele.com
> > > > > > >http://www.voztele.com
> > > > > > >Tel. 902360305
> > > > > > >-------------------------------
> > > > > >
> > > > >
> > > > >
> > > > >Saludos
> > > > >JesusR.
> > > > >
> > > > >-------------------------------
> > > > >Jesus Rodriguez
> > > > >VozTelecom Sistemas, S.L.
> > > > >jesusr at voztele.com
> > > > >http://www.voztele.com
> > > > >Tel. 902360305
> > > > >-------------------------------
> > > >
> > >
> > >
> > >Saludos
> > >JesusR.
> > >
> > >-------------------------------
> > >Jesus Rodriguez
> > >VozTelecom Sistemas, S.L.
> > >jesusr at voztele.com
> > >http://www.voztele.com
> > >Tel. 902360305
> > >-------------------------------
> >
> > _______________________________________________
> > Serusers mailing list
> > serusers at lists.iptel.org
> > http://lists.iptel.org/mailman/listinfo/serusers
> >
-------------- next part --------------
# $Id: ser.cfg,v 1.20 2003/05/31 21:12:19 jiri Exp $
#
# simple quick-start config script
#

# ----------- global configuration parameters ------------------------

debug=8
fork=yes
log_stderror=yes

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"
sip_warning=no
#
# ------------------ module loading ----------------------------------
#
#
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/uri.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
loadmodule "/usr/lib/ser/modules/textops.so"
loadmodule "/usr/lib/ser/modules/group.so"
loadmodule "/usr/lib/ser/modules/pa.so"
#loadmodule "/usr/lib/ser/modules/msilo.so"


#
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 2)
modparam("acc", "log_missed_flag", 2)
modparam("acc", "log_fmt", "fimos")
#
#modparam("tm", "fr_inv_timer", 35)  #INVITE timeout
#

modparam("auth_db", "db_url","sql://ser:secret@localhost/ser")
modparam("usrloc", "db_url", "sql://ser:secret@localhost/ser")
modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
 # ----------------- setting module-specific parameters ---------------

 # main routing logic
alias="coptalk.com"
alias="sip"
alias="64.189.165.205"
alias="sip.coptalk.com"
#
route{
        log(1,"entering main 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 (msg:len >=  max_len ) {
                sl_send_reply("513", "Message too big");
                break;
        };

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

        setflag(2);     #set flag for accounting

        # 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") {
                        # digest authentication
                        log(1,"request for registration");
                        if (!www_authorize("sip.coptalk.com", "subscriber")) {
                                www_challenge("sip.coptalk.com", "0");
                                break;
                        };
                        save("location");
                        break;
                };

/* ********** Dial out to PSTN logic ************* */

                #forward numerical 7 digit requests to gateway
# if request URI is numerical, forward the request to PSTN gateway...
if (uri=~"^sip:[0-9]+ at coptalk.com") { # match using a regular expression
    forward( 65.189.155.101, 5060 );
} else { # ... forward the request to user location server otherwise
    forward( 65.189.155.101, 5060 );

                };
                #forward numerical 10 digit requests to gateway, append a 7 first
                if(uri=~"^sip:[0-9]{10}@(coptalk\.com|64\.189\.165\.205)"){
                        prefix("7");
                        rewritehostport("65.189.155.101:5060");
                        log(1,"10 digit expression match, prefix 1");
                        route(2);
                        break;
                };
                #forward numerical 11 digit requests that start with a 1 to GW
                if(uri=~"^sip:7[0-9]{10}@(coptalk\.com|64\.189\.165\.205)"){
                        rewritehostport("65.189.155.101:5060");
                        log(1,"10 digit exp match w/leading 1");
                        route(2);
                        break;
                };
                #forward international N digit requests to gateway
                if(uri=~"^sip:011[0-9]+@(coptalk\.com|64\.189\.165\.205)"){
                        rewritehostport("65.189.155.101:5060");
                        log(1,"international expression match");
                        route(2);
                        break;
                };

/*  ****** Find Aliases and Locations of users ********* */

# It is very important to lookup "aliases" before looking up "locations"

                if(!lookup("aliases")){
                        log(1,"Couldn't find any matching alias");
                        sl_send_reply("404", "User does not exist");
                        break;
                };

                if(!lookup("location")) {
                        log(1,"unable to locate user");
                        route(3);
                        break;
                };

        };


        # forward to current uri now; use stateful forwarding; that
        # works reliably even if we forward from TCP to UDP
        t_on_failure("1");
        if (!t_relay()) {
                sl_reply_error();
        };
        log(1,"eof");
}

route[2]{
        log(1,"route[2]:SIP-to-PSTN call routed");
        if(!t_relay()){
                sl_reply_error();
        };
}


More information about the sr-users mailing list