[SR-Users] Paging from asterisk to accounts with Multiple Registrations...

Ovidiu Sas osas at voipembedded.com
Mon Mar 14 17:16:00 CET 2011


On Mon, Mar 14, 2011 at 10:18 AM, Derrick Bradbury <derrickb at halex.com> wrote:
>
> Hi all... interesting problem...
>
> I am using kamailio as the registration server for a cluster of asterisk
> servers. I am allowing multiple registrations on the same account to allow
> for parallel forking on a normal call...
>
> The problem is set paging... when I send the page to the account that has
> multiple registrations, the parallel fork works properly and the first phone
> to respond gets "control" of the call. Unfortunately there is an auto answer
> field in the invite. So simple case: one account, two phones.. invite gets
> sent to both phones, both phones answer... BUT one phone grabs "control" of
> the call, and the other phone no longer receives any more commands... so it
> never hangs up as it doesn't receive a "BYE".
>
> Is there any way to turn off the parallel fork behavior, and keep sending
> all packets to both (or more) phones?

See http://www.kamailio.org/docs/modules/3.1.x/modules_k/registrar.html#id2952881
.
With this parameter, the parallel forking could be turned off, but the
second phone will not be contacted.

One solution here would be to implement some sort of serial forking:
 - asterisk will make a 'paging' call to kamailio
 - kamailio will perform a lookup() and it will send the call the the
firs binding address
 - once the call is answered, asterisk should place a second call to
the same account
 - kamailio will perform a lookup() and it will send the call the the
firs binding address and it will get busy, then it will fail-over to
the next binding address.
 - and so on ...

This is kind of ugly ... but it may work

You need to have individual calls between asterisk and each paged
phone in order to have proper media to work.
I don't think asterisk can send multiple rtp streams for the same call.

Or some other hack wold be to set up aliases on the asterisk server
for each binding account and make a call for each one of them.
In the kamailio server, revert the alias to the true account and
perform a lookup.  Once you get the list or bindings, for each
individual call you drop all the branches that are not matched and
keep the one that matches the alias.

Let's say, on the kamailio server you have the user 'paging' and there
are 3 binding URIs:
 - paging-location1
 - paging-location2
 - paging-location3

On the asterisk server, three calls are setup to:
 - paging1
 - paging2
 - paging3
When the call is received, for each call a lookup will be performed
for paging.  For each call we kow the original RURI and we will
extract from it the location that we want to call.  The call for
"paging1" will pick "paging-location1", the call for "paging2" will
pick "paging-location2" and so on ...


Anyway, you can't solve this issue with a single call from asterisk
unless you have some rtp-replicator somewhere in the middle to fork
the rtp stream from asterisk and let one single rtp stream to go back
to asterisk.



Regards,
Ovidiu Sas



More information about the sr-users mailing list