-
Notifications
You must be signed in to change notification settings - Fork 428
Snom patch: rtp_echo action #259
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
Conversation
wdoekes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lacks documentation. A simple test case that uses the new rtp_echo and doesn't die because of unimplemented commands would be better than nothing.
src/call.cpp
Outdated
| #ifdef RTP_STREAM | ||
| } else if (currentAction->getActionType() == CAction::E_AT_RTP_ECHO) { | ||
| rtp_echo_state = (currentAction->getDoubleValue() != 0 ? true : false); | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an RTP_STREAM ifdef below on line 3693, why not put it in there.
And rtp_echo_state = (currentAction->getDoubleValue() != 0) is explicit enough for a boolean assignment.
src/scenario.cpp
Outdated
| } else if(!strcmp(actionElem, "rtp_echo")) { | ||
| tmpAction->setActionType(CAction::E_AT_RTP_ECHO); | ||
| handle_rhs(tmpAction, "rtp_echo"); | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an #ifdef already at 1634.. please move it closer.
src/sipp.cpp
Outdated
| return; | ||
| } | ||
| #ifdef RTP_STREAM | ||
| if (rtp_echo_state == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!rtp_echo_state
|
Thanks @wdoekes for the review and feedback. This should be better now. |
wdoekes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes. Looks almost okay.
- Two issues below.
- Please add a small description to the changelog.
- Please squash all your changes into a single commit (git rebase -i ...; git push -f).
src/scenario.cpp
Outdated
| tmpAction->setActionType(CAction::E_AT_RTP_ECHO); | ||
| handle_rhs(tmpAction, "rtp_echo"); | ||
| #else | ||
| ERROR("Scenario specifies a rtp_echo action, but this version of SIPp does not have RTP stream support"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation nitpick.
regress/github-#0259/run
Outdated
| fail "got RTP from wrong source port $port" | ||
| else | ||
| fail "got no RTP at all" | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 21..27 are NO-OPS since $port and $uac_media_port are blank.
Replace with a single ok.
6bb84c2 to
f4c79b2
Compare
pbertera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, Thanks for your patient review.
|
Looks good. I wonder why this just happened in one travis check: |
|
Something has changed with the OSX travis build. Investigating... I hope it's fixed with: https://travis-ci.org/SIPp/sipp/builds/165197224 |
|
Ok. Should be fixed by 7412b02. Can you rebase against new master? |
f4c79b2 to
b540cec
Compare
|
Thanks, now travis build looks good |
- UAC side of RTPSTREAM must specify mandatory payload_name parameter
rtp_echo: This patch introduces a new action <rtp_echo> allowing to stop and start the RTP echo from the scenario file.
Example:
All the attribution for this patch should go to Snom Technology AG