Ring Group timeout problem

Discussion in 'General' started by galaxy, Jul 23, 2010.

  1. galaxy

    Joined:
    Jun 22, 2010
    Messages:
    42
    Likes Received:
    0
    Originally I thought there was an issue with IVR, however they're working fine.

    I've isolated a problem with Ring Group processing using generic Elastix generated dial plans. I have a simple need. I have a DAHDI trunk coming in that will go to a Ring Group, and when it times out, go to an IVR (or voicemail or anything, just to get it to work).

    When the Ring Group times out, it hangs up the call. The destination on timeout just doesn't matter. This happens on all ring groups I have set up.

    An example elastix generated dialplan for the ring group is:

    exten => 601,1,Macro(user-callerid,)
    exten => 601,n,GotoIf($["foo${BLKVM_OVERRIDE}" = "foo"]?skipdb)
    exten => 601,n,GotoIf($["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]?skipov)
    exten => 601,n(skipdb),Set(__NODEST=)
    exten => 601,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
    exten => 601,n,Set(__BLKVM_BASE=${EXTEN})
    exten => 601,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
    exten => 601,n(skipov),Set(RRNODEST=${NODEST})
    exten => 601,n(skipvmblk),Set(__NODEST=${EXTEN})
    exten => 601,n,Set(RecordMethod=Group)
    exten => 601,n,Macro(record-enable,2101-2111-2200-2300-2210-2310,${RecordMethod})
    exten => 601,n,Set(RingGroupMethod=ringall)
    exten => 601,n(DIALGRP),Macro(dial,40,${DIAL_OPTIONS},2101-2111-2200-2300-2210-2310)
    exten => 601,n,Set(RingGroupMethod=)
    exten => 601,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
    exten => 601,n,Set(__NODEST=)
    exten => 601,n,dbDel(${BLKVM_OVERRIDE})
    exten => 601,n,Goto(ivr-3,s,1)
    exten => 601,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})


    Which should go to an IVR. I've tested going directly to the IVR bypassing the ring group, and that works (but I'd like the extensions to ring first and have a chance of being answered first). The ring group uses the "ringall" strategy and currently has 3 extensions (I've even reduced it down to just one extension for testing but that didn't matter). There's no announcement, everything is at defaults, no checkboxes checked. The destination if no answer is an IVR.

    After the timeout, it just hangs up. Here's the CLI debug output:


    -- Starting simple switch on 'DAHDI/1-1'
    -- Executing [s@from-zaptel:1] NoOp("DAHDI/1-1", "Entering from-zaptel with DID == ") in new stack
    -- Executing [s@from-zaptel:2] Ringing("DAHDI/1-1", "") in new stack
    -- Executing [s@from-zaptel:3] Set("DAHDI/1-1", "DID=s") in new stack
    -- Executing [s@from-zaptel:4] NoOp("DAHDI/1-1", "DID is now s") in new stack
    -- Executing [s@from-zaptel:5] GotoIf("DAHDI/1-1", "1?zapok:notzap") in new stack
    -- Goto (from-zaptel,s,8)
    -- Executing [s@from-zaptel:8] NoOp("DAHDI/1-1", "Is a Zaptel Channel") in new stack
    -- Executing [s@from-zaptel:9] Set("DAHDI/1-1", "CHAN=1-1") in new stack
    -- Executing [s@from-zaptel:10] Set("DAHDI/1-1", "CHAN=1") in new stack
    -- Executing [s@from-zaptel:11] Macro("DAHDI/1-1", "from-zaptel-1|s|1") in new stack
    -- Executing [s@macro-from-zaptel-1:1] NoOp("DAHDI/1-1", "Entering macro-from-zaptel-1 with DID = s and setting to: 2013915555") in new stack
    -- Executing [s@macro-from-zaptel-1:2] Set("DAHDI/1-1", "__FROM_DID=2013915555") in new stack
    -- Executing [s@macro-from-zaptel-1:3] Goto("DAHDI/1-1", "from-trunk|2013915555|1") in new stack
    -- Goto (from-trunk,2013915555,1)
    == Channel 'DAHDI/1-1' jumping out of macro 'from-zaptel-1'
    -- Executing [2013915937@from-trunk:1] Set("DAHDI/1-1", "__FROM_DID=2013915937") in new stack
    -- Executing [2013915937@from-trunk:2] Gosub("DAHDI/1-1", "app-blacklist-check|s|1") in new stack
    -- Executing [s@app-blacklist-check:1] LookupBlacklist("DAHDI/1-1", "") in new stack
    -- Executing [s@app-blacklist-check:2] GotoIf("DAHDI/1-1", "0?blacklisted") in new stack
    -- Executing [s@app-blacklist-check:3] Return("DAHDI/1-1", "") in new stack
    -- Executing [2013915555@from-trunk:3] ExecIf("DAHDI/1-1", "0 |Set|CALLERID(name)=2013264444") in new stack
    -- Executing [2013915555@from-trunk:4] Set("DAHDI/1-1", "__CALLINGPRES_SV=allowed_not_screened") in new stack
    -- Executing [2013915555@from-trunk:5] SetCallerPres("DAHDI/1-1", "allowed_not_screened") in new stack
    -- Executing [2013915555@from-trunk:6] Goto("DAHDI/1-1", "ext-group|601|1") in new stack
    -- Goto (ext-group,601,1)
    -- Executing [601@ext-group:1] Macro("DAHDI/1-1", "user-callerid|") in new stack
    -- Executing [s@macro-user-callerid:1] Set("DAHDI/1-1", "AMPUSER=2013264444") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("DAHDI/1-1", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("DAHDI/1-1", "1|Set|REALCALLERIDNUM=2013264444") in new stack
    -- Executing [s@macro-user-callerid:4] Set("DAHDI/1-1", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:5] Set("DAHDI/1-1", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("DAHDI/1-1", "1?report") in new stack
    -- Goto (macro-user-callerid,s,10)
    -- Executing [s@macro-user-callerid:10] GotoIf("DAHDI/1-1", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:11] Set("DAHDI/1-1", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("DAHDI/1-1", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,19)
    -- Executing [s@macro-user-callerid:19] NoOp("DAHDI/1-1", "Using CallerID "NOT_AVAILABLE" <2013264444>") in new stack
    -- Executing [601@ext-group:2] GotoIf("DAHDI/1-1", "1?skipdb") in new stack
    -- Goto (ext-group,601,4)
    -- Executing [601@ext-group:4] Set("DAHDI/1-1", "__NODEST=") in new stack
    -- Executing [601@ext-group:5] Set("DAHDI/1-1", "__BLKVM_OVERRIDE=BLKVM/601/DAHDI/1-1") in new stack
    -- Executing [601@ext-group:6] Set("DAHDI/1-1", "__BLKVM_BASE=601") in new stack
    -- Executing [601@ext-group:7] Set("DAHDI/1-1", "DB(BLKVM/601/DAHDI/1-1)=TRUE") in new stack
    -- Executing [601@ext-group:8] Set("DAHDI/1-1", "RRNODEST=") in new stack
    -- Executing [601@ext-group:9] Set("DAHDI/1-1", "__NODEST=601") in new stack
    -- Executing [601@ext-group:10] Set("DAHDI/1-1", "RecordMethod=Group") in new stack
    -- Executing [601@ext-group:11] Macro("DAHDI/1-1", "record-enable|2101-2111-2200-2300-2210-2310|Group") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("DAHDI/1-1", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] AGI("DAHDI/1-1", "recordingcheck|20100723-164616|1279917975.44") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
    ...
    -- AGI Script recordingcheck completed, returning 0
    -- Executing [s@macro-record-enable:5] MacroExit("DAHDI/1-1", "") in new stack
    -- Executing [601@ext-group:12] Set("DAHDI/1-1", "RingGroupMethod=ringall") in new stack
    -- Executing [601@ext-group:13] Macro("DAHDI/1-1", "dial|40|tr|2101-2111-2200-2300-2210-2310") in new stack
    -- Executing [s@macro-dial:1] GotoIf("DAHDI/1-1", "1?dial") in new stack
    -- Goto (macro-dial,s,3)
    -- Executing [s@macro-dial:3] AGI("DAHDI/1-1", "dialparties.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
    ...
    == Parsing '/etc/asterisk/manager.conf': Found
    == Parsing '/etc/asterisk/manager_additional.conf': Found
    == Parsing '/etc/asterisk/manager_custom.conf': Found
    == Manager 'admin' logged on from 127.0.0.1
    ...
    lots of AGI script output...
    ...
    == Manager 'admin' logged off from 127.0.0.1
    -- AGI Script dialparties.agi completed, returning 0
    -- Executing [s@macro-dial:7] Dial("DAHDI/1-1", "SIP/2101&SIP/2111&SIP/2200&SIP/2300&SIP/2210&SIP/2310|40|trM(auto-blkvm)") in new stack
    -- Called 2101
    -- SIP/2101-00000016 is ringing
    == Spawn extension (macro-dial, s, 7) exited non-zero on 'DAHDI/1-1' in macro 'dial'
    == Spawn extension (ext-group, 601, 13) exited non-zero on 'DAHDI/1-1'
    -- Executing [h@macro-dial:1] Macro("DAHDI/1-1", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("DAHDI/1-1", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,4)
    -- Executing [s@macro-hangupcall:4] GotoIf("DAHDI/1-1", "0?skipblkvm") in new stack
    -- Executing [s@macro-hangupcall:5] NoOp("DAHDI/1-1", "Cleaning Up Block VM Flag: BLKVM/601/DAHDI/1-1") in new stack
    -- Executing [s@macro-hangupcall:6] DBdel("DAHDI/1-1", "BLKVM/601/DAHDI/1-1") in new stack
    -- DBdel: family=BLKVM, key=601/DAHDI/1-1
    -- Executing [s@macro-hangupcall:7] GotoIf("DAHDI/1-1", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] Hangup("DAHDI/1-1", "") in new stack
    == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'DAHDI/1-1' in macro 'hangupcall'
    == Spawn extension (macro-dial, h, 1) exited non-zero on 'DAHDI/1-1'
    -- Hungup 'DAHDI/1-1'


    So I'm not an expert in the CLI output, nor the dialrules (still learning).
    But the part that I'm not understanding is that after:

    -- Executing [s@macro-dial:7] Dial("DAHDI/1-1", "SIP/2101&SIP/2111&SIP/2200&SIP/2300&SIP/2210&SIP/2310|40|trM(auto-blkvm)") in new stack
    -- Called 2101
    -- SIP/2101-00000016 is ringing

    I see it calls the macro to dial the extensions for 40 seconds and it rings for that long, but then when it returns it does:

    == Spawn extension (macro-dial, s, 7) exited non-zero on 'DAHDI/1-1' in macro 'dial'
    == Spawn extension (ext-group, 601, 13) exited non-zero on 'DAHDI/1-1'
    -- Executing [h@macro-dial:1] Macro("DAHDI/1-1", "hangupcall") in new stack

    which tells it to hang up. So in the dial plan, it looks like the line:

    exten => 601,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)

    is telling it to jump to the "nodest" line which says to hang up instead of falling through and go to the IVR. This is generic elastix/freepbx code so I didn't want to muck with it and break anything. I'm not sure what RRNODEST is or means.
     
  2. galaxy

    Joined:
    Jun 22, 2010
    Messages:
    42
    Likes Received:
    0
    Can anyone suggest how I can debug this? As you can see I've done some CLI debugging, but is not showing me anything useful.

    It appears to either be something with the variable RRNODEST, or that the dial macro has an error and it aborts. I'm not sure which of these is causing the hang up (or if an error in the dial macro would even cause an abort and hang up). Any help would be appreciated...
     
  3. galaxy

    Joined:
    Jun 22, 2010
    Messages:
    42
    Likes Received:
    0
    Re:Ring Group timeout problem (solved)

    OK, found the problem which I cannot explain...
    I had the 4 DAHDI trunks connected to the central office through splitters to the old phone system. The idea was to make a smooth transition. The old system was configured to not pick up the phone unless one of the old handsets picked it up (no IVR/voicemail).

    Well, needless to say, powering off the old system did it.
     

Share This Page