Hello Daniel,
I really ask for help,  here are configuration file

https://paste.fedoraproject.org/477652/88413891/

I spent quite a lot of time trying understand loose_route() /record_route() mix.
I can get signalling working, call is not disconnects, but no RTP. Or I can get rtp and signalling BYE is not routed properly.

My setup is just proxy all requests to freesiwtch boxes base on dispatcher selection where kamailio setup with 2 interfaces public and private.
I really appreciate  on you time and help.
 
Slava.




From: "volga629" <volga629@skillsearch.ca>
To: "sr-users" <sr-users@lists.sip-router.org>
Cc: miconda@gmail.com
Sent: Thursday, 10 November, 2016 23:54:40
Subject: Re: [SR-Users] BYE dispatcher

Hello Daniel,
What 


From: "volga629" <volga629@skillsearch.ca>
To: miconda@gmail.com
Cc: "sr-users" <sr-users@lists.sip-router.org>
Sent: Thursday, 10 November, 2016 11:25:19
Subject: Re: [SR-Users] BYE dispatcher

Hello Daniel,
My setup is proxy all requests to freeswitch via dispatcher.

Slava.


From: "Daniel-Constantin Mierla" <miconda@gmail.com>
To: "volga629" <volga629@skillsearch.ca>, "sr-users" <sr-users@lists.sip-router.org>
Sent: Thursday, 10 November, 2016 04:56:53
Subject: Re: [SR-Users] BYE dispatcher

Hello,

as I said before, the registrations have little to do with calls in sip, unless there is gruu in use.

Cheers,
Daniel


On 09/11/16 18:07, Slava Bendersky wrote:
Hello Everyone,
I cleared registrations and tried again and issue still present.
Client reply with 481.

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 638)
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610
E..~.3..4...c....E.\.....j..SIP/2.0 481 Call Leg/Transaction Does Not Exist
Via: SIP/2.0/UDP proxy_pub_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
Via: SIP/2.0/UDP 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
From: "Test Extension" <sip:4300@sip.company.tld>;tag=SXt3DQQ90a0Dj
To: <sip:4300@client_pub_ip:49383>;tag=719973534
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
CSeq: 99019404 BYE
Supported: replaces, path, eventlist
User-Agent: Grandstream Wave 1.2.2
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

Slava.


From: "volga629" <volga629@skillsearch.ca>
To: miconda@gmail.com, "sr-users" <sr-users@lists.sip-router.org>
Sent: Wednesday, 9 November, 2016 12:28:32
Subject: Re: [SR-Users] BYE dispatcher

Hello Everyone,
I changed dispatcher algorithm  from 0 to 1 and start working as expected. Yes group 0 is accepted.

route[DISPATCHER] {
if(!ds_select_dst("0", "1")) {
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request dropped \n");
sl_send_reply("404","Desitination Not Found \n");
drop();
} else {
$var(did) = 1;
}
if($var(did)) {
if (!t_relay()) {
sl_reply_error();
}
#forward();
}

t_on_failure("DISPATCHER_FAIL_ROUTE");
exit;
}

Slava.


From: "Daniel-Constantin Mierla" <miconda@gmail.com>
To: "sr-users" <sr-users@lists.sip-router.org>
Sent: Wednesday, 9 November, 2016 04:33:33
Subject: Re: [SR-Users] BYE dispatcher

Hello,


On 08/11/16 20:42, Slava Bendersky wrote:
Hello Everyone,
My setup is kamailio as proxy  with few boxes of freeswitch in the LAN. Having issue with BYE when extensions register on different freeswitch boxes. Here are some trace of the call.
Not sure if this tag= miss match or routing.

Dispatcher use group 0 with option 4 (round robin).

is group value 0 accepted? I think this may create problems if a function returns the group in the config as return code -- iirc, this was changed maybe for lcr or permissions.

On the other hand, the registrations are quite independent in SIP in relation with calls. The BYE should be routed based on record-routing to the freeswitch that was involved in routing initial INVITE, with no relation to new registrations from end devices. Is the BYE sent to the freeswitch that got the initial BYE.

Cheers,
Daniel
-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users