[asterisk-users] Queues and distributed device state over WAN

Alec Davis sivad.a at paradise.net.nz
Fri Jan 25 03:53:39 CST 2013


>	Oliver wrote:
><snip>
>	Before diving into this, I've got the following question :
>	
>	- let say we have two Asterisk servers A and B,
>	- both are interconnected through PSTN (no SIP trunk)
>	- agent Alice's phone is connected (ie registered) to server A
>	- Alice's phone can be reached from server A phones dialing
Local/6789
>	- Alice's phone can also be reached from server B phones dialing
Local/00123456789
>	
>	
>	1. How do you configure both servers so that Alice's phone becomes a
Queue Member from a server B given queue ?
>	Simply calling AddQueueMember on server B, passing Local/00123456789
as interface value (ie AddQueueMember second argument) ?
>	
>	2. Then, how should server A publish Alice's phone status ?
>	How should server B consume Alice's phone status and associate it
with the Queue member activity ? Using AddQueueMember stateinterface
argument ?


Before trying to get distributed device state going:
	Device names across all Asterisk proxy's participating in
'distributed device state' need to be unique.
	IE. You can't have 'SIP/cisco1' exist on server A for ALICE, and
SIP/cisco1 on server B for BOB.

You need to get XMPP distributed device state working.
	I followed
https://wiki.asterisk.org/wiki/display/AST/Distributed+Device+State+with+XMP
P+PubSub

You need a reasonbly reliable WAN links to the jabber server support the
XMPP updates between servers.
	Asterisk segfaults if it can't contact the jabber server!!! See
https://issues.asterisk.org/jira/browse/ASTERISK-18078

Then:
	With Alice reqistered on Server A as SIP/cisco1
	With Server B hosting the queue named 'queue1'.

;(on Server B)
queues.conf:
[queue1]
;what makes this work with distributed states is the 'State Interface'
parameter 
...
member => Local/00123456789,0,ALICE,SIP/cisco1

Alice will need a number to ring to login/logout of queue1 hosted on Server
B;
Dialplan Example: on server B:
...
exten => s,n,Set(queuename=queue1)
exten => s,n,Set(interface=Local/00123456789)
exten => s,n,Set(penalty=0)
exten => s,n,Set(stateinterface=SIP/cisco1)
exten =>
s,n(queue-add),AddQueueMember(${queuename},${interface},${penalty},options,,
${stateinterface})

And to remove the member;
...
exten => s,n(queue-remove),RemoveQueueMember(${queuename},${interface})

Alec Davis
	
	





More information about the asterisk-users mailing list