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

Fetching media_port fails if media_port+2 is unavailable #276

Closed
wdoekes opened this issue Nov 30, 2016 · 0 comments
Closed

Fetching media_port fails if media_port+2 is unavailable #276

wdoekes opened this issue Nov 30, 2016 · 0 comments
Milestone

Comments

@wdoekes
Copy link
Member

wdoekes commented Nov 30, 2016

If a port is found for audio, the video port is taken as port+2. If that is unavailable, things break fast

https://github.com/SIPp/sipp/blob/v3.5.1/src/sipp.cpp#L2184..L2202
^-- tries 100 times

https://github.com/SIPp/sipp/blob/v3.5.1/src/sipp.cpp#L2213..L2230
^-- simply takes audio_port+2

asteriskteam pushed a commit to asterisk/testsuite that referenced this issue Apr 23, 2018
SIPp correctly chooses an available port for audio, but unfortunately it then
attempts to bind to the audio port + n for things like rtcp and video without
first checking if those other ports are unused:

SIPp/sipp#276

This patch makes it so all ports needed by the scenario are available. It does
this by retrieving and checking for an unused port plus 'n' ports from the OS.
If the ports are available then the primary port is passed to the scenario using
the '-mp' option.

Change-Id: I3da461123afc30e1f5ca12e65d289eaa42d6de00
asteriskteam pushed a commit to asterisk/testsuite that referenced this issue Apr 23, 2018
SIPp correctly chooses an available port for audio, but unfortunately it then
attempts to bind to the audio port + n for things like rtcp and video without
first checking if those other ports are unused:

SIPp/sipp#276

This patch makes it so all ports needed by the scenario are available. It does
this by retrieving and checking for an unused port plus 'n' ports from the OS.
If the ports are available then the primary port is passed to the scenario using
the '-mp' option.

Change-Id: I3da461123afc30e1f5ca12e65d289eaa42d6de00
asteriskteam pushed a commit to asterisk/testsuite that referenced this issue Apr 23, 2018
SIPp correctly chooses an available port for audio, but unfortunately it then
attempts to bind to the audio port + n for things like rtcp and video without
first checking if those other ports are unused:

SIPp/sipp#276

This patch makes it so all ports needed by the scenario are available. It does
this by retrieving and checking for an unused port plus 'n' ports from the OS.
If the ports are available then the primary port is passed to the scenario using
the '-mp' option.

Change-Id: I3da461123afc30e1f5ca12e65d289eaa42d6de00
asteriskteam pushed a commit to asterisk/testsuite that referenced this issue Apr 23, 2018
SIPp correctly chooses an available port for audio, but unfortunately it then
attempts to bind to the audio port + n for things like rtcp and video without
first checking if those other ports are unused:

SIPp/sipp#276

This patch makes it so all ports needed by the scenario are available. It does
this by retrieving and checking for an unused port plus 'n' ports from the OS.
If the ports are available then the primary port is passed to the scenario using
the '-mp' option.

Change-Id: I3da461123afc30e1f5ca12e65d289eaa42d6de00
@wdoekes wdoekes added this to the 3.5 milestone May 9, 2018
wdoekes added a commit that referenced this issue May 14, 2018
When SIPp is allowed to pick a media_port by itself, it should take the
availability of media_port+2 into account as will. Previously it
would only retry media_port if the audio port was unavailable.

Closes #276. Fix suggested by @coreyfarrell.

Also cleaned up some code in the vicinity, removing media_ip_escaped
which was unused, and removing duplicate get_host_and_port calls.
wdoekes added a commit that referenced this issue Jul 2, 2018
When SIPp is allowed to pick a media_port by itself, it should take the
availability of media_port+2 for video into account as well. Previously
it would only retry media_port if the audio port was unavailable.

Closes #276. Fix suggested by @coreyfarrell.

Also cleaned up some code in the vicinity, removing media_ip_escaped
which was unused, and removing duplicate get_host_and_port calls.
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

No branches or pull requests

1 participant