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

Replaced SIPp -mp with -min_rtp_port #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/python/asterisk/sipp.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ def __evaluate_scenario_results(result):
default_args[defarg] = ('%s/sipp/%s' % (
self.test_dir, default_args[defarg]))

if '-mp' not in default_args:
if '-min_rtp_port' not in default_args:
Copy link
Member

Choose a reason for hiding this comment

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

This is not backwards compatible. Personally the SIPp I use isn't new enough to have this, so it would no longer work for me. I'm on Ubuntu 22.04, so I expect others would experience the same. Is the version shipping in distributions or has to be built manually? Is it possible to make this backwards compatible to support both based on detection of the version?

# Current 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
Expand All @@ -724,8 +724,9 @@ def __evaluate_scenario_results(result):
# ourselves, and make sure all associated ports are available.
#
# num = 4 = ports for audio rtp/rtcp and video rtp/rtcp
default_args['-mp'] = str(get_available_port(
default_args.get('-i'), num=4))
port = get_available_port(default_args.get('-i'), num=4)
default_args['-min_rtp_port'] = str(port)
default_args['-max_rtp_port'] = str(port + 3)

for (key, val) in default_args.items():
sipp_args.extend([key, val])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test-object-config:
-
scenarios:
- { 'key-args': { 'scenario': 'uac-no-hangup.xml', '-p': '5062', '-i': '127.0.0.1',
'-s': 'alice', '-rsa': '127.0.0.1:5061', '-s': 'alice', '-mp': '9050'} }
'-s': 'alice', '-rsa': '127.0.0.1:5061', '-s': 'alice', '-min_rtp_port': '9050'} }


ami-config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test-object-config:
-
scenarios:
- { 'key-args': { 'scenario': 'uas_asterisk.xml', '-i': '127.0.0.1', '-p': '5700'} }
- { 'key-args': { 'scenario': 'uac_g719_g711.xml', '-i': '127.0.0.1', '-p': '5061', '-s': '3200000000', '-d': '20000', '-mp': '6000'} }
- { 'key-args': { 'scenario': 'uac_g719_g711.xml', '-i': '127.0.0.1', '-p': '5061', '-s': '3200000000', '-d': '20000', '-min_rtp_port': '6000'} }

properties:
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion tests/channels/pjsip/rtp_ptime/non-transcode/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SIPP_SCENARIOS = [
'scenario' : 'uas_asterisk.xml',
'-i' : '127.0.0.1',
'-p' : '5700',
'-mp' : '6300',
'-min_rtp_port' : '6300',
'-message_file' : sippB_logfile,
'-error_file' : sippB_errfile,
'-trace_msg' : '-trace_err',
Expand Down
2 changes: 1 addition & 1 deletion tests/channels/pjsip/rtp_ptime/transcode/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SIPP_SCENARIOS = [
'scenario' : 'uas_asterisk.xml',
'-i' : '127.0.0.1',
'-p' : '5700',
'-mp' : '6300',
'-min_rtp_port' : '6300',
'-message_file' : sippB_logfile,
'-error_file' : sippB_errfile,
'-trace_msg' : '-trace_err',
Expand Down
4 changes: 2 additions & 2 deletions tests/codecs/opus/fec/jitterbuffer/adaptive/test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ test-object-config:
test-iterations:
-
scenarios:
- { 'key-args': { 'scenario':'invite_recv.xml', '-p':'5062', '-mp':'16002' } }
- { 'key-args': { 'scenario':'invite_recv.xml', '-p':'5062', '-min_rtp_port':'16002' } }
# Specify the RTP port so the rtp analyzer knows where to
# listen for packets. The analyzer defaults to 6001.
- { 'key-args': { 'scenario':'invite.xml', '-p':'5061', '-mp':'16001' } }
- { 'key-args': { 'scenario':'invite.xml', '-p':'5061', '-min_rtp_port':'16001' } }

rtp-analyzer-config:
# Expected time difference for ulaw
Expand Down
4 changes: 2 additions & 2 deletions tests/codecs/opus/fec/jitterbuffer/fixed/test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ test-object-config:
test-iterations:
-
scenarios:
- { 'key-args': { 'scenario':'invite_recv.xml', '-p':'5062', '-mp':'16002' } }
- { 'key-args': { 'scenario':'invite_recv.xml', '-p':'5062', '-min_rtp_port':'16002' } }
# Specify the RTP port so the rtp analyzer knows where to
# listen for packets. The analyzer defaults to 6001.
- { 'key-args': { 'scenario':'invite.xml', '-p':'5061', '-mp':'16001' } }
- { 'key-args': { 'scenario':'invite.xml', '-p':'5061', '-min_rtp_port':'16001' } }

rtp-analyzer-config:
# Expected time difference for ulaw
Expand Down
4 changes: 2 additions & 2 deletions tests/codecs/opus/fec/no_jitterbuffer/test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ test-object-config:
test-iterations:
-
scenarios:
- { 'key-args': { 'scenario':'invite_recv.xml', '-p':'5062', '-mp':'16002' } }
- { 'key-args': { 'scenario':'invite_recv.xml', '-p':'5062', '-min_rtp_port':'16002' } }
# Specify the RTP port so the rtp analyzer knows where to
# listen for packets. The analyzer defaults to 6001.
- { 'key-args': { 'scenario':'invite.xml', '-p':'5061', '-mp':'16001' } }
- { 'key-args': { 'scenario':'invite.xml', '-p':'5061', '-min_rtp_port':'16001' } }

rtp-analyzer-config:
# Expected time difference for ulaw
Expand Down