sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.42k stars 431 forks source link

Contact header IP rewrite #1078

Closed Chali-Anne closed 4 months ago

Chali-Anne commented 6 months ago

Free softphones such as MicroSIP support IP rewrite, which sets the Contact header to be the public facing address instead of the internal one on subsequent SIP calls. I would like to introduce this concept to SIPSorcery's user agents.

DavidMartynWood commented 6 months ago

It's possible to customise the outgoing request/reply header by implementing the callbacks CustomiseRequestHeader and CustomiseResponseHeader on the SIPTransport class. This should allow you to carefully rewrite the contact header.

DavidMartynWood commented 4 months ago

Are you happy to close this issue?

Chali-Anne commented 4 months ago

Sorry for the delay, yes in the end I've turned to the transport to rewrite the contact header. Thank you 🌸