Thanks for the reply.

We have already came to the same conclusion by some testing in our
lab. It seems its a bug in provider which not constructing BYE message
properly.

But i'm interested in if its possible to detect the fault in this BYE
and construct a new one and then relay it to the UAC.

I mean can i do this :

contact-header = INVITE's contact-header
if (contact-header != BYE's ruri)
{
  construct BYE message with contact header
  t_relay()
 }

Cheers
aft


Hi aft,

I think to do what you want you can save Contact field + callid pair taken from the INVITEs that comes from your side.
Then when BYE comes from such provider you should find a correct Contact for that call-id and if it exists and not equal to R-URI you can rewrite it.

For example to write to R-URI value from $var(correct_ruri) you can use $ru = $var(correct_ruri); statement.

What about a place where contact can be saved, i think htable will be the nice one.
Please pay attention to "autoexpire" parameter of htable module. You should take care about the staled records to avoid memory usage problems.

Cheers,
Vitaliy Aleksandrov