[SR-Users] subst_hf to rewrite a contact header
Ben Hood
ben at relops.com
Tue Sep 25 00:24:00 CEST 2018
> On 24 Sep 2018, at 23:04, Alex Balashov <abalashov at evaristesys.com> wrote:
>
> On Mon, Sep 24, 2018 at 10:46:44PM +0100, Ben Hood wrote:
>
>> I was trying (as a temporary hack) to mangle this to become
>>
>> Contact: <sip:2018092417381900003 at 81.x.x.x <sip:2018092417381900003 at 81.x.x.x>>
>
> But that's not grammatically valid…
You are absolutely correct, but I don’t think that is what I wrote (might be a typo from me?). I was trying to produce:
Contact: <sip:2018092423082500003 at 81.x.x.x>
Which I have now achieved by adding
msg_apply_changes();
after the invocation of subst_hf().
Seems that the SIP buffer needs to be explicitly finalised before transport.
However, my theory about patching the Contact header to make the remote system happy is wrong - the 200 OK is still not ACK’ed. So I need to look into the NAT’ing a bit more to see what might be going on - but this is a different question to how to use subst_hf().
Many thanks for helping me out with this, very much appreciated.
More information about the sr-users
mailing list