Re: [asterisk-users] Ringing Groups, SIP Forward and looping problem

2007-09-28 Thread Robert Lister
On Fri, Sep 28, 2007 at 09:57:52AM +0100, Russell Brown wrote:
 
 I've a big problem with SIP forwarding back into 'ringing groups'
 creating what can only be described as call storms :-(
 
 I have a 'ringing groups' of SIP phones with an effective dialplan (much
 simplified) like so:
 
   ;   Purchase ledger
   [ptsn_inbound]
   exten = _846061,1,Dial(Local/[EMAIL PROTECTED])

I am not sure why you are doing it like this but it seems awkward.

Relying on handset diverts seems fraught with danger as you can't be sure 
what's going to happen from a dialplan perspective.

Why don't you set up a queue in queues.conf strategy ringall:

[purchase]
; Dynamic group for users logging on in London Office
strategy = ringall
maxlen = 1
retry = 1
timeout = 20
musiconhold = default
joinempty = strict
leavewhenempty = yes
timeoutrestart = yes
member = SIP/110
member = SIP/111
member = SIP/112
member = SIP/113
member = SIP/114

Then route calls to that queue from the dialplan:-

exten = _846061,1,Queue(purchase|rn|||40)
...

[...variety of options you can do here if there is no answer all busy
 in the queue etc, see variable ${QUEUESTATUS}. Here's what I've got:-
 
exten = s,n,GotoIf($[${QUEUESTATUS} = UNKNOWN]?200)
exten = s,n,GotoIf($[${QUEUESTATUS} = BUSY]?200)
exten = s,n,GotoIf($[${QUEUESTATUS} = FULL]?200)
exten = s,n,GotoIf($[${QUEUESTATUS} = JOINUNAVAIL]?200)
exten = s,n,GotoIf($[${QUEUESTATUS} = LEAVEUNAVAIL]?200)
exten = s,n,GotoIf($[${QUEUESTATUS} = LEAVEEMPTY]?200)
exten = s,n,GotoIf($[${QUEUESTATUS} = TIMEOUT]?200)

]

Then you could set up some features in the dial plan to allow your users
to go in and out of the group as required. Something like:-

exten = _*71,2,Macro(togglegroup,${CALLERID(num)})

( *71 will toggle in and out of group, so you could program a button on
  your phones for example, to set them in and out of group. This set of 
  macros keeps track for each user in and out group state and toggles
  it in and out. It keeps track of it with a db variable.)


[macro-outofgroup]
exten = s,1,NoOp(macro-outofgroup reached: ${ARG1})
exten = s,n,NoOp( -- DND pausing queue member:  Local/${ARG1} --- )
exten = s,n,PauseQueueMember(|Local/[EMAIL PROTECTED])
exten = s,n,Set(DB(${ARG1}/outofgroup)=1)
exten = s,n,Answer
exten = s,n,Playback(extras/dnd-out-of-group)
exten = s,n,Hangup

[macro-ingroup]
exten = s,1,NoOp(macro-ingroup reached: ${ARG1})
exten = s,n,NoOp( -- DND unpausing queue member:  Local/${ARG1} --- )
exten = s,n,UnPauseQueueMember(|Local/[EMAIL PROTECTED])
exten = s,n,DBdel(${ARG1}/outofgroup)
exten = s,n,Answer
exten = s,n,Playback(extras/dnd-now-in-group)
exten = s,n,Hangup

[macro-togglegroup]
exten = s,1,NoOp(macro-togglegroup reached: ${ARG1})
exten = s,n,GotoIf($[${DB(${ARG1}/outofgroup)} = ]?900)
exten = s,n,Macro(ingroup,${ARG1})
exten = s,n,Hangup

exten = s,900,Macro(outofgroup,${ARG1});
exten = s,n,Hangup

(I've got those sounds if you want them, let me know, if you don't mind 
plummy british accent we re-recorded all our sounds files in, plus a few 
custom ones, or you could just play a tone so the user knows the group 
action has been carried out.)

Let me know if this is any use to you.


Regards,


Rob


-- 
Robert Lister - London Internet Exchange - http://www.linx.net/
sip:[EMAIL PROTECTED] - inoc-dba:5459*710- tel: +44 (0)20 7645 3510

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Ringing Groups, SIP Forward and looping problem

2007-09-28 Thread Russell Brown

I've a big problem with SIP forwarding back into 'ringing groups'
creating what can only be described as call storms :-(

I have a 'ringing groups' of SIP phones with an effective dialplan (much
simplified) like so:

;   Purchase ledger
[ptsn_inbound]
exten = _846061,1,Dial(Local/[EMAIL PROTECTED])



[groups]
exten = 6061,1,Macro(QUEUEING_GROUP_WITH_NS,${EXTEN},Purchase)



[macro-QUEUEING_GROUP_WITH_NS]
...
exten = s,n,Dial(Sip/110Sip/111Sip/112Sip/113Sip/114)
...


If Sip/110 sets their SIP phone (SNOM 300 FWIW) to call forward to 6061
then all seems fine and calls to 110 end up in the group.

If Sip/113 *also* sets their SIP phone to call forward to 6061 then
Asterisk seems to get into a state where the calls bounce around,
ringing the phones but seemingly not allowing the call to be answered.

A 'restart now' is the only way out while this call storm is in
progress.

I'm guessing that having two SIP phones redirecting back into the
ringing group is what's causing the problem but can't think of a way
around it.

Can anyone suggest a cure?

-- 
 Regards,
 Russell
 
| Russell Brown  | MAIL: [EMAIL PROTECTED] PHONE: 01780 471800 |
| Lady Lodge Systems | WWW Work: http://www.lls.com  |
| Peterborough, England  | WWW Play: http://www.ruffle.me.uk |
 

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Ringing Groups, SIP Forward and looping problem

2007-09-28 Thread Robert Lister

Whoops! Forgot to change it for SIP devices. 

Of course you need to change your queue member devices to SIP and not 
Local/${ARG1} as I've got agents and other complications in mine.

You might need a context or not, see what happens!

Rob

Here is corrected version (I think will work, untested though!)

 [macro-outofgroup]
 exten = s,1,NoOp(macro-outofgroup reached: ${ARG1})
 exten = s,n,NoOp( -- DND pausing queue member:  SIP/${ARG1} --- )
 exten = s,n,PauseQueueMember(|SIP/${ARG1})
 exten = s,n,Set(DB(${ARG1}/outofgroup)=1)
 exten = s,n,Answer
 exten = s,n,Playback(extras/dnd-out-of-group)
 exten = s,n,Hangup
 
 [macro-ingroup]
 exten = s,1,NoOp(macro-ingroup reached: ${ARG1})
 exten = s,n,NoOp( -- DND unpausing queue member:  SIP/${ARG1} --- )
 exten = s,n,UnPauseQueueMember(|SIP/${ARG1})
 exten = s,n,DBdel(${ARG1}/outofgroup)
 exten = s,n,Answer
 exten = s,n,Playback(extras/dnd-now-in-group)
 exten = s,n,Hangup
 
 [macro-togglegroup]
 exten = s,1,NoOp(macro-togglegroup reached: ${ARG1})
 exten = s,n,GotoIf($[${DB(${ARG1}/outofgroup)} = ]?900)
 exten = s,n,Macro(ingroup,${ARG1})
 exten = s,n,Hangup
 
 exten = s,900,Macro(outofgroup,${ARG1});
 exten = s,n,Hangup


-- 
Robert Lister - London Internet Exchange - http://www.linx.net/
sip:[EMAIL PROTECTED] - inoc-dba:5459*710- tel: +44 (0)20 7645 3510

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users