RFC8599 support
Hi,
I’m looking for the right way to add details into the Contact URI here:
https://github.com/versatica/JsSIP/blob/5f5da6b802554be4f857cad5671154184308a21b/lib/UA.js#L874
As per:
https://tools.ietf.org/html/rfc8599#section-4
Like:
Contact: <sip:[email protected];
pn-provider=acme;
pn-param=acme-param;
pn-prid=ZTY4ZDJlMzODE1NmUgKi0K>
We’re also discussing this here:
https://github.com/cloudwebrtc/dart-sip-ua/issues/89
Thanks.
That would be great!
The same way Registrator provides a setExtraContactParams method, it can be added a new setExtraContactUriParams. Whenever it comes to generate the Contact header field within Registrator, you have to parse this._contact, add the corresponding URI params and stringify.
Or setExtraContactUriParams could generate this._contact itself.
Summarizing:
setExtraContactUriParams(params) {
const contact = JsSIP.Grammar.parse(this._contact, 'Contact')[0].parsed;
contact.uri.clearParams();
for (const { key, value } of params) {
contact.uri.setParam(key, value);
}
this._contact = contact.toString();
}
That makes sense and keeps it consistent. I'll read your contributors guide. Thanks.
contact.uri.clearParams();
Would this not clear out any existing contact uri params?
Sorry, I mean
this._contact = contact.toString();
Sorry, I mean when you do this.
All working on our side - https://github.com/cloudwebrtc/dart-sip-ua/pull/117
Will look to add this to JsSIP too.
Hi @ghenry,
Are you willing go on with the contribution? Let's close this issue.
Hi @jmillan
My company was acquired from me July last year, so it's not something I'm focusing on any more. Apologies.
https://blog.surevoip.co.uk/2021/12/15/telcoswitch-acquires-surevoip-to-enhance-sme-presence-and-network-capabilities/
Thanks for the chaser.
Gavin.