<p></p>

<h3>Description</h3>
<p>Kamailio is unable to create a SCTP association to IP address that is reachable normally when dispatcher.list is configured as following:</p>
<pre><code>760320003 sip:10.59.144.2:5063;transport=sctp 9 0 dstid=1
760320003 sip:10.59.144.130:5063;transport=sctp 9 0 dstid=1
</code></pre>
<p>10.59.144.2 and 10.59.144.130 are IPs of same endpoint treated as primary and secondary, Kamailio can't send probe (OPTIONS requests) as SCTP association can't be created.</p>
<p>Issue doesn't exist on RHEL/Centos 6.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Use previously mentioned dispatcher list with changed IP addresses to match local configuration.</p>
<p>SCTP part of kamailio.cfg</p>
<pre><code># if not OS default is used
#modparam("sctp", "sctp_socket_rcvbuf", 14096)
#modparam("sctp", "sctp_socket_sndbuf", 14096)
# Number of milliseconds before an unsent message/chunk is dropped.
modparam("sctp", "sctp_send_ttl", 10000)
modparam("sctp", "sctp_autoclose", 300)
# How many times to attempt re-sending a message on a re-opened association, if the sctp stack did give up sending it (it's not related to sctp protocol level retransmission). Useful to improve reliability with peers that reboot/restart or fail over to another machine.
modparam("sctp", "sctp_send_retries", 1)
modparam("sctp", "sctp_srto_initial", 200)
modparam("sctp", "sctp_srto_max", 250)
modparam("sctp", "sctp_srto_min", 150)
modparam("sctp", "sctp_asocmaxrxt", 4)
modparam("sctp", "sctp_init_max_attempts", 3)
modparam("sctp", "sctp_init_max_timeo", 1000)
modparam("sctp", "sctp_hbinterval", 1000)
modparam("sctp", "sctp_pathmaxrxt", 2)
modparam("sctp", "sctp_sack_delay", 10)
modparam("sctp", "sctp_sack_freq", 1)
modparam("sctp", "sctp_max_burst", 4)
</code></pre>
<h4>Debugging Data</h4>

<pre><code>(paste your debugging data here)
</code></pre>
<h4>Log Messages</h4>

<pre><code>Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: dispatcher [dispatch.c:3234]: ds_ping_result_helper(): probing set, but not mode DS_PROBE_INACTIVE
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: dispatcher [dispatch.c:3268]: ds_ping_set(): probing set #760320003, URI sip:10.59.144.2:5063;transport=sctp
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: dispatcher [dispatch.c:3293]: ds_ping_set(): Default ping_from: sip:siplb@sdp.t-mobile.at
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: tm [uac.c:435]: t_uac_prepare(): next_hop=<sip:10.59.144.2:5063;transport=sctp>
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: <core> [core/resolve.c:1244]: srv_sip_resolvehost(): 10.59.144.2:5063 proto=4
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2281]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.130:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.130:5063: SCTP_ADDR_ADDED: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: <core> [core/resolve.c:1356]: srv_sip_resolvehost(): returning 0xa7c280 (10.59.144.2:5063 proto=4)
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: tm [uac.c:158]: dlg2hash(): hashid 27287
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2281]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.130:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.130:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2280]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.130:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.130:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: tm [uac.c:652]: send_prepared_request_impl(): uac: 0x7fbf4eb4e5b8  branch: 0  to 10.59.144.2:5063
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2294]: DEBUG: tm [../../core/onsend.h:69]: run_onsend(): required parameters are not available - ignoring
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2282]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.2:5063: SCTP_ADDR_ADDED: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2278]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.2:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2282]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.2:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2285]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.2:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2283]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.130:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.130:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2279]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.130:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.130:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:13 sdp-lbref02 /usr/sbin/kamailio[2279]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.2:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:14 sdp-lbref02 /usr/sbin/kamailio[2280]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.2:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:14 sdp-lbref02 /usr/sbin/kamailio[2278]: DEBUG: sctp [sctp_server.c:2317]: sctp_handle_notification(): sctp notification from 10.59.144.130:5063 on sdp-lbref02-sigtran01:5060: SCTP_PEER_ADDR_CHANGE: 10.59.144.130:5063: SCTP_ADDR_MADE_PRIM: assoc_id 0
Aug  6 18:19:15 sdp-lbref02 /usr/sbin/kamailio[2285]: DEBUG: sctp [sctp_server.c:2340]: sctp_handle_notification(): sctp notification from 10.59.144.130:5063 on sdp-lbref02-sigtran01:5060: SCTP_ASSOC_CHANGE: SCTP_CANT_STR_ASSOC: assoc_id 0, ostreams 0, istreams 0
Aug  6 18:19:15 sdp-lbref02 /usr/sbin/kamailio[2282]: DEBUG: sctp [sctp_server.c:2340]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_ASSOC_CHANGE: SCTP_CANT_STR_ASSOC: assoc_id 0, ostreams 0, istreams 0
Aug  6 18:19:15 sdp-lbref02 /usr/sbin/kamailio[2285]: DEBUG: sctp [sctp_server.c:2299]: sctp_handle_notification(): sctp notification from 10.59.144.2:5063 on sdp-lbref02-sigtran01:5060: SCTP_SEND_FAILED: error 0, assoc_id 0, flags 0
Aug  6 18:19:15 sdp-lbref02 /usr/sbin/kamailio[2285]: DEBUG: sctp [sctp_server.c:2098]: sctp_handle_send_failed(): sctp: RETRY-ing (1)
</code></pre>
<h4>SIP Traffic</h4>

<pre><code>(paste your sip traffic here)
</code></pre>
<h3>Possible Solutions</h3>

<p>Issue is gone when one of IP addresses is removed from dispatcher.list.</p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>kamailio -v
version: kamailio 5.3.5 (x86_64/linux) 9e70e8
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 9e70e8
compiled on 12:22:26 Jun 22 2020 with gcc 8.3.1

</code></pre>
<p>Also tested latest 5.2 and 5.4</p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>[root@sdp-lbref02 ~]# uname -a
Linux sdp-lbref02 4.18.0-193.14.3.el8_2.x86_64 #1 SMP Mon Jul 20 15:02:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@sdp-lbref02 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
</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/2429">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKGWKEAAO3LCKQFHCLR7M7LRANCNFSM4PXCVUUQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZPK45OCMK53NPFV7FLR7M7LRA5CNFSM4PXCVUU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KBWTMWQ.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/2429",
"url": "https://github.com/kamailio/kamailio/issues/2429",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>