Contact header on pjsip

Hi everybody,
Does pjsip can add contact header on ack packet like chan_sip?
Details in below picture (red rectangle)

There’s nothing explicitly in chan_pjsip doing this, so it would be down to the PJSIP stack as to whether it would or not.

As far as I can tell, from a quick read of the RFC, a contact header in an ACK would serve no useful purpose. Although they are allowed, there is no case where they should be included, let alone ones where they must.

I suspect that you are dealing with a peer that is using Contact for purposes for which it wasn’t intended.

Thank you very much :brown_heart:

But the remote peer only see trunk is up when we send those contact header on ACK “200 OK” packet

The SIP message you provided is actually a 200 OK response, not an ACK. We most certainly place a Contact header in those for calls. You’re doing an OPTIONS though there and not a call. I don’t see why we’d place one in it, since there’s no ACK.

I think the OP was trying to show what a Contact header looked like.

Ah yeah, potentially.

You are rigth. It’s “200 OK” reponse we sent to other peer for OPTION method

It does not currently add a Contact header. According to the RFC we should, so please file an issue[1].

[1] https://issues.asterisk.org/jira

1 Like

Are you sure the RFC says it should. They only part that I found on this said it should on target refresh requests, but it also said that ACKs were not target refresh requests, unless I misread it.

1 Like

The example response to an OPTIONS included the Contact header, so I just went off of that. I looked closer in my no longer half asleep state and it states this:

Contact header fields MAY be present in a 200 (OK) response and have the same semantics as in a 3xx response.

Good old MAY. So, it may or may not be present I guess.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.