[Kamailio-Devel] How does Kamailio match an ACK for a stateless [3456]XX replied by Kamailio itself?

Alex Balashov abalashov at evaristesys.com
Mon Dec 15 12:22:38 CET 2008


No, Klaus is right.  It's something in the to-tag:

Check out sl_filter_ACK() in modules/sl/sl_funcs.c:

         if (msg->to) {
                 tag_str = &(get_to(msg)->tag_value);
                 if ( tag_str->len==TOTAG_VALUE_LEN )
                 {
                         /* calculate the variable part of to-tag */
                         calc_crc_suffix(msg, tag_suffix);
                         /* test whether to-tag equal now */
                         if (memcmp(tag_str->s,sl_tag.s,sl_tag.len)==0) {
                                 LM_DBG("local ACK found -> dropping 
it!\n");
                                 if_update_stat( sl_enable_stats, 
rcv_acks, 1);
                                 run_sl_callbacks( SLCB_ACK_IN, msg, 0, 
0, 0, 0 );
                                 return 0;
                         }
                 }
         }


calc_crc_suffix() is defined in tags.h.

Alex Balashov wrote:

> Iñaki Baz Castillo wrote:
> 
>> I just would like to know how Kamailio handles it, just curiosity. Of course, 
>> the current behaviour seems efficient (Kamailio doesn't need to generate a 
>> server transaction but at the same time it can absorb the ACK).
> 
> I could be wrong, but I would have thought that if a reply is being 
> generated by Kamailio itself, statelessly or otherwise, then the ACK 
> would be sent by far the end to the Kamailio host's address in the RURI. 
>    Whereas an end-to-end ACK is addressed and routed to the other 
> endpoint as a sequential request.
> 


-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the Devel mailing list