Hi,

I have recently downloaded SER & SEMS and configured them for early_announce application as described in the early_announce module documentation. I am using SIPp to generate an incoming call to test the setup. Upon receiving ACK for some reason SER fails to match it  to the previous INVITE and tries to forward it to the destination statelessly and picks it up again and forwards it. It continues to do this until the max forward limit is reached.

 

I cannot figure out what is wrong. Any help is really appreciated.

 

 

Here is the Route section from ser-sems.cfg file that I am using

 

 

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

        record_route();

        # loose-route processing

        if (loose_route()) {

                t_relay();

                break;

        };

 

        if (uri==myself) {

            # filter unsupported requests

           if (!(method=="REGISTER" || method=="ACK" || method=="INVITE" ||

                        method=="BYE" || method=="CANCEL" )) {

                  sl_send_reply("501", "method not understood here");

                  break;

           }

 

           if (method=="REGISTER") {

                        # make UAs which want to register unhappy

                        sl_send_reply("501","registration couldn't be accepted");

                        break;

           };

 

                  if (!t_newtran()){

                  sl_send_reply("500","could not create transaction");

                  break;

                  };

 

           if (method == "INVITE") {

 

                  avp_write("Final-Reply-Code=405;Final-Reply-Reason=Prohiboted",

                                  "$sess_params");

 

                        if(!t_write_unix("/tmp/sems_sock","early_announce/early_headers")){

                        log("could not contact early_announce\n");

                        t_reply("404","not found");

                        };

                        break;

 

              }  else if (method=="BYE" || method=="CANCEL") {

                  if(!t_write_unix("/tmp/sems_sock","bye")) {

                              t_reply("500","error contacting sems");

                  };

                  break;

           } else if (method=="ACK"){

                        # absorb ACKs

                        t_relay();

                        break;

           };

           break;

        }

 

        if (!t_relay()) {

                sl_reply_error();

        };

}

 

 

Debug logs from SER

 

0(27347) SIP Request:

 0(27347)  method:  <ACK>

 0(27347)  uri:     <sip:service@10.107.2.246>

 0(27347)  version: <SIP/2.0>

 0(27347) parse_headers: flags=1

 0(27347) Found param type 232, <branch> = <0>; state=16

 0(27347) end of header reached, state=5

 0(27347) parse_headers: Via found, flags=1

 0(27347) parse_headers: this is the first via

 0(27347) After parse_msg...

 0(27347) preparing to run routing scripts...

 0(27347) DEBUG : sl_filter_ACK: to late to be a local ACK!

 0(27347) parse_headers: flags=128

 0(27347) Found param type 232, <branch> = <0>; state=16

 0(27347) end of header reached, state=5

 0(27347) parse_headers: Via found, flags=128

 0(27347) parse_headers: this is the second via

 0(27347) Found param type 232, <branch> = <z9hG4bK-27351-1-3>; state=16

 0(27347) end of header reached, state=5

 0(27347) parse_headers: Via found, flags=128

 0(27347) DEBUG: add_param: tag=79EBE47B-477CE4230002578E-B7F6D6C0

 0(27347) end of header reached, state=29

 0(27347) DEBUG: get_hdr_field: <To> [76]; uri=[sip:service@10.107.2.246:5060]

 0(27347) DEBUG: to body [sut <sip:service@10.107.2.246:5060>]

 0(27347) get_hdr_field: cseq <CSeq>: <1> <ACK>

 0(27347) DEBUG:maxfwd:is_maxfwd_present: value = 15

 0(27347) DEBUG: add_param: tag=27351SIPpTag001

 0(27347) end of header reached, state=29

 0(27347) parse_headers: flags=256

 0(27347) DEBUG: get_hdr_body : content_length=0

 0(27347) found end of header

 0(27347) find_first_route: No Route headers found

 0(27347) loose_route: There is no Route HF

 0(27347) grep_sock_info - checking if host==us: 12==12 &&  [10.107.2.246] == [10.107.2.246]

 0(27347) grep_sock_info - checking if port 5060 matches port 5060

 0(27347) DEBUG: t_newtran: msg id=4 , global msg id=3 , T on entrance=(nil)

 0(27347) parse_headers: flags=-1

 0(27347) parse_headers: flags=60

 0(27347) t_lookup_request: start searching: hash=30348, isACK=1

 0(27347) DEBUG: proceeding to pre-RFC3261 transaction matching

 0(27347) DEBUG: t_lookup_request: no transaction found

 0(27347) DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil)

 0(27347) parse_headers: flags=-1

 0(27347) parse_headers: flags=60

 0(27347) t_lookup_request: start searching: hash=30348, isACK=1

 0(27347) DEBUG: proceeding to pre-RFC3261 transaction matching

 0(27347) DEBUG: t_lookup_request: no transaction found

 0(27347) SER: forwarding ACK  statelessly

 0(27347) DEBUG: mk_proxy: doing DNS lookup...

 0(27347) check_via_address(10.107.2.246, 10.107.2.246, 0)

 0(27347) Sending:

ACK sip:service@10.107.2.246 SIP/2.0

 

Record-Route: <sip:10.107.2.246;ftag=27351SIPpTag001;lr=on>

 

Record-Route: <sip:10.107.2.246;ftag=27351SIPpTag001;lr=on>

 

Record-Route: <sip:10.107.2.246;ftag=27351SIPpTag001;lr=on>

 

Via: SIP/2.0/UDP 10.107.2.246;branch=0

 

Via: SIP/2.0/UDP 10.107.2.246;branch=0

 

Via: SIP/2.0/UDP 10.107.2.246;branch=0

 

Via: SIP/2.0/UDP 10.107.2.246:5061;branch=z9hG4bK-27351-1-3

 

From: sipp <sip:sipp@10.107.2.246:5061>;tag=27351SIPpTag001

 

To: sut <sip:service@10.107.2.246:5060>;tag=79EBE47B-477CE4230002578E-B7F6D6C0

 

Call-ID: 1-27351@10.107.2.246

 

CSeq: 1 ACK

 

Contact: sip:sipp@10.107.2.246:5061

 

Max-Forwards: 14

 

Subject: Performance Test

 

Content-Length: 0

 

 

 

 

--Srinivas Kotamarti