[asterisk-dev] device_state distribution issues

Klaus Darilion klaus.mailinglists at pernau.at
Mon Nov 8 06:12:46 CST 2010


Hi!

I tested distributed device-states with XMPP (I guess same applies for 
OAIS too). I found a problem when device states are generated from 
multiple servers.

Consider the following example: 2 Asterisk servers (identical 
configuration) and 2 clients (friends). One load balancer which handles 
registrations and distribute calls dynamically to the servers:

1. client1 calls client2:


client1   client2    loadbalancer    server1   server2  watcher
    -------INV------------>
                            ----INV------>
                            <---INV------- ---NOTIFY InUse-->
              <----INV------

The call gets routed via server1. server1 has a subscription from a 
watcher (BLF) and sends a NOTIFY that client2 is INUSE.

Now client2 puts the call on hold and calls somebody else - this time 
the call gets routed via server2. Server2 distributes the INUSE event 
via XMPP to server1. As the watcher already knows that client2 is 
"InUse" there is no need to send another NOTIFY:


client1   client2    loadbalancer    server1   server2  watcher
               -INV------->
                            ----INV---------------->
                                       <--XMPP INUSE--

Now client2 terminates the second call. This time a NOT_INUSE is sent 
via XMPP which triggers an "Idle" NOTIFY:

client1   client2    loadbalancer    server1   server2  watcher
               -BYE------->
                            ----BYE---------------->
                                       <-NOT_INUSE--
                                        -----NOTIFY Idle--->

Now, the BLF lamp extinguishes due to the NOTIFY, but the first call is 
still active -> BAD.

Does Asterisk keep proper state of remote devices (e.g. with a call 
timeout)? If yes, then it is a bug. If no - then it would explain this 
behavior but IMO would be a serious limitation.

regards
Klaus




More information about the asterisk-dev mailing list