Hi,
When I modify INVITEs with set_contact_alias() / add_contact_alias(), this is not preserved in dialog data, and therefore not honoured in BYEs locally generated due to dialog timeout.
For example, if the initial INVITE contained:
Contact: sip:line1@192.168.1.100
and, after transit, became:
Contact: sip:line1@192.168.1.100;alias=1.1.1.1~25844~1
There is no ;alias value stored in the caller dialog data, just the original URI + parameters.
A related problem:
I tried to work around this by storing an alias in dialog user variables, e.g.
$dlg_var(alternate_ct) = $_s($si~$sp~$prid)
and in fact, I am able to recover this value later:
event_route[tm:local-request] { if($dlg_var(alternate_ct) ne $null) { $ru = $ru + ";alias=" + $dlg_var(alternate_ct); handle_ruri_alias(); } }
And in fact, if I print the value of $du after calling handle_ruri_alias(), I can see that it is modified. However, this seems to have no effect on where the request actually goes at the network and transport level. I assume this is because the event_route does not actually allow one to overwrite elements of the spoofed request, and that its essential attributes have been pre-populated elsewhere.
Nevertheless, the effect is that these BYEs do not reach NAT'd endpoints. Any suggestions are appreciated!
Thanks in advance,
-- Alex