<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Mihai,</p>
<p>your trace just shows the INVITE, 100, 183. There is no 200 OK, therefore also no ACK.</p>
<p>Is there some thing missing? Does the called side actually accept the call?</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="moz-cite-prefix">Am 25.07.19 um 19:23 schrieb Mihai Cezar:<br>
</div>
<blockquote type="cite" cite="mid:CANk_n4ZWCexa8DCC=kSnzA2bLN95TKUz3G+gWYMiFdNzkxXmyA@mail.gmail.com">
<div dir="ltr">Well, i've tried both opensips and kamailio but with kamailio i got the most far.
<div>Bellow it's a trace of an outgoing call, the trace is from kamailio box. </div>
<div><br>
</div>
<div>Legend: 10.1.1.10 is the Asterisk Box, 10.1.1.4 is Kamailio.</div>
<div><br>
</div>
<div>2019/07/25 20:16:24.479179 <a href="http://10.1.1.10:5060" moz-do-not-send="true">
10.1.1.10:5060</a> -> <a href="http://10.1.1.4:5060" moz-do-not-send="true">10.1.1.4:5060</a><br>
INVITE <a href="mailto:sip%3A%2B40XXXXXXXXX@10.1.1.4" moz-do-not-send="true">sip:+40XXXXXXXXX@10.1.1.4</a>;user=phone SIP/2.0<br>
Via: SIP/2.0/UDP 10.1.1.10:5060;branch=z9hG4bK3ecba174;rport<br>
Max-Forwards: 70<br>
From: "test" <<a href="mailto:sip%3A%2B40YYYYYYYY@10.1.1.10" moz-do-not-send="true">sip:+40YYYYYYYY@10.1.1.10</a>>;tag=as5ce97f3d<br>
To: <<a href="mailto:sip%3A%2B40XXXXXXXXX@10.1.1.4" moz-do-not-send="true">sip:+40XXXXXXXXX@10.1.1.4</a>;user=phone><br>
Contact: <<a href="http://sip:+40YYYYYYYY@10.1.1.10:5060" moz-do-not-send="true">sip:+40YYYYYYYY@10.1.1.10:5060</a>><br>
Call-ID: <a href="mailto:7c1169bf0b7a09472dd455d76b6c12bb@10.1.1.10" moz-do-not-send="true">
7c1169bf0b7a09472dd455d76b6c12bb@10.1.1.10</a><br>
CSeq: 102 INVITE<br>
User-Agent: Asterisk PBX<br>
Date: Thu, 25 Jul 2019 17:16:09 GMT<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE<br>
Supported: replaces, timer<br>
Content-Type: application/sdp<br>
Content-Length: 238<br>
<br>
2019/07/25 20:16:24.482259 <a href="http://10.1.1.4:5060" moz-do-not-send="true">
10.1.1.4:5060</a> -> <a href="http://10.1.1.10:5060" moz-do-not-send="true">10.1.1.10:5060</a><br>
SIP/2.0 100 Trying<br>
Via: SIP/2.0/UDP 10.1.1.10:5060;branch=z9hG4bK3ecba174;rport=5060;received=10.1.1.10<br>
From: "test" <<a href="mailto:sip%3A%2B40YYYYYYYY@10.1.1.10" moz-do-not-send="true">sip:+40YYYYYYYY@10.1.1.10</a>>;tag=as5ce97f3d<br>
To: <<a href="mailto:sip%3A%2B40XXXXXXXXX@10.1.1.4" moz-do-not-send="true">sip:+40XXXXXXXXX@10.1.1.4</a>;user=phone><br>
Call-ID: <a href="mailto:7c1169bf0b7a09472dd455d76b6c12bb@10.1.1.10" moz-do-not-send="true">
7c1169bf0b7a09472dd455d76b6c12bb@10.1.1.10</a><br>
CSeq: 102 INVITE<br>
Server: kamailio (5.2.3 (x86_64/linux))<br>
Content-Length: 0<br>
<br>
<br>
2019/07/25 20:16:24.482385 <a href="http://10.1.1.4:5060" moz-do-not-send="true">
10.1.1.4:5060</a> -> <a href="http://10.1.1.10:5060" moz-do-not-send="true">10.1.1.10:5060</a><br>
SIP/2.0 183 Outgoing session to Avoxi<br>
Via: SIP/2.0/UDP 10.1.1.10:5060;branch=z9hG4bK3ecba174;rport=5060;received=10.1.1.10<br>
From: "test" <<a href="mailto:sip%3A%2B40YYYYYYYY@10.1.1.10" moz-do-not-send="true">sip:+40YYYYYYYY@10.1.1.10</a>>;tag=as5ce97f3d<br>
To: <<a href="mailto:sip%3A%2B40XXXXXXXXX@10.1.1.4" moz-do-not-send="true">sip:+40XXXXXXXXX@10.1.1.4</a>;user=phone>;tag=e68db714ad3ba80833ca2c670d982872.aebb<br>
Call-ID: <a href="mailto:7c1169bf0b7a09472dd455d76b6c12bb@10.1.1.10" moz-do-not-send="true">
7c1169bf0b7a09472dd455d76b6c12bb@10.1.1.10</a><br>
CSeq: 102 INVITE<br>
Server: kamailio (5.2.3 (x86_64/linux))<br>
Content-Length: 0<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jul 25, 2019 at 7:53 PM Sergiu Pojoga <<a href="mailto:pojogas@gmail.com" moz-do-not-send="true">pojogas@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Have you tried changing the trunk's name from <b>opensips-trunk</b> to
<b>kamailio-trunk</b>?
<div><br>
</div>
<div>On the serious side, a SIP trace would help.</div>
<div> <br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jul 25, 2019 at 12:26 PM Mihai Cezar <<a href="mailto:cezar@mokalife.ro" target="_blank" moz-do-not-send="true">cezar@mokalife.ro</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>I've tried to create a reverse proxy to forward incoming request that came from SIP provider to Asterisk PBX and forward the requests from asterisk to kamailio then sip provider.</div>
<div>What i get is that I see the invite, but is like no ACK.</div>
<div>Thanks in advance.</div>
<div>M</div>
<div><br>
</div>
<div><br>
</div>
<div>kamailio.cfg:</div>
<div><br>
</div>
<div>#!KAMAILIO<br>
#<br>
<br>
####### Defined Values #########<br>
# - flags<br>
# FLT_ - per transaction (message) flags<br>
# FLB_ - per branch flags<br>
#!define FLT_ACC 1<br>
#!define FLT_ACCMISSED 2<br>
#!define FLT_ACCFAILED 3<br>
#!define FLT_NATS 5<br>
<br>
#!define FLB_NATB 6<br>
#!define FLB_NATSIPPING 7<br>
<br>
####### Global Parameters #########<br>
### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR<br>
debug=3<br>
log_stderror=yes<br>
memdbg=5<br>
memlog=5<br>
<br>
log_facility=LOG_LOCAL0<br>
log_prefix="{$mt $hdr(CSeq) $ci} "<br>
children=1<br>
<br>
server_id = 10<br>
xavp_via_params = "via"<br>
disable_tcp=yes<br>
auto_aliases=no<br>
listen=udp:<a href="http://0.0.0.0:5060" target="_blank" moz-do-not-send="true">0.0.0.0:5060</a> <br>
<br>
####### Modules Section ########<br>
<br>
loadmodule "jsonrpcs.so"<br>
loadmodule "kex.so"<br>
loadmodule "corex.so"<br>
loadmodule "tm.so"<br>
loadmodule "tmx.so"<br>
loadmodule "sl.so"<br>
loadmodule "rr.so"<br>
loadmodule "pv.so"<br>
loadmodule "maxfwd.so"<br>
loadmodule "textops.so"<br>
loadmodule "siputils.so"<br>
loadmodule "xlog.so"<br>
loadmodule "sanity.so"<br>
loadmodule "ctl.so"<br>
loadmodule "cfg_rpc.so"<br>
loadmodule "acc.so"<br>
loadmodule "counters.so"<br>
<br>
# ----------------- setting module-specific parameters ---------------<br>
<br>
<br>
# ----- jsonrpcs params -----<br>
modparam("jsonrpcs", "pretty_format", 1)<br>
modparam("jsonrpcs", "fifo_name", "/var/run/kamailio/kamailio_rpc.fifo")<br>
modparam("jsonrpcs", "dgram_socket", "/var/run/kamailio/kamailio_rpc.sock")<br>
modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")<br>
<br>
# ----- tm params -----<br>
modparam("tm", "failure_reply_mode", 3)<br>
modparam("tm", "fr_timer", 30000)<br>
modparam("tm", "fr_inv_timer", 120000)<br>
modparam("rr", "enable_full_lr", 0)<br>
modparam("rr", "append_fromtag", 0)<br>
modparam("acc", "early_media", 0)<br>
modparam("acc", "report_ack", 0)<br>
modparam("acc", "report_cancels", 0)<br>
modparam("acc", "detect_direction", 0)<br>
modparam("acc", "log_flag", FLT_ACC)<br>
modparam("acc", "log_missed_flag", FLT_ACCMISSED)<br>
modparam("acc", "log_extra",<br>
"src_user=$fU;src_domain=$fd;src_ip=$si;"<br>
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")<br>
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)<br>
<br>
####### Routing Logic ########<br>
<br>
request_route {<br>
<br>
# per request initial checks<br>
route(REQINIT);<br>
<br>
# CANCEL processing<br>
if (is_method("CANCEL")) {<br>
if (t_check_trans()) {<br>
route(RELAY);<br>
}<br>
exit;<br>
}<br>
<br>
# handle retransmissions<br>
if (!is_method("ACK")) {<br>
if(t_precheck_trans()) {<br>
t_check_trans();<br>
exit;<br>
}<br>
t_check_trans();<br>
}<br>
<br>
# handle requests within SIP dialogs<br>
route(WITHINDLG);<br>
<br>
# record routing for dialog forming requests (in case they are routed)<br>
remove_hf("Route");<br>
if (is_method("INVITE|SUBSCRIBE|REFER")) {<br>
record_route();<br>
}<br>
<br>
# account only INVITEs<br>
if (is_method("INVITE")) {<br>
setflag(FLT_ACC); <br>
sl_send_reply("100","Trying");<br>
<br>
if ($si == "172.16.16.1") {<br>
sl_send_reply("183","Incoming session from Avoxi");<br>
rewritehost("10.1.1.10");<br>
#exit;<br>
} <br>
else if ($si == "10.1.1.10"){<br>
# receiving response from client<br>
sl_send_reply("183","Outgoing session to Avoxi");<br>
#rewritehost("172.16.16.1");<br>
drop;<br>
exit;<br>
} <br>
else {<br>
sl_send_reply("500","No configured IP!");<br>
drop;<br>
exit;<br>
}<br>
}<br>
<br>
if ($rU==$null) {<br>
sl_send_reply("484","Address Incomplete");<br>
exit;<br>
}<br>
<br>
# received from main server - send to client and add via tokens for anycast handling<br>
via_add_srvid("1");<br>
$xavp(via=>node) = "10.1.1.4";<br>
via_add_xavp_params("1");<br>
route(RELAY);<br>
exit;<br>
}<br>
<br>
# Wrapper for relaying requests<br>
route[RELAY] {<br>
<br>
# enable additional event routes for forwarded requests<br>
# - serial forking, RTP relaying handling, a.s.o.<br>
if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {<br>
if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");<br>
}<br>
if (is_method("INVITE|SUBSCRIBE|UPDATE")) {<br>
if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");<br>
}<br>
if (is_method("INVITE")) {<br>
if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");<br>
}<br>
<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
}<br>
exit;<br>
}<br>
<br>
# Per SIP request initial checks<br>
route[REQINIT] {<br>
if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") {<br>
# silent drop for scanners - uncomment next line if want to reply<br>
sl_send_reply("200", "OK");<br>
exit;<br>
}<br>
<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br>
<br>
if(is_method("OPTIONS") && uri==myself && $rU==$null) {<br>
sl_send_reply("200","Keepalive");<br>
exit;<br>
}<br>
<br>
if(!sanity_check("1511", "7")) {<br>
xlog("Malformed SIP message from $si:$sp\n");<br>
exit;<br>
}<br>
<br>
if ($si == "10.1.1.4") {<br>
xlog("L_WARN", "$ci|end|dropping message");<br>
exit;<br>
}<br>
<br>
}<br>
<br>
# Handle requests within SIP dialogs<br>
route[WITHINDLG] {<br>
if (!has_totag()) return;<br>
if (loose_route()) {<br>
if (is_method("BYE")) {<br>
setflag(FLT_ACC); <br>
setflag(FLT_ACCFAILED); <br>
} else if ( is_method("NOTIFY") ) {<br>
record_route();<br>
}<br>
route(RELAY);<br>
exit;<br>
}<br>
<br>
if ( is_method("ACK") ) {<br>
if ( t_check_trans() ) {<br>
route(RELAY);<br>
exit;<br>
} else {<br>
exit;<br>
}<br>
}<br>
sl_send_reply("400","Loop detected");<br>
exit;<br>
}<br>
<br>
# TM manage for outgoing branches<br>
branch_route[MANAGE_BRANCH] {<br>
xdbg("new branch [$T_branch_idx] to $ru\n");<br>
}<br>
<br>
# TM manage for incoming replies<br>
onreply_route[MANAGE_REPLY] {<br>
xdbg("incoming reply\n");<br>
}<br>
<br>
# TM manage for failure routing cases<br>
failure_route[MANAGE_FAILURE] {<br>
if (t_is_canceled()) exit;<br>
}<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>asterisk - sip.conf</div>
<div><br>
</div>
<div>[opensips-trunk](sip-provider)<br>
fromdomain=10.1.1.10<br>
host=10.1.1.4<br>
context=from-trunk<br>
type=friend<br>
insecure=invite,port<br>
</div>
<div>trunk=yes<br>
</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>