Hello,

Could you please help me correctly to configure Kamailio with load balancing between two asterisk servers and topology hidding with topoh module.
In attach sip trace from kamailio and my config.

Currently my problem is that after call UP on Asterisk side, Asterisk send 10 times Retransmitting to 
<------------->
Retransmitting #5 (no NAT) to 37.148.171.162:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 37.148.171.162;branch=z9hG4bKf534.157d7d1321019895cc6ba367dd3ae94c.0;received=37.148.171.162
Via: SIP/2.0/UDP 37.148.171.162;branch=z9hG4bKsr-mDYdVEts1x8-yJc91MhEVMtOVMhC6pni1uai1uSAQiytLvyKkMqHB5JsSg98PMYayEyHzESE1gdA6E9C
From: "testaccount" <sip:37125511039@213.21.197.50>;tag=as7abbf1f1
To: <sip:100@37.148.171.162:5060>;tag=as143173ac
Call-ID: !!:1MeMfMhpfGtgfo6MQu6HfMNH1v-515SC1omDQocT1Efc1MhEVMtOVMhC6pni1uai1uSA
CSeq: 102 INVITE
Server: Asterisk PBX GIT-master-c83a44c
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:100@37.148.171.164:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 267

v=0
o=root 1502512559 1502512559 IN IP4 37.148.171.164
s=Asterisk PBX GIT-master-c83a44c
c=IN IP4 37.148.171.164
t=0 0
m=audio 19658 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

And no ACK answer from Kamailio. After 32 sec call drops.

I have call flow: Provider 213.21.197.50 -> Kamailio 37.148.171.162 -> Asterisk 37.148.171.163.

kamailio -v
version: kamailio 5.2.0 (x86_64/linux) 535e13
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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
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: 535e13
compiled on 01:27:51 Dec 16 2018 with gcc 4.8.5

On Asterisk side I have config

[general]
language=en
maxexpirey=3600
defaultexpirey=3600
bindport=5060
subscribecontext=lab
allowsubscribe=yes
limitonpeers=yes
notifyringing=yes
notifyhold=yes
disallow=all
alwaysauthreject=yes
allowguest=no
allow=alaw
bindaddr=37.148.171.163
t38pt_udptl=yes,redundancy
faxdetect=yes
directmedia=no
rtptimeout=60
rtpholdtimeout=300

[kamailio]
type=friend
host=37.148.171.162
port=5060
nat=no
qualify=no
canreinvite=yes
insecure=invite
context=from-pstn
;directmedia=yes

Many thanks !

BR,
Alex















  

-- 
Best regards,
 Techinnovation                          
mailto:techinnovation@inbox.lv