<p></p>

<h3>Description</h3>
<p>I use kamilio to deploy as P-cscf, I-cscf,S-cscf to implement IMS functions, two test phones attach kamilio and make volte call. The P-cscf will exit every time.</p>
<h3>Troubleshooting</h3>
<p>I think it may related to the collaboration between tm module and ipsec module.</p>
<h4>Reproduction</h4>
<p>I set up a test environment according to the instructions <a href="https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/" rel="nofollow">https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/</a> . two iphones connetc to the EPC and attach to kamailio,and the IPSec is available.</p>
<h4>Debugging Data</h4>
<p>Here is the gdb info</p>
<pre><code>Reading symbols from /usr/local/sbin/kamailio...done.
[New LWP 22934]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/sbin/kamailio -f /etc/kamailio_pcscf/kamailio_pcscf.cfg -P /var/run/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f1f4951f2d0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007f1f4951f2d0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f1f494cefb4 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f1f494d1370 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007f1f494ce7ea in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007f1f494d78c4 in fprintf () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007f1f44290629 in fill_contact (ci=0x7fff6d0ae1a0, m=0x7f1f48ee3280) at cmd.c:218
#6  0x00007f1f4429a29a in ipsec_forward (m=0x7f1f48ee3280, d=0x7f1f44a7efb8) at cmd.c:693
#7  0x00007f1f442890ac in w_forward (_m=0x7f1f48ee3280, _d=0x7f1f44a7efb8 "\270\356\247D\037\177", _cflags=0x0) at ims_ipsec_pcscf_mod.c:355
#8  0x000055713f26f2f1 in do_action (h=0x7fff6d0af080, a=0x7f1f48e7d3d8, msg=0x7f1f48ee3280) at core/action.c:1079
#9  0x000055713f27d2ab in run_actions (h=0x7fff6d0af080, a=0x7f1f48e79710, msg=0x7f1f48ee3280) at core/action.c:1578
#10 0x000055713f27dabd in run_top_route (a=0x7f1f48e79710, msg=0x7f1f48ee3280, c=0x7fff6d0af080) at core/action.c:1663
#11 0x00007f1f489dd18a in reply_received (p_msg=0x7f1f48ee3280) at t_reply.c:2418
#12 0x000055713f382183 in do_forward_reply (msg=0x7f1f48ee3280, mode=0) at core/forward.c:745
#13 0x000055713f383fcb in forward_reply (msg=0x7f1f48ee3280) at core/forward.c:846
#14 0x000055713f3e82a9 in receive_msg (
    buf=0x55713f6c9ea0 <buf> "SIP/2.0 183 Session Progress\r\nRecord-Route: <sip:mt@192.168.4.207;transport=tcp;r2=on;lr=on;ftag=2573636716;rm=7;did=a1e.1e8>,<sip:mt@192.168.4.207;r2=on;lr=on;ftag=2573636716;rm=7;did=a1e.1e8>,<sip:m"..., len=1958, rcv_info=0x7fff6d0af5c0) at core/receive.c:510
#15 0x000055713f2d05e1 in udp_rcv_loop () at core/udp_server.c:548
#16 0x000055713f233c1e in main_loop () at main.c:1673
#17 0x000055713f23cff2 in main (argc=13, argv=0x7fff6d0afea8) at main.c:2802

</code></pre>
<h4>Log Messages</h4>
<p>Here is the P-cscf logs<br>
<a href="https://github.com/kamailio/kamailio/files/4401553/pcscf.log">pcscf.log</a></p>
<h4>SIP Traffic</h4>
<p><a href="https://github.com/kamailio/kamailio/files/4401567/traffic.zip">traffic.zip</a></p>
<h3>Possible Solutions</h3>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>(paste your output here)
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>(paste your output here)
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2267">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIGGLFF34FOYMF3UG3RKBIQ5ANCNFSM4LWME46A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZPJRZMDHBJLD3C7C3TRKBIQ5A5CNFSM4LWME46KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IZL75EQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2267",
"url": "https://github.com/kamailio/kamailio/issues/2267",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>