[OpenSIPS-Users] Transfer problem with Opensips as a load balancer

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Nov 23 18:32:07 CET 2011


Hi Schneur,

What you have to do is to change the way you distribute the call among 
the asterisk boxes in such a way that all calls in which a user is 
involved to be on the same box (so that the transfers will work).

How to do that? with a mixed routing logic. When you receive a new call, do:
     - check if caller or callee are already involved into an existing 
call on a certain box. if so, route to that box
     - default is to do LB as you do now.

For the check part, you need to use the dialog module (to be dialog 
stateful), set in some dialog variables the caller / callee / box (to be 
remembered later) and query via get_dialog_info() function - 
http://www.opensips.org/html/docs/modules/1.7.x/dialog.html#id294051

Regards,
Bogdan

On 11/23/2011 06:48 PM, Schneur Rosenberg wrote:
> I'm using Opensips as a Load balancer and as a registrar, so basically
> all phones are registered to the Opensips, all Incoming calls hit the
> opensips server which forwards the call to asterisk with load
> balancing, asterisk decides what to do with the call ie IVR voicemail
> etc and if the call needs to be sent to a phone asterisk will send it
> back to opensips and opensips will send it to the phone.
>
> Outgoing calls are sent to asterisk via load balancing and asterisk
> decides how to terminate the call.
>
> This setup helps me load balance all calls and also removes the
> registrar load from asterisk which does not handle registrations fine
> when there are approx 300 peers on my asterisk system.
>
> My problem is that sometimes when I do a transfer I get back from
> asterisk "SIP/2.0 481 Call leg/transaction does not exist.".
>
> The test call I've done was done by calling from phone 1 a phone
> number which hits our system, so what happened is phone invited
> opensips to the DID, opensips sent the call to Asterisk server 1, then
> the DID called in and opensips sent it to Asterisk server 2, Asterisk
> server 2 saw that this did should ring on a phone so it sent it back
> to opensips which properly terminated the call to phone 2, then phone
> 1 wanted to transfer call to a outside phone, so it sent a invite to
> opensips with the phone number to call, opensips sent call to Asterisk
> server 2, then when user on phone 1 hit transfer, phone sent a refer
> to Asterisk 1, and asterisk 1 retuned a NOTIFY with
> Subscription-state: terminated;reason=noresource. and SIP/2.0 481 Call
> leg/transaction does not exist.
>
> Can anyone please help me solve this problem.
>
> thank you
> S. Rosenberg
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"




More information about the Users mailing list