Hi, all
I'm trying to set up 2 kamailio servers for active-active redundancy. The two kamailio severs share the the same database with db_mode=3, and no registration replication. Use pjsua2 as SIP client for testing. The test setup is as follows:
kamailio server 1(k1): 10.0.1.30:5061
kamailio server 2(k2): 10.0.1.32:5061
sip client c1: sip:16317@10.0.1.30
sip client c2: sip:72316@10.0.1.30
c1 is registered with k1.
c2 is registered with k2.
When c1 calls c2, the call flow is as follows:
INVITE:
c1------>k1------>k2------>c2
200 OK:
c1<------k1<------k2<------c2
So far, the INVITE works. c1 and c2 can establish a call. However, when c2 hangs up and sends BYE, the BYE is forwarded all the way to k1, and then k1 gives a 500 server error.
The log on k1 seems to indicate k1 was attempting to create a TLS connection to itself instead of using the existing TLS connection to c1 to forward the BYE.
BYE:
c1 k1<------k2<------c2
|
|------->Connection refused/500
Here is the kamailio log on k1:
Mar 16 10:34:21 kamailio.sip.com /usr/sbin/kamailio[13396]: ERROR: <core> [tcp_main.c:2740]: tcpconn_1st_send(): connect 10.0.1.30:55999 failed (RST) Connection refused
Mar 16 10:34:21 kamailio.sip.com /usr/sbin/kamailio[13396]: ERROR: <core> [tcp_main.c:2750]: tcpconn_1st_send(): 10.0.1.30:55999: connect & send for 0x7fc96a68a1a0 failed: Connection refused (111)
This is the routing logic for BYE in kamailio.cfg:
if (loose_route()) {
route(DLGURI);
if (is_method("BYE")) {
xlog("L_DBG", "=====BYE $ru from $fu $si:$sp to $du=====\n");
dlg_manage();
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
else if ( is_method("ACK") ) {
# ACK is forwarded statelessy
route(NATMANAGE);
}
else if ( is_method("NOTIFY") ) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}
route(RELAY);
exit;
} else {......
If I add location based routing for BYE from peer kamailio, then the BYE seems to be forwarded correctly:
if (loose_route()) {
route(DLGURI);
if (is_method("BYE")) {
xlog("L_DBG", "=====BYE $ru from $fu $si:$sp to $du=====\n");
dlg_manage();
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
# If BYE coming from Kamailio peer, route BYE by location
$var(peerlist)=$sel(cfg_get.trusted.peers);
$var(i) = 0;
while($var(i)<$(var(peerlist){param.count})) {
xlog("L_DBG", "=====$(var(peerlist){param.count})=====$(var(peerlist){param.valueat,$var(i)})=====\n");
if(src_ip==$(var(peerlist){param.valueat,$var(i)})) {
lookup("location");
xlog("L_DBG", "=====BYE from $fu $si:$sp to $du=====\n");
break;
}
$var(i) = $var(i) + 1;
}
}
else if ( is_method("ACK") ) {
# ACK is forwarded statelessy
route(NATMANAGE);
}
else if ( is_method("NOTIFY") ) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}
route(RELAY);
exit;
} else {......
My first question is why k1 loose_route sends the BYE to itself instead of the client. Is this a bug?
My next question is whether the above location routing for BYE from peer kamailio a good/safe approach.
Thanks
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/110
Do you have any particular RFC in mind?
On Mar 12, 2015 10:28 AM, "John Mathew" <john.mathew(a)divoxmedia.com> wrote:
> Hi,
>
> Maxim,
> Is there any plans for rtp header compression in future. I can't see
> anything in the change log for 2.0.0
>
> On Tuesday, 10 March 2015, Maxim Sobolev <sobomax(a)sippysoft.com> wrote:
>
>> Hi All,
>>
>> I'm happy to announce that we have released rtpproxy v2.0.0.
>>
>> You can review the release notes here:
>> https://github.com/sippy/rtpproxy/releases/tag/v2.0.0
>>
>> -sobomax
>>
>>
>
> --
> Sent from iPhone 6
>
> --
> You received this message because you are subscribed to the Google Groups
> "rtpproxy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rtpproxy+unsubscribe(a)googlegroups.com.
> To post to this group, send email to rtpproxy(a)googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rtpproxy/CA%2BSkwpUhu9fpwmqpRFiaXsQo9_%2B…
> <https://groups.google.com/d/msgid/rtpproxy/CA%2BSkwpUhu9fpwmqpRFiaXsQo9_%2B…>
> .
> For more options, visit https://groups.google.com/d/optout.
>