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

Retry video RTP bind if port is taken. #344

Closed
wants to merge 1 commit into from
Closed

Retry video RTP bind if port is taken. #344

wants to merge 1 commit into from

Conversation

coreyfarrell
Copy link

Fixes #276

@coreyfarrell
Copy link
Author

This patch can be tested by running the following python:

from socket import *
s = socket(AF_INET, SOCK_DGRAM)
s.bind(('', 6002))

Then run a sipp scenario without designating a specific media port. Assuming UDP/6000 is available it will pick that for audio RTP, then try and fail UDP/6002 for video RTP. Current code exits with failure, my patch causes it to close both sockets and start over at the next media port (without resetting the retry count). I verified this patch using the Asterisk testsuite tests/channels/SIP/sip_hold with the python script holding UDP/6002 in the background.

@wdoekes
Copy link
Member

wdoekes commented May 14, 2018

Thanks for the patch!

Not so fond of the commando pattern with the goto and +=3 though. So I rewrote it a bit. Please try c1158cf (fix/3.5/retry-video-port-276).

@wdoekes wdoekes added this to the 3.5 milestone May 14, 2018
@coreyfarrell
Copy link
Author

@wdoekes updated patch works for me and I agree it looks better without the goto. Do you want me to close this PR or are you going to update it?

@wdoekes
Copy link
Member

wdoekes commented May 14, 2018

Thanks for testing. We can close this and I'll merge my branch.

@wdoekes wdoekes closed this May 14, 2018
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.

None yet

2 participants