[OpenSIPS-Users] Matching dialog IDs

Kingsley Tart kingsley at dns99.co.uk
Thu Apr 8 23:04:56 EST 2021


Hi,

With OpenSIPS 3.1, on one example call I noted that:

 * did in Record-Route header was 5af.b5c82a2
 * dlg_id in DB table was 17201388227675
 * event_route[E_DLG_STATE_CHANGED] got hash_entry=4005 (param 1) and
   hash_id=44207195 (param 2)

I see these 3 sets of values are all essentially the same thing but in
a different format.

In a way it feels wrong to ask this but, is this guaranteed behaviour?


eg in the event route, this expression:

	$(param(1){s.dec2hex}{s.reverse}{s.tolower}) + "." +
$(param(2){s.dec2hex}{s.reverse}{s.tolower});

evaluates to "5af.b5c82a2", ie the did in the Record-Route header, and
that in MySQL I could derive the dlg_id value in the DB table (which
was 17201388227675) by doing XXXX*POW(2,32)+YYYYYYY where XXXX is the
value of $param(1) and YYYYYYY is the value of $param(2).

There may be a better way to do all this, but I'm trying to figure out
ways I can update the DB with some additional info at BYE time and
haven't currently found out how to do this more properly.

(again, this feels the wrong way to do it, but I have not yet found a
better way).

Cheers,
Kingsley.




More information about the Users mailing list