Ring Groups - Hunting?


#1

I’ve got a ring group setup, and I’d like it to hunt different two different extensions, basically going from ringing 1234 to ringing 2345 if 1234 is on the phone or unavailable.

Here’s the code I’ve got:

[ext-group] include => ext-group-custom exten => 3551,1,Macro(rg-group,hunt,15,,3501-3502) exten => 3551,2,Goto(aa_1,s,1) ; jump

When calling into our DID which is set to ring into this call group (ring group by default), instead of ringing ANY extensions, it goes straight into the auto attendant.

Any ideas?

Thanks in advance!

Chris


#2

Seems like we’d need to see the macro to be of any help.


#3

Here ya go:

[macro-rg-group] exten => s,1,Macro(user-callerid) exten => s,2,GotoIf($[${CALLERIDNAME:0:${LEN(${RGPREFIX})}} != ${RGPREFIX}]?4:3) ; check for old prefix exten => s,3,SetCIDName(${CALLERIDNAME:${LEN(${RGPREFIX})}}) ; strip off old prefix exten => s,4,Setvar(RGPREFIX=${ARG3}) ; set new prefix exten => s,5,SetCIDName(${RGPREFIX}${CALLERIDNAME}) ; add prefix to callerid name exten => s,6,Setvar(RecordMethod=Group) ; set new prefix exten => s,7,Macro(record-enable,${MACRO_EXTEN},${RecordMethod}) exten => s,8,SetVar(RingGroupMethod=${ARG1}) ; exten => s,9,Macro(dial,${ARG2},${DIAL_OPTIONS},${ARG4}) exten => s,10,SetVar(RingGroupMethod='') ;


#4

We’ve looked everywhere, and found that the context is correct, from what I can tell … I just don’t understand why its not doing the actual line hunting, instead of failing over immediately into the auto-attendant.

Thanks!


#5

The way this is supposed to work, is that it is supposed to accept an incoming call on our IAX trunk, then ring the two extensions (in order, or whatever, just not at the same time), and then if neither answers, fail over to Auto-Attendant 1, which then directs the caller to press 1 for Bob1 and 2 for Bob2

Here’s the CLI for 3 seperate phone calls:

Ring Group w/ Ring Strategy set to RING ALL:

Connected to Asterisk 1.2.0 currently running on pbx (pid = 2430) Verbosity is at least 3 -- Accepting AUTHENTICATED call from 208.139.204.232: > requested format = ulaw, > requested prefs = (), > actual format = gsm, > host prefs = (gsm), > priority = mine -- Executing SetVar("IAX2/teliax-2", "FROM_DID=NXXNXXXXXX") in new stack -- Executing SetVar("IAX2/teliax-2", "FAX_RX_EMAIL=recfax@prolificpiercings. com") in new stack -- Executing Answer("IAX2/teliax-2", "") in new stack -- Executing Wait("IAX2/teliax-2", "0") in new stack -- Executing Goto("IAX2/teliax-2", "ext-group|3551|1") in new stack -- Goto (ext-group,3551,1) -- Executing Macro("IAX2/teliax-2", "rg-group|ringall|15||3501-3502") in new stack -- Executing Macro("IAX2/teliax-2", "user-callerid") in new stack -- Executing DBget("IAX2/teliax-2", "AMPUSER=DEVICE/NXXNXXXXXX/user") in new stack -- DBget: varname=AMPUSER, family=DEVICE, key=NXXNXXXXXX/user -- DBget: Value not found in database. -- Executing DBget("IAX2/teliax-2", "AMPUSERCIDNAME=AMPUSER//cidname") in ne w stack -- DBget: varname=AMPUSERCIDNAME, family=AMPUSER, key=/cidname -- DBget: Value not found in database. -- Executing GotoIf("IAX2/teliax-2", "1?5") in new stack -- Goto (macro-user-callerid,s,5) -- Executing NoOp("IAX2/teliax-2", "Using CallerID "Cell Phone CA" <805259 7980>") in new stack -- Executing GotoIf("IAX2/teliax-2", "0?4:3") in new stack -- Goto (macro-rg-group,s,3) -- Executing SetCIDName("IAX2/teliax-2", "Cell Phone CA") in new stack -- Executing SetVar("IAX2/teliax-2", "RGPREFIX=") in new stack -- Executing SetCIDName("IAX2/teliax-2", "Cell Phone CA") in new stack -- Executing SetVar("IAX2/teliax-2", "RecordMethod=Group") in new stack -- Executing Macro("IAX2/teliax-2", "record-enable|3551|Group") in new stack -- Executing GotoIf("IAX2/teliax-2", "0 > 0?2:4") in new stack -- Goto (macro-record-enable,s,4) -- Executing AGI("IAX2/teliax-2", "recordingcheck|20051204-150748|1133737666 .0") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck -- AGI Script recordingcheck completed, returning 0 -- Executing NoOp("IAX2/teliax-2", "No recording needed") in new stack -- Executing SetVar("IAX2/teliax-2", "RingGroupMethod=ringall") in new stack -- Executing Macro("IAX2/teliax-2", "dial|15|tTrw|3501-3502") in new stack -- Executing GotoIf("IAX2/teliax-2", "1?4:2") in new stack -- Goto (macro-dial,s,4) -- Executing AGI("IAX2/teliax-2", "dialparties.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi -- dialparties.agi: priority = 4 -- dialparties.agi: callingani2 = 0 -- dialparties.agi: accountcode = -- dialparties.agi: channel = IAX2/teliax-2 -- dialparties.agi: callerid = NXXNXXXXXX -- dialparties.agi: context = macro-dial -- dialparties.agi: callington = 0 -- dialparties.agi: dnid = unknown -- dialparties.agi: request = dialparties.agi -- dialparties.agi: calleridname = Cell Phone CA -- dialparties.agi: extension = s -- dialparties.agi: language = en -- dialparties.agi: uniqueid = 1133737666.0 -- dialparties.agi: callingpres = 0 -- dialparties.agi: type = IAX2 -- dialparties.agi: rdnis = unknown -- dialparties.agi: callingtns = 0 -- dialparties.agi: enhanced = 0.0 dialparties.agi: Caller ID name and number are 'NXXNXXXXXX' dialparties.agi: Methodology of ring is 'ringall' -- dialparties.agi: Added extension 3501 to extension map -- dialparties.agi: Added extension 3502 to extension map -- dialparties.agi: Added extension 3501 to extension map -- dialparties.agi: Added extension 3502 to extension map -- dialparties.agi: Extension 3502 cf is disabled -- dialparties.agi: Extension 3501 cf is disabled -- dialparties.agi: Extension 3502 do not disturb is disabled -- dialparties.agi: Extension 3501 do not disturb is disabled -- dialparties.agi: Checking CW and CFB status for extension 3502 == Parsing '/etc/asterisk/manager.conf': Found == Parsing '/etc/asterisk/manager_custom.conf': Found == Manager 'admin' logged on from 127.0.0.1 -- dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS == Manager 'admin' logged off from 127.0.0.1 dialparties.agi: Extension 3502 is available...skipping checks -- dialparties.agi: DbSet CALLTRACE/3502 to NXXNXXXXXX -- dialparties.agi: Checking CW and CFB status for extension 3501 == Parsing '/etc/asterisk/manager.conf': Found == Parsing '/etc/asterisk/manager_custom.conf': Found == Manager 'admin' logged on from 127.0.0.1 -- dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS == Manager 'admin' logged off from 127.0.0.1 dialparties.agi: Extension 3501 is available...skipping checks -- dialparties.agi: DbSet CALLTRACE/3501 to NXXNXXXXXX -- AGI Script dialparties.agi completed, returning 0 -- Executing Dial("IAX2/teliax-2", "SIP/3502&SIP/3501|15|tTrw") in new stack -- Called 3502 -- Called 3501 -- SIP/3501-78c6 is ringing -- SIP/3502-1776 is ringing == Spawn extension (macro-dial, s, 10) exited non-zero on 'IAX2/teliax-2' in macro 'dial' == Spawn extension (macro-rg-group, s, 9) exited non-zero on 'IAX2/teliax-2' in macro 'rg-group' == Spawn extension (ext-group, 3551, 1) exited non-zero on 'IAX2/teliax-2' -- Hungup 'IAX2/teliax-2'

Ring Group w/ Ring Strategy set to HUNT:

-- Accepting AUTHENTICATED call from 208.139.204.232: > requested format = ulaw, > requested prefs = (), > actual format = gsm, > host prefs = (gsm), > priority = mine -- Executing SetVar("IAX2/teliax-2", "FROM_DID=NXXNXXXXXX") in new stack -- Executing SetVar("IAX2/teliax-2", "FAX_RX_EMAIL=recfax@prolificpiercings.com") in new stack -- Executing Answer("IAX2/teliax-2", "") in new stack -- Executing Wait("IAX2/teliax-2", "0") in new stack -- Executing Goto("IAX2/teliax-2", "ext-group|3551|1") in new stack -- Goto (ext-group,3551,1) -- Executing Macro("IAX2/teliax-2", "rg-group|hunt|15||3501-3502") in new stack -- Executing Macro("IAX2/teliax-2", "user-callerid") in new stack -- Executing DBget("IAX2/teliax-2", "AMPUSER=DEVICE/NXXNXXXXXX/user") in new stack -- DBget: varname=AMPUSER, family=DEVICE, key=NXXNXXXXXX/user -- DBget: Value not found in database. -- Executing DBget("IAX2/teliax-2", "AMPUSERCIDNAME=AMPUSER//cidname") in new stack -- DBget: varname=AMPUSERCIDNAME, family=AMPUSER, key=/cidname -- DBget: Value not found in database. -- Executing GotoIf("IAX2/teliax-2", "1?5") in new stack -- Goto (macro-user-callerid,s,5) -- Executing NoOp("IAX2/teliax-2", "Using CallerID "Cell Phone CA" <NXXNXXXXXX>") in new stack -- Executing GotoIf("IAX2/teliax-2", "0?4:3") in new stack -- Goto (macro-rg-group,s,3) -- Executing SetCIDName("IAX2/teliax-2", "Cell Phone CA") in new stack -- Executing SetVar("IAX2/teliax-2", "RGPREFIX=") in new stack -- Executing SetCIDName("IAX2/teliax-2", "Cell Phone CA") in new stack -- Executing SetVar("IAX2/teliax-2", "RecordMethod=Group") in new stack -- Executing Macro("IAX2/teliax-2", "record-enable|3551|Group") in new stack -- Executing GotoIf("IAX2/teliax-2", "0 > 0?2:4") in new stack -- Goto (macro-record-enable,s,4) -- Executing AGI("IAX2/teliax-2", "recordingcheck|20051204-151116|1133737875.3") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck -- AGI Script recordingcheck completed, returning 0 -- Executing NoOp("IAX2/teliax-2", "No recording needed") in new stack -- Executing SetVar("IAX2/teliax-2", "RingGroupMethod=hunt") in new stack -- Executing Macro("IAX2/teliax-2", "dial|15|tTrw|3501-3502") in new stack -- Executing GotoIf("IAX2/teliax-2", "1?4:2") in new stack -- Goto (macro-dial,s,4) -- Executing AGI("IAX2/teliax-2", "dialparties.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi -- dialparties.agi: priority = 4 -- dialparties.agi: callingani2 = 0 -- dialparties.agi: accountcode = -- dialparties.agi: channel = IAX2/teliax-2 -- dialparties.agi: callerid = NXXNXXXXXX -- dialparties.agi: context = macro-dial -- dialparties.agi: callington = 0 -- dialparties.agi: dnid = unknown -- dialparties.agi: request = dialparties.agi -- dialparties.agi: calleridname = Cell Phone CA -- dialparties.agi: extension = s -- dialparties.agi: language = en -- dialparties.agi: uniqueid = 1133737875.3 -- dialparties.agi: callingpres = 0 -- dialparties.agi: type = IAX2 -- dialparties.agi: rdnis = unknown -- dialparties.agi: callingtns = 0 -- dialparties.agi: enhanced = 0.0 dialparties.agi: Caller ID name and number are 'NXXNXXXXXX' dialparties.agi: Methodology of ring is 'hunt' -- dialparties.agi: Added extension 3501 to extension map -- dialparties.agi: Added extension 3502 to extension map -- dialparties.agi: Added extension 3501 to extension map -- dialparties.agi: Added extension 3502 to extension map -- dialparties.agi: Extension 3502 cf is disabled -- dialparties.agi: Extension 3501 cf is disabled -- dialparties.agi: Extension 3502 do not disturb is disabled -- dialparties.agi: Extension 3501 do not disturb is disabled -- dialparties.agi: Checking CW and CFB status for extension 3502 == Parsing '/etc/asterisk/manager.conf': Found == Parsing '/etc/asterisk/manager_custom.conf': Found == Manager 'admin' logged on from 127.0.0.1 -- dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS == Manager 'admin' logged off from 127.0.0.1 dialparties.agi: Extension 3502 is available...skipping checks -- dialparties.agi: Checking CW and CFB status for extension 3501 == Parsing '/etc/asterisk/manager.conf': Found == Parsing '/etc/asterisk/manager_custom.conf': Found == Manager 'admin' logged on from 127.0.0.1 -- dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS == Manager 'admin' logged off from 127.0.0.1 dialparties.agi: Extension 3501 is available...skipping checks -- AGI Script dialparties.agi completed, returning 0 -- Executing NoOp("IAX2/teliax-2", "Returned from dialparties with hunt groups to dial ") in new stack -- Executing SetVar("IAX2/teliax-2", "HuntLoop=0") in new stack -- Executing GotoIf("IAX2/teliax-2", "0") in new stack -- Executing NoOp("IAX2/teliax-2", "Returning there are no members left in the hunt group to ring") in new stack -- Executing SetVar("IAX2/teliax-2", "RingGroupMethod=") in new stack -- Executing Goto("IAX2/teliax-2", "aa_1|s|1") in new stack -- Goto (aa_1,s,1) -- Executing GotoIf("IAX2/teliax-2", "0?4") in new stack -- Executing Answer("IAX2/teliax-2", "") in new stack -- Executing Wait("IAX2/teliax-2", "1") in new stack -- Executing SetVar("IAX2/teliax-2", "LOOPED=1") in new stack -- Executing GotoIf("IAX2/teliax-2", "0?hang|1") in new stack -- Executing SetVar("IAX2/teliax-2", "DIR-CONTEXT=home") in new stack -- Executing DigitTimeout("IAX2/teliax-2", "3") in new stack -- Set Digit Timeout to 3 -- Executing ResponseTimeout("IAX2/teliax-2", "7") in new stack -- Set Response Timeout to 7 -- Executing BackGround("IAX2/teliax-2", "custom/aa_1") in new stack -- Playing 'custom/aa_1' (language 'en') == Spawn extension (aa_1, s, 9) exited non-zero on 'IAX2/teliax-2' -- Executing Hangup("IAX2/teliax-2", "") in new stack == Spawn extension (aa_1, h, 1) exited non-zero on 'IAX2/teliax-2' -- Hungup 'IAX2/teliax-2'

Ring Group w/ Ring Strategy set to Memory Hunt:

-- Accepting AUTHENTICATED call from 208.139.204.232: > requested format = ulaw, > requested prefs = (), > actual format = gsm, > host prefs = (gsm), > priority = mine -- Executing SetVar("IAX2/teliax-3", "FROM_DID=NXXNXXXXXX") in new stack -- Executing SetVar("IAX2/teliax-3", "FAX_RX_EMAIL=recfax@prolificpiercings.com") in new stack -- Executing Answer("IAX2/teliax-3", "") in new stack -- Executing Wait("IAX2/teliax-3", "0") in new stack -- Executing Goto("IAX2/teliax-3", "ext-group|3551|1") in new stack -- Goto (ext-group,3551,1) -- Executing Macro("IAX2/teliax-3", "rg-group|memoryhunt|15||3501-3502") in new stack -- Executing Macro("IAX2/teliax-3", "user-callerid") in new stack -- Executing DBget("IAX2/teliax-3", "AMPUSER=DEVICE/NXXNXXXXXX/user") in new stack -- DBget: varname=AMPUSER, family=DEVICE, key=NXXNXXXXXX/user -- DBget: Value not found in database. -- Executing DBget("IAX2/teliax-3", "AMPUSERCIDNAME=AMPUSER//cidname") in new stack -- DBget: varname=AMPUSERCIDNAME, family=AMPUSER, key=/cidname -- DBget: Value not found in database. -- Executing GotoIf("IAX2/teliax-3", "1?5") in new stack -- Goto (macro-user-callerid,s,5) -- Executing NoOp("IAX2/teliax-3", "Using CallerID "Cell Phone CA" <NXXNXXXXXX>") in new stack -- Executing GotoIf("IAX2/teliax-3", "0?4:3") in new stack -- Goto (macro-rg-group,s,3) -- Executing SetCIDName("IAX2/teliax-3", "Cell Phone CA") in new stack -- Executing SetVar("IAX2/teliax-3", "RGPREFIX=") in new stack -- Executing SetCIDName("IAX2/teliax-3", "Cell Phone CA") in new stack -- Executing SetVar("IAX2/teliax-3", "RecordMethod=Group") in new stack -- Executing Macro("IAX2/teliax-3", "record-enable|3551|Group") in new stack -- Executing GotoIf("IAX2/teliax-3", "0 > 0?2:4") in new stack -- Goto (macro-record-enable,s,4) -- Executing AGI("IAX2/teliax-3", "recordingcheck|20051204-151310|1133737988.4") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck -- AGI Script recordingcheck completed, returning 0 -- Executing NoOp("IAX2/teliax-3", "No recording needed") in new stack -- Executing SetVar("IAX2/teliax-3", "RingGroupMethod=memoryhunt") in new stack -- Executing Macro("IAX2/teliax-3", "dial|15|tTrw|3501-3502") in new stack -- Executing GotoIf("IAX2/teliax-3", "1?4:2") in new stack -- Goto (macro-dial,s,4) -- Executing AGI("IAX2/teliax-3", "dialparties.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi -- dialparties.agi: priority = 4 -- dialparties.agi: callingani2 = 0 -- dialparties.agi: accountcode = -- dialparties.agi: channel = IAX2/teliax-3 -- dialparties.agi: callerid = NXXNXXXXXX -- dialparties.agi: context = macro-dial -- dialparties.agi: callington = 0 -- dialparties.agi: dnid = unknown -- dialparties.agi: request = dialparties.agi -- dialparties.agi: calleridname = Cell Phone CA -- dialparties.agi: extension = s -- dialparties.agi: language = en -- dialparties.agi: uniqueid = 1133737988.4 -- dialparties.agi: callingpres = 0 -- dialparties.agi: type = IAX2 -- dialparties.agi: rdnis = unknown -- dialparties.agi: callingtns = 0 -- dialparties.agi: enhanced = 0.0 dialparties.agi: Caller ID name and number are 'NXXNXXXXXX' dialparties.agi: Methodology of ring is 'memoryhunt' -- dialparties.agi: Added extension 3501 to extension map -- dialparties.agi: Added extension 3502 to extension map -- dialparties.agi: Added extension 3501 to extension map -- dialparties.agi: Added extension 3502 to extension map -- dialparties.agi: Extension 3502 cf is disabled -- dialparties.agi: Extension 3501 cf is disabled -- dialparties.agi: Extension 3502 do not disturb is disabled -- dialparties.agi: Extension 3501 do not disturb is disabled -- dialparties.agi: Checking CW and CFB status for extension 3502 == Parsing '/etc/asterisk/manager.conf': Found == Parsing '/etc/asterisk/manager_custom.conf': Found == Manager 'admin' logged on from 127.0.0.1 -- dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS == Manager 'admin' logged off from 127.0.0.1 dialparties.agi: Extension 3502 is available...skipping checks -- dialparties.agi: Checking CW and CFB status for extension 3501 == Parsing '/etc/asterisk/manager.conf': Found == Parsing '/etc/asterisk/manager_custom.conf': Found == Manager 'admin' logged on from 127.0.0.1 -- dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS == Manager 'admin' logged off from 127.0.0.1 dialparties.agi: Extension 3501 is available...skipping checks -- AGI Script dialparties.agi completed, returning 0 -- Executing NoOp("IAX2/teliax-3", "Returned from dialparties with hunt groups to dial ") in new stack -- Executing SetVar("IAX2/teliax-3", "HuntLoop=0") in new stack -- Executing GotoIf("IAX2/teliax-3", "0") in new stack -- Executing NoOp("IAX2/teliax-3", "Returning there are no members left in the hunt group to ring") in new stack -- Executing SetVar("IAX2/teliax-3", "RingGroupMethod=") in new stack -- Executing Goto("IAX2/teliax-3", "aa_1|s|1") in new stack -- Goto (aa_1,s,1) -- Executing GotoIf("IAX2/teliax-3", "0?4") in new stack -- Executing Answer("IAX2/teliax-3", "") in new stack -- Executing Wait("IAX2/teliax-3", "1") in new stack -- Executing SetVar("IAX2/teliax-3", "LOOPED=1") in new stack -- Executing GotoIf("IAX2/teliax-3", "0?hang|1") in new stack -- Executing SetVar("IAX2/teliax-3", "DIR-CONTEXT=home") in new stack -- Executing DigitTimeout("IAX2/teliax-3", "3") in new stack -- Set Digit Timeout to 3 -- Executing ResponseTimeout("IAX2/teliax-3", "7") in new stack -- Set Response Timeout to 7 -- Executing BackGround("IAX2/teliax-3", "custom/aa_1") in new stack -- Playing 'custom/aa_1' (language 'en') == Spawn extension (aa_1, s, 9) exited non-zero on 'IAX2/teliax-3' -- Executing Hangup("IAX2/teliax-3", "") in new stack == Spawn extension (aa_1, h, 1) exited non-zero on 'IAX2/teliax-3' -- Hungup 'IAX2/teliax-3'

We are running A@H 2.1, with Asterisk 1.2 installed …

Any help would be GREATLY appreciated!!!