Hi everyone, I'm having a hard time transferring calls when the users are on different FreeSWITCH servers behind kamailio.
The users are distributed as follows: user1@sip.test.com -> Kamailio - ds_select_dst(1,1) -> FreeSWITCH1 user2@sip.test.com-> Kamailio - ds_select_dst(1,1) -> FreeSWITCH1 user3@sip.test.com -> Kamailio - ds_select_dst(1,1) -> FreeSWITCH2
When user1 calls user2 and user2 does an attended transfer to user3, the following happens: 285 67.220453 USER2_IP -> KAMAILIO_IP SIP 726 Request: REFER sip:mod_sofia@FreeSWITCH1_IP:5060, in-dialog | 286 67.220674 KAMAILIO_IP -> FreeSWITCH1_IP SIP 877 Request: REFER sip:mod_sofia@FreeSWITCH1_IP:5060, in-dialog | 287 67.223651 FreeSWITCH1_IP -> KAMAILIO_IP SIP 925 Status: 202 Accepted | 288 67.223753 KAMAILIO_IP -> USER2_IP SIP 838 Status: 202 Accepted | 289 67.225502 FreeSWITCH1_IP -> KAMAILIO_IP SIP/SDP 1225 Request: INVITE sip:user3@sip.test.com | 290 67.387323 KAMAILIO_IP -> 69.172.200.109 SIP/SDP 1420 Request: INVITE sip:user3@sip.test.com |
Turns out 69.172.200.109 is the actual IP address of sip.test.com (I've probably should have gone with sip.example.com or something else). What is the proper way to route that INVITE back to the other FreeSWITCH server so that the transfer would work? Thanks!
Kind regards,
Hi,
On Fri, Sep 1, 2017 at 2:35 PM, Iskren Hadzhinedev iskren.hadzhinedev@ikiji.com wrote:
Hi everyone, I'm having a hard time transferring calls when the users are on different FreeSWITCH servers behind kamailio.
We had to solve that problem a while ago, too. Only with Asterisk instead of Freeswitch. In newer versions, Asterisk has support for remote transfer built in, but their own page says you should avoid it if possible. https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Remote+Attended+Transfe...
I don't know whether that's a possible solution for you, but we found a solution to make sure whenever there are more than one call for the same user, they both run through the same Asterisk. So we remember (in Kamailio whether there are running calls for a user and where they came from or got dispatched to, and whenever a second call comes in for that user, it gets sent to the same Asterisk. This way we have only local transfers, and those do work.
Maybe this is something you can implement in your setup, too. However, if you really need to send the call to user3 via FreeSWITCH2, then maybe it could be a solution to first send the ourbound call from user2 first to FreeSWITCH1 and then dial something on FreeSWITCH2. This way you will also have the two channels to bridge on FreeSWITCH1.
HTH Sebastian
Hi Sebastian, Sorry for the very late reply. I took your advice on originating all calls if they exist to the same server and keeping the transfers local to the same node. That way the CDRs stay clean and easy to read/parse at a later stage if need be. I used the htable module to store information for the active calls and it works pretty nice. Thanks for your help!
Kind regards, /Iskren Hadzhinedev/
On 4.9.2017 г. 9:25, Sebastian Damm wrote:
Hi,
On Fri, Sep 1, 2017 at 2:35 PM, Iskren Hadzhinedev iskren.hadzhinedev@ikiji.com wrote:
Hi everyone, I'm having a hard time transferring calls when the users are on different FreeSWITCH servers behind kamailio.
We had to solve that problem a while ago, too. Only with Asterisk instead of Freeswitch. In newer versions, Asterisk has support for remote transfer built in, but their own page says you should avoid it if possible. https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Remote+Attended+Transfe...
I don't know whether that's a possible solution for you, but we found a solution to make sure whenever there are more than one call for the same user, they both run through the same Asterisk. So we remember (in Kamailio whether there are running calls for a user and where they came from or got dispatched to, and whenever a second call comes in for that user, it gets sent to the same Asterisk. This way we have only local transfers, and those do work.
Maybe this is something you can implement in your setup, too. However, if you really need to send the call to user3 via FreeSWITCH2, then maybe it could be a solution to first send the ourbound call from user2 first to FreeSWITCH1 and then dial something on FreeSWITCH2. This way you will also have the two channels to bridge on FreeSWITCH1.
HTH Sebastian
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users