Russell Brown
2007-Sep-28 08:57 UTC
[asterisk-users] Ringing Groups, SIP Forward and looping problem
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/6061 at groups) .... [groups] exten => 6061,1,Macro(QUEUEING_GROUP_WITH_NS,${EXTEN},Purchase) .... [macro-QUEUEING_GROUP_WITH_NS] ... exten => s,n,Dial(Sip/110&Sip/111&Sip/112&Sip/113&Sip/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: russell at lls.com PHONE: 01780 471800 | | Lady Lodge Systems | WWW Work: http://www.lls.com | | Peterborough, England | WWW Play: http://www.ruffle.me.uk | --------------------------------------------------------------------
Robert Lister
2007-Sep-28 15:57 UTC
[asterisk-users] Ringing Groups, SIP Forward and looping problem
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/6061 at groups)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/${ARG1}@agent_call) 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/${ARG1}@agent_call) 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:robl at linx.net - inoc-dba:5459*710 - tel: +44 (0)20 7645 3510