[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:29:55 CET 2008
Klaus Darilion wrote:
>
> Iñaki Baz Castillo wrote:
>> El Lunes, 15 de Diciembre de 2008, Klaus Darilion escribió:
>>> AFAIK the sl module registers a callback. It can detect ACK
>>> corresponding to stateless responses by certain parameter - I think it
>>> is encoded in the totag.
>> Wouldn't be better the Via "branch" parameter? (the ACK for a negative reply
>> has the same "branch" since it's part of the same transaction).
>> But there can be multiple's ACK with same To_tag (due to re-INVITE's during a
>> dialog).
>
> Maybe it is the branch parameter. I do not know. I only know that it
> uses one of these parameters.
I believe it does use the Via branch parameter, along with host and
port. In tags.h:calc_crc_suffix():
/*! \brief
* Generate variable part of to-tag for a request;
* it will have length of CRC16_LEN, sufficiently
* long buffer must be passed to the function */
static inline void calc_crc_suffix( struct sip_msg *msg, char *tag_suffix)
{
int ss_nr;
str suffix_source[3];
ss_nr=2;
if (msg->via1==0) return; /* no via, bad message */
suffix_source[0]=msg->via1->host;
suffix_source[1]=msg->via1->port_str;
if (msg->via1->branch)
suffix_source[ss_nr++]=msg->via1->branch->value;
crcitt_string_array( tag_suffix, suffix_source, ss_nr );
}
I would opine that this function should be renamed to be a little
clearer that it applies to the to-tag specifically. Otherwise,
calculate CRC suffix of what?
--
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