Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug tcp invalid contact string #322

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tinpotnick
Copy link
Contributor

@tinpotnick tinpotnick commented Nov 29, 2023

When using TCP and REGISTER (or SUBSCRIBE) there is a problem with the contact string.

When a REGISTER occurs in sip-dialog-controller.cpp :1028 a session is registered - and UDP is excluded but TCP isn't. When a new INVITE is then sent out (sometime after the REGISTER).

sip-dialog-controller.cpp:443 enters the if statement. I have left the UDP check - however, it is superfluous as NULL is always passed in. But, because of the above test m_pController->findTportForSubscription will return for UDP but if there it TCP and a REGISTER has happened then it will return the session and set the contact string to the local IP.

This fix uses the proto to correct the contact string - but I am not 100% certain this is the correct way to fix this.

resolves #319

src/sip-dialog-controller.cpp Show resolved Hide resolved
entrypoint.sh Outdated
@@ -33,6 +33,11 @@ case $CLOUD in
;;
esac

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this change has anything to do with the stated issue, could it be removed from the PR

Dockerfile Outdated
@@ -2,7 +2,7 @@ FROM debian:bullseye-slim

RUN apt-get update \
&& apt-get -y --quiet --force-yes upgrade \
&& apt-get install -y --no-install-recommends ca-certificates gcc g++ make build-essential cmake git autoconf automake curl libtool libtool-bin libssl-dev libcurl4-openssl-dev zlib1g-dev libgoogle-perftools-dev \
&& apt-get install -y --no-install-recommends ca-certificates gcc g++ make build-essential cmake git autoconf automake curl libtool libtool-bin libssl-dev libcurl4-openssl-dev zlib1g-dev libgoogle-perftools-dev iproute2 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to remove changes from Dockerfile from this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contact header contains private address not external address
2 participants