<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I have put my opensips.cfg to abolute bare metal and do the
needed manips in sipp. <br>
</p>
<pre class="moz-quote-pre" wrap="">route{
# ASYNC PROCESSING => opensips handles it
if (is_method("OPTIONS|NOTIFY|SUBSCRIBE")) {
send_reply(200,"OK");
drop();
}
if ($sp==IADPORT)
{
xlog("from iad sp==$sp==IADPORT, we rewrite to sipp listening
port SIPPPORT and we forward to SIPPIP");
forward("SIPPIP:SIPPPORT");
}
else if ($sp==SIPPPORT)
{
xlog("from sipp sp==$sp==SIPPPORT, we rewrite to iad listening
port IADPORT and we forward to IADIP");
forward("IADIP:IADPORT");
}
else
{
xlog("sp==$sp!=[IADPORT,SIPPPORT], we drop the packet");
drop();
}
}
This works, so you can forget about this.
</pre>
<div class="moz-cite-prefix">On 12/09/2022 17:03, johan wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8fdccbbf-0f7e-75f3-2d9e-0cd2bc432de3@democon.be">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>so the question is how can I do a forward message to an ip port
without opensips rewriting the uri of ACK in stateless mode ? <br>
</p>
<div class="moz-cite-prefix">On 12/09/2022 16:55, johan wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7948068a-7554-b84f-99d8-33d3882ddac5@democon.be">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_msg: SIP Request:<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_msg: method: <ACK><br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_msg: uri: <<a
class="moz-txt-link-freetext"
href="sip:+32478720104@x.y.z.t" moz-do-not-send="true">sip:+32478720104@x.y.z.t</a>:<b>11000</b>;transport=udp;alias=x.y.z.t~11000~1><br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_msg: version: <SIP/2.0><br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_headers: flags=ffffffffffffffff<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_via_param: found param type 232, <branch>
= <z9hG4bK-2487-1-5>; state=16<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_via: end of header reached, state=5<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_headers: via found, flags=ffffffffffffffff<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_headers: this is the first via<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_to_param: tag=4SpHB6a416Ucg<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_to_param: end of header reached, state=13<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:_parse_to: end of header reached, state=29<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:_parse_to: display={sut}, ruri={<a
class="moz-txt-link-freetext"
href="sip:+32478720104@192.168.68.120:5060"
moz-do-not-send="true">sip:+32478720104@192.168.68.120:5060</a>}<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:get_hdr_field: <To> [62]; uri=[<a
class="moz-txt-link-freetext"
href="sip:+32478720104@192.168.68.120:5060"
moz-do-not-send="true">sip:+32478720104@192.168.68.120:5060</a>]<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:get_hdr_field: to body [sut <a
class="moz-txt-link-rfc2396E"
href="sip:+32478720104@192.168.68.120:5060"
moz-do-not-send="true"><sip:+32478720104@192.168.68.120:5060></a>]<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:get_hdr_field: cseq <CSeq>: <1>
<ACK><br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:get_hdr_field: content_length=0<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:get_hdr_field: found end of header<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:receive_msg: After parse_msg...<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:receive_msg: preparing to run routing scripts...<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:sl:sl_filter_ACK: too late to be a local ACK!<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:comp_scriptvar: int 20: 5062 / 5060<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:comp_scriptvar: int 20: 5062 / 5062<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]: from
sipp sp==5062==5062, we rewrite to iad listening port 5060 and
we forward to 185.58.97.161<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_to_param: tag=1<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_to_param: end of header reached, state=11<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:_parse_to: end of header reached, state=29<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:_parse_to: display={sipp}, ruri={<a
class="moz-txt-link-freetext"
href="sip:sipp@192.168.68.120:5062" moz-do-not-send="true">sip:sipp@192.168.68.120:5062</a>}<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:uac:w_replace_from: dsp=0x7ffe38fec2d8 (len=0) ,
uri=0x7ffe38fec2f0 (len=41)<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
ERROR:uac:replace_uri: decline FROM/TO replacing in sequential
request in auto mode (has TO tag)<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
ERROR:uac:replace_uri: decline FROM/TO replacing in sequential
request in auto mode (has TO tag)<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:MD5StringArray: MD5 calculated:
100352e3496e8c8bc067bbd48b3fff67<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_headers: flags=60<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:parse_headers: flags=ffffffffffffffff<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:forward_request: sending:#012ACK <a
class="moz-txt-link-freetext"
href="sip:+32478720104@x.y.z.t" moz-do-not-send="true">sip:+32478720104@x.y.z.t</a>:<b>5060</b>;transport=udp;alias=x.y.z.t~11000~1
SIP><br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:forward_request: orig. len=419, new_len=510, proto=1<br>
Sep 12 10:45:38 sipp /data/opensips/sbin/opensips[1684]:
DBG:core:destroy_avp_list: destroying list 0x7f9d4b464ae8<br>
<br>
<br>
</p>
<div class="moz-cite-prefix">On 12/09/2022 16:24, johan wrote:<br>
</div>
<blockquote type="cite"
cite="mid:48dbadfb-7a24-eed7-6d90-dcc5d55783c9@democon.be">
<pre class="moz-quote-pre" wrap="">Hi,
setup : opensips acts as a client of a remote server (i.e. opensips
registers itself towards a provider) and handles the OPTIONS being
sent. On the same pc I have a sipp instance that generates traffic.
hence
provider <- udp 5060 -> opensips <-udp 5062-> sipp
The issue is now that the provider changes the contact in 200 ok.
Hence in sipp I take the contact from the received 200 and then I put in
the request uri of the ACK.
the problem si opensips rewrites the contact.
How can I avoid that ?
route{
# ASYNC PROCESSING => opensips handles it
if (is_method("OPTIONS|NOTIFY|SUBSCRIBE")) {
send_reply(200,"OK");
drop();
}
if ($sp==IADPORT)
{
xlog("from iad sp==$sp==IADPORT, we rewrite to sipp listening
port SIPPPORT and we forward to SIPPIP");
forward("SIPPIP:SIPPPORT");
}
else if ($sp==SIPPPORT)
{
xlog("from sipp sp==$sp==SIPPPORT, we rewrite to iad listening
port IADPORT and we forward to IADIP");
forward("IADIP:IADPORT");
}
else
{
xlog("sp==$sp!=[IADPORT,SIPPPORT], we drop the packet");
drop();
}
}
</pre>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>