Skip to content

Conversation

@pbertera
Copy link
Contributor

@pbertera pbertera commented Oct 1, 2016

rtp_echo: This patch introduces a new action <rtp_echo> allowing to stop and start the RTP echo from the scenario file.

Example:

<nop>
        <action>
                <rtp_echo value="0"/> <!-- stop the RTP echo -->
        </action>
</nop>
<pause milliseconds="15000"/>
<nop>
        <action>
                <rtp_echo value="1"/> <!-- start the RTP echo -->
        </action>
</nop>

All the attribution for this patch should go to Snom Technology AG

Copy link
Member

@wdoekes wdoekes left a 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
Copy link
Member

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
Copy link
Member

@wdoekes wdoekes Oct 2, 2016

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) {
Copy link
Member

Choose a reason for hiding this comment

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

!rtp_echo_state

@pbertera
Copy link
Contributor Author

pbertera commented Oct 3, 2016

Thanks @wdoekes for the review and feedback. This should be better now.

Copy link
Member

@wdoekes wdoekes left a 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");
Copy link
Member

Choose a reason for hiding this comment

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

Indentation nitpick.

fail "got RTP from wrong source port $port"
else
fail "got no RTP at all"
fi
Copy link
Member

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.

@pbertera pbertera force-pushed the snom-rtp_echo branch 2 times, most recently from 6bb84c2 to f4c79b2 Compare October 5, 2016 10:13
Copy link
Contributor Author

@pbertera pbertera left a 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.

@wdoekes
Copy link
Member

wdoekes commented Oct 5, 2016

Looks good.

I wonder why this just happened in one travis check:

checking for unistd.h... yes
checking openssl/md5.h usability... no
checking openssl/md5.h presence... no
checking for openssl/md5.h... no
configure: error: <openssl/md5.h> header missing
The command "./configure $CONFOPTS" failed and exited with 1 during .

wdoekes added a commit that referenced this pull request Oct 5, 2016
@wdoekes
Copy link
Member

wdoekes commented Oct 5, 2016

Something has changed with the OSX travis build. Investigating... I hope it's fixed with: https://travis-ci.org/SIPp/sipp/builds/165197224

wdoekes added a commit that referenced this pull request Oct 5, 2016
@wdoekes
Copy link
Member

wdoekes commented Oct 5, 2016

Ok. Should be fixed by 7412b02. Can you rebase against new master?

@pbertera
Copy link
Contributor Author

pbertera commented Oct 5, 2016

Thanks, now travis build looks good

@wdoekes wdoekes merged commit 8b0ee78 into SIPp:master Oct 6, 2016
jeannotlanglois added a commit to jeannotlanglois/sipp that referenced this pull request Aug 23, 2020
- UAC side of RTPSTREAM must specify mandatory payload_name parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants