<div dir="ltr">I managed to run Sipp finally. I tried to run UAC from my PC which is behind NAT, and UAS from VPN where opensips is installed. <div>I just moved UAC to the machine which public address and add service@<uas_ip_address> to usr loc via <i>opensipsctl ul add.</i></div><div><i><br></i></div><div>Thanks for replies</div><div class="gmail_extra"><br><div class="gmail_quote">2018-06-06 16:01 GMT+02:00 Daniel Zanutti <span dir="ltr"><<a href="mailto:daniel.zanutti@gmail.com" target="_blank">daniel.zanutti@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think the problem is related to configuring SIPP properly.<div><br></div><div>If I'm not wrong, SIPP standard scenario for UAC/UAS is configured to work with a gateway (B2B), but Opensips is a proxy. You have to use Routes to properly handle the incoming call and respond it.</div><div><br></div><div>Take a lookt at "rrs" param of recv command.</div><div><br></div><div>This is the code I use on UAC.xml, after receiving 200 OK from initial invite:</div><div><br></div><div><br></div><div><div> <recv response="200" rrs="true" response_txn="invite"></div><div> <action></div><div> <ereg regexp=";branch=[^;]*" search_in="hdr" header="Via" check_it="false" assign_to="3"/></div><div> <ereg regexp=";.*" search_in="hdr" header="To" check_it="false" assign_to="4"/></div><div> </action></div><div> </recv></div><div><br></div><div> <send ack_txn="invite"></div><div> <![CDATA[</div><div><br></div><div> ACK [next_url] SIP/2.0</div><div> Via: SIP/2.0/[transport] [local_ip]:[local_port][$3]</div><div> [routes]</div><div> From: <sip:[$1]@[$2]:[local_port]>;<wbr>tag=[pid]SIPpTag00[call_<wbr>number]</div><div> To: <sip:[field0]@[$2]:[remote_<wbr>port]>[$4]</div><div> Call-ID: [call_id]</div><div> CSeq: 1 ACK</div><div> Contact: sip:[$1]@[local_ip]:[local_<wbr>port]</div><div> Max-Forwards: 70</div><div> Subject: Performance Test</div><div> Content-Length: 0</div><div><br></div><div> ]]></div><div> </send></div><div><br></div><div> <!-- This delay can be customized by the -d command-line option --></div><div> <!-- or by adding a 'milliseconds = "value"' option here. --></div><div> <pause distributio="uniform" min="4000" max="20000" /></div><div><br></div><div> <!-- The 'crlf' option inserts a blank line in the statistics report. --></div><div> <send start_txn="bye"></div><div> <![CDATA[</div><div><br></div><div> BYE [next_url] SIP/2.0</div><div> Via: SIP/2.0/[transport] [local_ip]:[local_port];<wbr>branch=[branch]</div><div> [routes]</div><div> From: <sip:[$1]@[$2]:[local_port]>;<wbr>tag=[pid]SIPpTag00[call_<wbr>number]</div><div> To: <sip:[field0]@[$2]:[remote_<wbr>port]>[peer_tag_param]</div><div> Call-ID: [call_id]</div><div> CSeq: 2 BYE</div><div> Contact: sip:sipp@[local_ip]:[local_<wbr>port]</div><div> Max-Forwards: 70</div><div> Subject: Performance Test</div><div> Content-Length: 0</div><div><br></div><div> ]]></div><div> </send></div><div><br></div><div> <recv response="200" response_txn="bye"/></div></div><div><br></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 6, 2018 at 7:32 AM, David Villasmil <span dir="ltr"><<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Are the 2 sipp instances behind nat? If so, you need to set the appropiate switch on sipp, i believe it is <br>
-bind_local the actual local ip<br>
-i the public ip</p>
<p dir="ltr">Take a look at sipp's documentation</p>
<p dir="ltr">Hope it helps</p>
<p dir="ltr">David</p>
<br><div class="gmail_quote"><div><div class="m_-5198226907611877417h5"><div dir="ltr">On Wed, Jun 6, 2018, 10:33 Jan Skórczyński <<a href="mailto:jskorczynski@milosolutions.com" target="_blank">jskorczynski@milosolutions.co<wbr>m</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-5198226907611877417h5"><div dir="ltr"><div><div>Hello,</div><div><br></div><div>I'm a beginner in VOIP world so maybe this question have obvious answer... </div><div>I would like to perform series of stress tests of my Opensips server.</div><div><br></div><div>Opensips instance is located on VPS at adres XXX.XXX.XXX.XXX (public IP) and it is listening on 5060 port. I'm using custom client apps, everything works fine, however I have some issue when I try to test with Sipp.</div><div><br></div><div>I'm setting UAS on my VPS, with the following command:</div><div><br></div><div>sipp -sn uas -rsa XXX.XXX.XXX.XXX:5060 -i XXX.XXX.XXX.XXX</div><div><br></div><div>and UAC on my PC: </div><div><br></div><div>sipp -sn uac XXX.XXX.XXX.XXX:5061 -i 192.168.0.103</div><div><br></div><div>I can see on UAS that it receives messages from my UAC, but it cannot reply to them.</div><div><br></div><div>------------------------------ Scenario Screen -------- [1-9]: Change Screen --</div><div> Port Total-time Total-calls Transport</div><div> 5061 19.07 s 30 UDP</div><div><br></div><div> 0 new calls during 1.004 s period 1 ms scheduler resolution</div><div> 0 calls Peak was 6 calls, after 6 s</div><div> 0 Running, 31 Paused, 4 Woken up</div><div> 90 dead call msg (discarded) </div><div> 4 open sockets </div><div><br></div><div> Messages Retrans Timeout Unexpected-Msg</div><div> ----------> INVITE 30 0 0 0 </div><div><br></div><div> <---------- 180 30 0 </div><div> <---------- 200 30 14 0 </div><div> ----------> ACK E-RTD1 0 0 0 30 </div><div><br></div><div> ----------> BYE 0 0 0 0 </div><div> <---------- 200 0 0 </div><div> [ 4000ms] Pause 0 0 </div><div>------------------------------ Sipp Server Mode ------------------------------<wbr>-</div><div><br></div><div><br></div><div>Logs from UAC:</div><div><br></div><div>------------------------------ Scenario Screen -------- [1-9]: Change Screen --</div><div> Call-rate(length) Port Total-time Total-calls Remote-host</div><div> 10.0(0 ms)/1.000s 5060 73.29 s 90 XXX.XXX.XXX.XXX:5061(UDP)</div><div><br></div><div> 0 new calls during 1.004 s period 1 ms scheduler resolution</div><div> 30 calls (limit 30) Peak was 30 calls, after 3 s</div><div> 0 Running, 62 Paused, 24 Woken up</div><div> 0 dead call msg (discarded) 0 out-of-call msg (discarded) </div><div> 3 open sockets </div><div><br></div><div> Messages Retrans Timeout Unexpected-Msg</div><div> INVITE ----------> 90 415 60 </div><div> 100 <---------- 0 0 0 0 </div><div> 180 <---------- 0 0 0 0 </div><div> 183 <---------- 0 0 0 0 </div><div> 200 <---------- E-RTD1 0 0 0 0 </div><div> ACK ----------> 0 0 </div><div> Pause [ 0ms] 0 0 </div><div> BYE ----------> 0 0 0 </div><div> 200 <---------- 0 0 0 0 </div><div><br></div><div>------ [+|-|*|/]: Adjust rate ---- [q]: Soft exit ---- [p]: Pause traffic -----</div><div><br></div><div>And here is my opensips.cfg routing script:</div><div><br></div><div>route{</div><div><span style="white-space:pre-wrap"> </span>xlog("Begin route");</div><div><span style="white-space:pre-wrap"> </span>if (!mf_process_maxfwd_header("10<wbr>")) {</div><div><span style="white-space:pre-wrap"> </span>xlog("Too many hops");</div><div><span style="white-space:pre-wrap"> </span>send_reply("483","Too Many Hops");</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span>if (has_totag() && ($fU!="sipp")) {</div><div><span style="white-space:pre-wrap"> </span>xlog("Has totag");</div><div><span style="white-space:pre-wrap"> </span># handle hop-by-hop ACK (no routing required)</div><div><span style="white-space:pre-wrap"> </span>if ( is_method("ACK") && t_check_trans() ) {</div><div> xlog("Method: ACK && t_check_trans. Relaying...");</div><div><span style="white-space:pre-wrap"> </span>t_relay();</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># sequential request within a dialog should</div><div><span style="white-space:pre-wrap"> </span># take the path determined by record-routing</div><div><span style="white-space:pre-wrap"> </span>if ( !loose_route() ) {</div><div><span style="white-space:pre-wrap"> </span># we do record-routing for all our traffic, so we should not</div><div><span style="white-space:pre-wrap"> </span># receive any sequential requests without Route hdr.</div><div><span style="white-space:pre-wrap"> </span>send_reply("404","Not here");</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span>if (is_method("BYE")) {</div><div><span style="white-space:pre-wrap"> </span># do accounting even if the transaction fails</div><div><span style="white-space:pre-wrap"> </span>#do_accounting("log","failed")<wbr>;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># route it out to whatever destination was set by loose_route()</div><div><span style="white-space:pre-wrap"> </span># in $du (destination URI).</div><div><span style="white-space:pre-wrap"> </span>route(relay);</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># CANCEL processing</div><div><span style="white-space:pre-wrap"> </span>if (is_method("CANCEL")) {</div><div><span style="white-space:pre-wrap"> </span>if (t_check_trans())</div><div><span style="white-space:pre-wrap"> </span>t_relay();</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># absorb retransmissions, but do not create transaction</div><div><span style="white-space:pre-wrap"> </span>t_check_trans();</div><div><br></div><div><span style="white-space:pre-wrap"> </span>if ( !(is_method("REGISTER") ) ) {</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>if (is_myself("$fd")) {</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>} else {</div><div><span style="white-space:pre-wrap"> </span># if caller is not local, then called number must be local</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>if (!is_myself("$rd")) {</div><div><span style="white-space:pre-wrap"> </span>send_reply("403","Relay Forbidden");</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><span style="white-space:pre-wrap"> </span>}</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># preloaded route checking</div><div><span style="white-space:pre-wrap"> </span>if (loose_route()) {</div><div><span style="white-space:pre-wrap"> </span>xlog("L_ERR",</div><div><span style="white-space:pre-wrap"> </span>"Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");</div><div><span style="white-space:pre-wrap"> </span>if (!is_method("ACK"))</div><div><span style="white-space:pre-wrap"> </span>send_reply("403","Preload Route denied");</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># record routing</div><div><span style="white-space:pre-wrap"> </span>if (!is_method("REGISTER|MESSAGE"<wbr>))</div><div><span style="white-space:pre-wrap"> </span>record_route();</div><div><br></div><div><span style="white-space:pre-wrap"> </span># account only INVITEs</div><div><span style="white-space:pre-wrap"> </span>if (is_method("INVITE")) {</div><div><span style="white-space:pre-wrap"> </span>create_dialog();</div><div><span style="white-space:pre-wrap"> </span>engage_media_proxy();</div><div><span style="white-space:pre-wrap"> </span>#do_accounting("log");</div><div><span style="white-space:pre-wrap"> </span>}</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>if (!is_myself("$rd")) {</div><div><span style="white-space:pre-wrap"> </span>append_hf("P-hint: outbound\r\n"); </div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span># if you have some interdomain connections via TLS</div><div><span style="white-space:pre-wrap"> </span>## CUSTOMIZE IF NEEDED</div><div><span style="white-space:pre-wrap"> </span>##if ($rd=="<a href="http://tls_domain1.net" target="_blank">tls_domain1.net</a>"</div><div><span style="white-space:pre-wrap"> </span>## || $rd=="<a href="http://tls_domain2.net" target="_blank">tls_domain2.net</a>"</div><div><span style="white-space:pre-wrap"> </span>##) {</div><div><span style="white-space:pre-wrap"> </span>##<span style="white-space:pre-wrap"> </span>force_send_socket(tls:<a href="http://127.0.0.1:5061" target="_blank">127.0.0.<wbr>1:5061</a>); # CUSTOMIZE</div><div><span style="white-space:pre-wrap"> </span>##}</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>route(relay);</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># requests for my domain</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>if (is_method("PUBLISH|SUBSCRIBE"<wbr>)) {</div><div><span style="white-space:pre-wrap"> </span>send_reply("503", "Service Unavailable");</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span>if (is_method("REGISTER")) {</div><div><span style="white-space:pre-wrap"> </span>xlog("NEW REGISTER!");</div><div><span style="white-space:pre-wrap"> </span>if ($proto == "tls")</div><div><span style="white-space:pre-wrap"> </span>setflag(TCP_PERSISTENT);</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>if (!save("location"))</div><div><span style="white-space:pre-wrap"> </span>sl_reply_error();</div><div><br></div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span>if ($rU==NULL) {</div><div><span style="white-space:pre-wrap"> </span># request with no Username in RURI</div><div><span style="white-space:pre-wrap"> </span>send_reply("484","Address Incomplete");</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}<span style="white-space:pre-wrap"> </span> </div><div><br></div><div><span style="white-space:pre-wrap"> </span># do lookup with method filtering</div><div><span style="white-space:pre-wrap"> </span>if (!lookup("location","m")) {</div><div><span style="white-space:pre-wrap"> </span>xlog("not found");<span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>t_reply("404", "Not Found");</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>} else {</div><div><span style="white-space:pre-wrap"> </span>xlog("FOUND");</div><div><span style="white-space:pre-wrap"> </span>}<span style="white-space:pre-wrap"> </span></div><div><br></div><div><span style="white-space:pre-wrap"> </span># when routing via usrloc, log the missed calls also</div><div><span style="white-space:pre-wrap"> </span>#do_accounting("log","missed")<wbr>;</div><div><span style="white-space:pre-wrap"> </span>route(relay);</div><div>}</div><div><br></div><div><br></div><div>route[relay] {</div><div><span style="white-space:pre-wrap"> </span># for INVITEs enable some additional helper routes</div><div><span style="white-space:pre-wrap"> </span>if (is_method("INVITE")) {</div><div><span style="white-space:pre-wrap"> </span>t_on_branch("per_branch_ops");</div><div><span style="white-space:pre-wrap"> </span>t_on_reply("handle_nat");</div><div><span style="white-space:pre-wrap"> </span>t_on_failure("missed_call");</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span>if (!t_relay()) {</div><div><span style="white-space:pre-wrap"> </span>send_reply("500","Internal Error");</div><div><span style="white-space:pre-wrap"> </span>}</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div>}</div><div><br></div><div>branch_route[per_branch_ops] {</div><div><span style="white-space:pre-wrap"> </span>xlog("new branch at $ru\n");</div><div>}</div><div><br></div><div>onreply_route[handle_nat] {</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>xlog("incoming reply\n");</div><div>}</div><div><br></div><div><br></div><div>failure_route[missed_call] {</div><div><span style="white-space:pre-wrap"> </span>if (t_was_cancelled()) {</div><div><span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>}</div><div><br></div><div><span style="white-space:pre-wrap"> </span># uncomment the following lines if you want to block client </div><div><span style="white-space:pre-wrap"> </span># redirect based on 3xx replies.</div><div><span style="white-space:pre-wrap"> </span>##if (t_check_status("3[0-9][0-9]")<wbr>) {</div><div><span style="white-space:pre-wrap"> </span>##t_reply("404","Not found");</div><div><span style="white-space:pre-wrap"> </span>##<span style="white-space:pre-wrap"> </span>exit;</div><div><span style="white-space:pre-wrap"> </span>##}</div><div><span style="white-space:pre-wrap"> </span></div><div>}</div><div><br></div><div><br></div><div>What I'm doing wrong? How can I test my Opensips instance? I would like to perform not only sip stress test but also test with some media transport. Should I run UAC from public IP too?</div><div><br></div><div>Thanks in advance for reply.</div></div>
</div></div></div>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
</blockquote></div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div><br>
</div></div>