[OpenSIPS-Devel] GEtting the proper CSeq value from a module

Saúl Ibarra Corretgé saul at ag-projects.com
Wed Mar 12 08:48:21 CET 2014


Hi all,

I'm trying to find the proper way to fix https://github.com/OpenSIPS/opensips/issues/165 since we are close to a release. I need to obtain the CSeq value for a request/response, but get_cseq is not going to cut it. If dialog ping is used it could be internally mangled, so I want the mangled value.

I thought I could get the cseq_n value from the transaction as in https://github.com/OpenSIPS/opensips/blob/master/modules/tm/h_table.h#L235-L240 but unfortunately the docs disagree with the real world. cseq_n contains doesn't contain the number but the header itself.

The aforementioned issue raises because the header is something like "CSeq:42" (note the lack of a space). So it looks like I'd need to manually parse the CSeq header here?!

So, TLDR, how is a module supposed to get the CSeq for a request/response, even in the case OpenSIPS modifies it?


Thanks,

--
Saúl Ibarra Corretgé
AG Projects






More information about the Devel mailing list