[OpenSIPS-Users] dispatcher and attended transfers

Stanisław Pitucha viraptor at gmail.com
Wed Apr 8 16:41:43 CEST 2009


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.

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)

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().

Ok... I hope that explained the situation :)

Thanks,
Stan



More information about the Users mailing list