[Serusers] parse_hfs(): Error while parsing headers

mma mmouhiha at softiphone.net
Thu Jun 9 10:15:33 CEST 2005


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ser.cfg
/////////////////////////////////////////////////////////////////////////////
debug=4         # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no        # (cmd line: -E)
#memlog=5 # memory debug log level
#log_facility=LOG_LOCAL0 # sets the facility used for logging (see syslog(3))

#Uncomment these lines to enter debugging mode
fork=no
log_stderror=yes


check_via=no    # (cmd. line: -v)
dns=no           # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
port=5060
children=4
listen=sip.server.net
listen=192.168.1.70
fifo="/tmp/ser_fifo"
#user=ser
#group=ser
#fifo_user=ser # owner of the ser fifo
#fifo_group=ser
#fifo_mode=0660 # fifo's permissions
#disable_core=yes #disables core dumping
#open_fd_limit=1024 # sets the open file descriptors limit
#mhomed=yes  # usefull for multihomed hosts, small performance penalty
#disable_tcp=yes
#tcp_accept_aliases=yes # accepts the tcp alias via option (see NEWS)

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

# Uncomment this if you want to use SQL database
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/pa.so"

# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/ser/modules/auth.so"
#loadmodule "/usr/local/lib/ser/modules/auth_db.so"

# ----------------- setting module-specific parameters ---------------

# -- usrloc params --
modparam("usrloc", "db_mode",   0)
modparam("usrloc", "use_domain", 1)
modparam("registrar", "use_domain", 1)

# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
#modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")

# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)

#-- pa params --
modparam("pa", "pa_domain", "sip.server.net")
modparam("pa", "db_url", "mysql://ser:heslo@localhost/ser")
#modparam("pa", "default_expires",50)
modparam("pa", "default_expires",3600)


# -------------------------  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 (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
        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) {
                # mark routing logic in request
                append_hf("P-hint: outbound\r\n");
                route(1);
                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 (uri=~"^sip:(.+@)?(192\.168\.1\.70|(sip\.)?server\.net)([:;\?].*)?$"){


                if (method=="REGISTER") {

                        #log(1,"REGISTRAR BEGIN\n");
# Uncomment this if you want to use digest authentication
#                       if (!www_authorize("iptel.org", "subscriber")) {
#                               www_challenge("iptel.org", "0");
#                               break;
#                       };
                        save("location");
                        #log(1,"REGISTRAR END\n");
                        break;
                };


                if (method=="SUBSCRIBE")
                {

                        #log(1,"SUBSCRIBE BEGIN\n");
                        if (!t_newtran())
                        {
                                log(1, "newtran error\n");
                                sl_reply_error();
                        };
                        handle_subscription("registrar");
                        #log(1,"SUBSCRIBE END\n");
                        break;
                };


                lookup("aliases");
                if (!uri==myself) {
                        append_hf("P-hint: outbound alias\r\n");
                        route(1);
                        break;
                };

                # native SIP destinations are handled using our USRLOC DB
                if (!lookup("location")) {
                        sl_send_reply("404", "Not Found");
                        break;
                };
        };
        append_hf("P-hint: usrloc applied\r\n");
        route(1);
}

route[1]
{
        # send it out now; use stateful forwarding as it works reliably
        # even for UDP2TCP
        if (!t_relay()) {
                sl_reply_error();
        };
}




  ----- Original Message ----- 
  From: mma 
  To: serusers at lists.iptel.org 
  Sent: Thursday, June 09, 2005 10:10 AM
  Subject: [Serusers] parse_hfs(): Error while parsing headers


        ***********************
        Pas de virus detecté dans l'attachement no filename
        Pas de virus detecté dans l'attachement no filename
        Pas de virus detecté dans l'attachement no filename

        Votre Mail a été vérifié par InterScan.
        ***********-***********

       


  i 'm connecting to SER, which running on 192.168.1.70  'sip.server.net', using Windows Messenger 
  i add user2 to my contact list

  i have this errors in response to a SUBSCRIBE request
  parse_hfs(): Error while parsing headers

  handle_subscription(): Error while parsing message header

  can somebody help me

  Regards

  ////////////////////////////////////////////////////////////////////////////////
  0(2945) SIP Request:
   0(2945)  method:  <REGISTER>
   0(2945)  uri:     <sip:sip.server.net>
   0(2945)  version: <SIP/2.0>
   0(2945) parse_headers: flags=2
   0(2945) end of header reached, state=5
   0(2945) parse_headers: Via found, flags=2
   0(2945) parse_headers: this is the first via
   0(2945) After parse_msg...
   0(2945) preparing to run routing scripts...
   0(2945) parse_headers: flags=100
   0(2945) DEBUG:maxfwd:is_maxfwd_present: value = 70
   0(2945) DBG:maxfwd:process_maxfwd_header: value 70 decreased to 16
   0(2945) parse_headers: flags=200
   0(2945) end of header reached, state=9
   0(2945) DEBUG: get_hdr_field: <To> [34]; uri=[sip:user1 at sip.server.net]
   0(2945) DEBUG: to body [<sip:user1 at sip.server.net>^M
  ]
   0(2945) get_hdr_field: cseq <CSeq>: <1> <REGISTER>
   0(2945) DEBUG: get_hdr_body : content_length=0
   0(2945) found end of header
   0(2945) find_first_route: No Route headers found
   0(2945) loose_route: There is no Route HF
   0(2945) grep_sock_info - checking if host==us: 18==18 &&  [sip.server.net] == [sip.server.net]
   0(2945) grep_sock_info - checking if port 5060 matches port 5060
   0(2945) parse_headers: flags=ffffffffffffffff
   0(2945) parse_headers: flags=4000000
   0(2945) build_contact(): Created Contact HF: Contact: <sip:192.168.1.118:14310>;expires=3600^M
  0(2945) parse_headers: flags=ffffffffffffffff
   0(2945) check_via_address(192.168.1.118, 192.168.1.118, 0)
   0(2945) DEBUG:destroy_avp_list: destroying list (nil)
   0(2945) receive_msg: cleaning up
   0(2945) SIP Request:
   0(2945)  method:  <SUBSCRIBE>
   0(2945)  uri:     <sip:user2 at sip.server.net>
   0(2945)  version: <SIP/2.0>
   0(2945) parse_headers: flags=2
   0(2945) end of header reached, state=5
   0(2945) parse_headers: Via found, flags=2
   0(2945) parse_headers: this is the first via
   0(2945) After parse_msg...
   0(2945) preparing to run routing scripts...
   0(2945) parse_headers: flags=100
   0(2945) DEBUG:maxfwd:is_maxfwd_present: value = 70
   0(2945) DBG:maxfwd:process_maxfwd_header: value 70 decreased to 16
   0(2945) parse_headers: flags=10
   0(2945) DEBUG: add_param: tag=963f17727b404c5ca92bd1ad97491e13
   0(2945) DEBUG: add_param: epid=db4638b430
   0(2945) end of header reached, state=29
   0(2945) parse_headers: flags=200
   0(2945) end of header reached, state=9
   0(2945) DEBUG: get_hdr_field: <To> [33]; uri=[sip:user2 at sip.server.net]
   0(2945) DEBUG: to body [<sip:user2 at sip.server.net>^M
  ]
   0(2945) get_hdr_field: cseq <CSeq>: <1> <SUBSCRIBE>
   0(2945) DEBUG: get_hdr_body : content_length=0
   0(2945) found end of header
   0(2945) find_first_route: No Route headers found
   0(2945) loose_route: There is no Route HF
   0(2945) grep_sock_info - checking if host==us: 18==18 &&  [sip.server.net] == [sip.server.net]
   0(2945) grep_sock_info - checking if port 5060 matches port 5060
   0(2945) DEBUG: t_newtran: msg id=2 , global msg id=0 , T on entrance=0xffffffff
   0(2945) parse_headers: flags=ffffffffffffffff
   0(2945) parse_headers: flags=78
   0(2945) t_lookup_request: start searching: hash=53801, isACK=0
   0(2945) DEBUG: proceeding to pre-RFC3261 transaction matching
   0(2945) DEBUG: t_lookup_request: no transaction found
   0(2945) handle_subscription() entered
   0(2945) parse_headers: flags=304010
   0(2945) parse_hfs(): Error while parsing headers
   0(2945) handle_subscription(): Error while parsing message header
   0(2945) handle_subscription about to send_reply and return -2
   0(2945) DEBUG: t_check: msg id=2 global id=2 T start=0x422efda0
   0(2945) DEBUG: t_check: T already found!
   0(2945) parse_headers: flags=ffffffffffffffff
   0(2945) check_via_address(192.168.1.118, 192.168.1.118, 0)
   0(2945) DEBUG: cleanup_uac_timers: RETR/FR timers reset
   0(2945) DEBUG: add_to_tail_of_timer[2]: 0x422efde8
   0(2945) DEBUG: reply sent out. buf=0x8138d64: SIP/2.0 4..., shmem=0x422f13d8: SIP/2.0 4
   0(2945) DEBUG: _reply_light: finished
   0(2945) DEBUG:destroy_avp_list: destroying list (nil)
   0(2945) receive_msg: cleaning up
   0(2945) SIP Request:






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


  _______________________________________________
  Serusers mailing list
  serusers at lists.iptel.org
  http://lists.iptel.org/mailman/listinfo/serusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050609/336a3ce6/attachment.htm>


More information about the sr-users mailing list