[OpenSIPS-Users] dispatcher and attended transfers

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Apr 15 18:43:25 CEST 2009


Hi Stan,

Stanisław Pitucha wrote:
> 2009/4/8 Bogdan-Andrei Iancu <bogdan at voice-system.ro>:
>   
>> if I got it right, you want to have a kind of dispatching to guarantee that
>> all in or out calls for user A are going through the same PBX. Correct?
>>     
>
> In short:
> Yes. But internal calls should use only one PBX in the cluster, not two.
>
> Long explanation:
> Actually, we don't care where the first call is exactly (can be
> randomised / load balanced). Just that if some user is already talking
> to someone on PBX X, we want his next call to route via X too.
>
> We've got that already working via a hack - we're getting the caller /
> callee contact from the dialog table into an avp. Then if
> $avp(s:contact){uri.host} matches any of our pbxes, we use it for
> routing; otherwise we use a dispatcher. That works relatively well,
> but breaks when one of the PBXes dies for example. Dialog stays in the
> database forever and that user can't dial out anyone, because he
> always gets routed to the dead IP.
>   
Got your problem.
> We can't simply route all the calls to/from user A to the same PBX,
> because we'd like to use only one PBX when doing internal calls. If we
> want internal calls to use only one PBX, hashing just on "From:" and
> "To:" headers is not enough, because we have 2 transfer scenarios:
>
> A calls B, B calls C, transfers
> - (two different destinations - B, C and sources - A, B)
>
> A calls B, A calls C, transfers
> - (two different destinations - B, C, same sources)
>   
yes, transfer and dispatcher are not good friends.
> Good enough solution would be, to set the $avp(s:contact){uri.host} as
> the first destination, with failover positions filled with the result
> of ds_select_domain().
>   
looks like a nice solution - ideally will be (and can be done) to use 
the ds_select() function in failure route (to do dispatching) only if 
the PBX to contact is down.

Right now the function is not allowed in failure route, but on a short 
overview on the code, there is no reason not to. So, as a trick you can 
call from failure route a generic route block and use the ds_selectxxX() 
from there - this will by pass the checks ;).

Let me know f it works for you.

Regards,
Bogdan
> Ok... I hope that explained the situation :)
>
> Thanks,
> Stan
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list