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.38k stars 423 forks source link

SIPProxy #909

Open DavidTzur1 opened 1 year ago

DavidTzur1 commented 1 year ago

Hi, I try to build SIPProxy for IMS and i use the SIPProxy Example. I add to the SIPTransportRequestReceived logic ... else if (sipRequest.Method == SIPMethodsEnum.UPDATE) { logger.LogDebug("UPDATE") }

...

The problem is i don't get the UPDATE request Attach pcap - line 14 is update

Br, David Tzur

UPDate.zip

DavidTzur1 commented 1 year ago

Hi, Checking the code in the SIPTransport class, I see that for request with header Required return badRequireResp. I only use as proxy . Why the response is badRequireResp ?

Br. David Tzur

sipsorcery commented 1 year ago

If your application is operating as a SIP Proxy it shouldn't have a problem forwarding UPDATE requests. Are you bale to provide a SIP trace of the traffic into and out of the proxy?

The SIP peer the UPDATE request is being forwarded to might be rejeccting it. It's not a very common or well supported method.

DavidTzur1 commented 1 year ago

UPDate.zip

Add Trace

Br, David Tzur

DavidTzur1 commented 1 year ago

Hi,

This is code from the SIPHeader.cs(line 1762) it Causes the code in SIPTransport class return error

region Require.

                    else if (headerNameLower == SIPHeaders.SIP_HEADER_REQUIRE.ToLower())
                    {
                        sipHeader.Require = headerValue;

                        **if (!String.IsNullOrEmpty(sipHeader.Require))
                        {
                            sipHeader.RequiredExtensions = SIPExtensionHeaders.ParseSIPExtensions(sipHeader.Require, out 
                               sipHeader.UnknownRequireExtension);
                        }**
                    }