No Voicemail when users not logged in ( DeviceandUser )

I have Asterisk 1.4.7.1 with latest up to date Beta. Trying out DeviceandUser mode, and all seems fine although when I try to ring a user that is not logged in I get no Voicemail ?

dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 390 to extension map
– dialparties.agi: Extension 390 cf is disabled
– dialparties.agi: Extension 390 do not disturb is disabled
> dialparties.agi: extnum: 390
> dialparties.agi: exthascw: 0
> dialparties.agi: exthascfb: 0
> dialparties.agi: extcfb:
> dialparties.agi: exthascfu: 0
> dialparties.agi: extcfu:
> dialparties.agi: ExtensionState: -1
dialparties.agi: Extension 390 has ExtensionState: -1
– dialparties.agi: Checking CW and CFB status for extension 390
– dialparties.agi: dbset CALLTRACE/390 to 504
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:2] NoOp(“IAX2/tombl-1”, “Returned from dialparties with no extensions to call”) in new stack
– Executing [[email protected]:3] NoOp(“IAX2/tombl-1”, "DIALSTATUS is ") in new stack
– Executing [[email protected]:10] Set(“IAX2/tombl-1”, “SV_DIALSTATUS=”) in new stack
– Executing [[email protected]:11] GosubIf(“IAX2/tombl-1”, “0?docfu|1”) in new stack
– Executing [[email protected]:12] GosubIf(“IAX2/tombl-1”, “0?docfb|1”) in new stack
– Executing [[email protected]:13] Set(“IAX2/tombl-1”, “DIALSTATUS=”) in new stack
– Executing [[email protected]:14] NoOp(“IAX2/tombl-1”, “Voicemail is 390”) in new stack
– Executing [[email protected]:15] GotoIf(“IAX2/tombl-1”, “0?s-|1”) in new stack
– Executing [[email protected]:16] NoOp(“IAX2/tombl-1”, “Sending to Voicemail box 390”) in new stack
– Executing [[email protected]:17] Macro(“IAX2/tombl-1”, “vm|390|”) in new stack
– Executing [[email protected]:1] Macro(“IAX2/tombl-1”, “user-callerid|SKIPTTL”) in new stack
– Executing [[email protected]:1] NoOp(“IAX2/tombl-1”, “user-callerid: Nicole 504 504”) in new stack
– Executing [[email protected]:2] Set(“IAX2/tombl-1”, “AMPUSER=504”) in new stack
– Executing [[email protected]:3] GotoIf(“IAX2/tombl-1”, “0?report”) in new stack
– Executing [[email protected]:4] GotoIf(“IAX2/tombl-1”, “1?start”) in new stack
– Goto (macro-user-callerid,s,6)
– Executing [[email protected]:6] NoOp(“IAX2/tombl-1”, “REALCALLERIDNUM is 504”) in new stack
– Executing [[email protected]:7] Set(“IAX2/tombl-1”, “AMPUSER=”) in new stack
– Executing [[email protected]:8] Set(“IAX2/tombl-1”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:9] GotoIf(“IAX2/tombl-1”, “1?report”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing [[email protected]:13] NoOp(“IAX2/tombl-1”, “TTL: 64 ARG1: SKIPTTL”) in new stack
– Executing [[email protected]:14] GotoIf(“IAX2/tombl-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [[email protected]:23] NoOp(“IAX2/tombl-1”, “Using CallerID “Nicole 504” <504>”) in new stack
– Executing [[email protected]:2] Set(“IAX2/tombl-1”, “VMGAIN=”) in new stack
– Executing [[email protected]:3] GotoIf(“IAX2/tombl-1”, “1?vmx|1”) in new stack
– Goto (macro-vm,vmx,1)
– Executing [[email protected]:1] Set(“IAX2/tombl-1”, “MODE=unavail”) in new stack
– Executing [[email protected]:2] GotoIf(“IAX2/tombl-1”, “1?notdirect”) in new stack
– Goto (macro-vm,vmx,4)
– Executing [[email protected]:4] NoOp(“IAX2/tombl-1”, "Checking if ext 390 is enabled: ") in new stack
– Executing [[email protected]:5] GotoIf(“IAX2/tombl-1”, “1?s-|1”) in new stack
– Goto (macro-vm,s-,1)

Wen the user is logged, it rings fine.

Any ideas … I would really like to use FreePBX in this mode as we have staff who change offices all of the time.

can you turn on agi debug at the cli and re-run the test, it looks like something may be going on strange in dialparties.agi

AGI Rx << VERBOSE “Added extension 390 to extension map” 3
– dialparties.agi: Added extension 390 to extension map
AGI Tx >> 200 result=1

AGI Rx << GET VARIABLE ARG4
AGI Tx >> 200 result=0

AGI Rx << DATABASE GET “CF” "390"
AGI Tx >> 200 result=0

AGI Rx << VERBOSE “Extension 390 cf is disabled” 3
– dialparties.agi: Extension 390 cf is disabled
AGI Tx >> 200 result=1

AGI Rx << DATABASE GET “DND” "390"
AGI Tx >> 200 result=0

AGI Rx << VERBOSE “Extension 390 do not disturb is disabled” 3
– dialparties.agi: Extension 390 do not disturb is disabled
AGI Tx >> 200 result=1

AGI Rx << DATABASE GET “CW” "390"
AGI Tx >> 200 result=0

AGI Rx << DATABASE GET “CFB” "390"
AGI Tx >> 200 result=0

AGI Rx << DATABASE GET “CFU” "390"
AGI Tx >> 200 result=0

AGI Rx << VERBOSE “extnum: 390” 4
> dialparties.agi: extnum: 390
AGI Tx >> 200 result=1

AGI Rx << VERBOSE “exthascw: 0” 4
> dialparties.agi: exthascw: 0
AGI Tx >> 200 result=1

AGI Rx << VERBOSE “exthascfb: 0” 4
> dialparties.agi: exthascfb: 0
AGI Tx >> 200 result=1

AGI Rx << VERBOSE "extcfb: " 4
> dialparties.agi: extcfb:
AGI Tx >> 200 result=1

AGI Rx << VERBOSE “exthascfu: 0” 4
> dialparties.agi: exthascfu: 0
AGI Tx >> 200 result=1

AGI Rx << VERBOSE "extcfu: " 4
> dialparties.agi: extcfu:
AGI Tx >> 200 result=1

AGI Rx << VERBOSE “ExtensionState: 0” 4
> dialparties.agi: ExtensionState: 0
AGI Tx >> 200 result=1

AGI Rx << VERBOSE “Extension 390 has ExtensionState: 0” 1
dialparties.agi: Extension 390 has ExtensionState: 0
AGI Tx >> 200 result=1

AGI Rx << VERBOSE “Checking CW and CFB status for extension 390” 3
– dialparties.agi: Checking CW and CFB status for extension 390
AGI Tx >> 200 result=1

AGI Rx << DATABASE GET “AMPUSER” "390/device"
AGI Tx >> 200 result=1 ()

AGI Rx << DATABASE GET “DEVICE” "/dial"
AGI Tx >> 200 result=0

AGI Rx << DATABASE PUT “CALLTRACE” “390” "505"
AGI Tx >> 200 result=1

AGI Rx << VERBOSE “dbset CALLTRACE/390 to 505” 3
– dialparties.agi: dbset CALLTRACE/390 to 505
AGI Tx >> 200 result=1

AGI Rx << NOOP
AGI Tx >> 200 result=0

== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:2] NoOp(“IAX2/tombl-2”, “Returned from dialparties with no extensions to call”) in new stack
– Executing [[email protected]:3] NoOp(“IAX2/tombl-2”, "DIALSTATUS is ") in new stack
– Executing [[email protected]:10] Set(“IAX2/tombl-2”, “SV_DIALSTATUS=”) in new stack
– Executing [[email protected]:11] GosubIf(“IAX2/tombl-2”, “0?docfu|1”) in new stack
– Executing [[email protected]:12] GosubIf(“IAX2/tombl-2”, “0?docfb|1”) in new stack
– Executing [[email protected]:13] Set(“IAX2/tombl-2”, “DIALSTATUS=”) in new stack
– Executing [[email protected]:14] NoOp(“IAX2/tombl-2”, “Voicemail is 390”) in new stack
– Executing [[email protected]:15] GotoIf(“IAX2/tombl-2”, “0?s-|1”) in new stack
– Executing [[email protected]:16] NoOp(“IAX2/tombl-2”, “Sending to Voicemail box 390”) in new stack
– Executing [[email protected]:17] Macro(“IAX2/tombl-2”, “vm|390|”) in new stack
– Executing [[email protected]:1] Macro(“IAX2/tombl-2”, “user-callerid|SKIPTTL”) in new stack
– Executing [[email protected]:1] NoOp(“IAX2/tombl-2”, “user-callerid: Catherine 505 505”) in new stack
– Executing [[email protected]:2] Set(“IAX2/tombl-2”, “AMPUSER=505”) in new stack
– Executing [[email protected]:3] GotoIf(“IAX2/tombl-2”, “0?report”) in new stack
– Executing [[email protected]:4] GotoIf(“IAX2/tombl-2”, “1?start”) in new stack
– Goto (macro-user-callerid,s,6)
– Executing [[email protected]:6] NoOp(“IAX2/tombl-2”, “REALCALLERIDNUM is 505”) in new stack
– Executing [[email protected]:7] Set(“IAX2/tombl-2”, “AMPUSER=”) in new stack
– Executing [[email protected]:8] Set(“IAX2/tombl-2”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:9] GotoIf(“IAX2/tombl-2”, “1?report”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing [[email protected]:13] NoOp(“IAX2/tombl-2”, “TTL: 64 ARG1: SKIPTTL”) in new stack
– Executing [[email protected]:14] GotoIf(“IAX2/tombl-2”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [[email protected]:23] NoOp(“IAX2/tombl-2”, “Using CallerID “Catherine 505” <505>”) in new stack
– Executing [[email protected]:2] Set(“IAX2/tombl-2”, “VMGAIN=”) in new stack
– Executing [[email protected]:3] GotoIf(“IAX2/tombl-2”, “1?vmx|1”) in new stack
– Goto (macro-vm,vmx,1)
– Executing [[email protected]:1] Set(“IAX2/tombl-2”, “MODE=unavail”) in new stack
– Executing [[email protected]:2] GotoIf(“IAX2/tombl-2”, “1?notdirect”) in new stack
– Goto (macro-vm,vmx,4)
– Executing [[email protected]:4] NoOp(“IAX2/tombl-2”, "Checking if ext 390 is enabled: ") in new stack
– Executing [[email protected]:5] GotoIf(“IAX2/tombl-2”, “1?s-|1”) in new stack

I created fake devices for the users that were having problems, and defined those devices as being adhoc, and then make the default user for that device the one that wouldn’t go to voicemail. While those users are offline and not logged in at all, the system now directs the call straight to voicemail. If I logon at a specific adhoc phone their calls work to that device also.

BUT !!! If a call goes to the original user who is normally the default one on that device while someone else is logged in I’m back to where I started. Call is declined, and no Voicemail and hangs up.

I really need to have this roaming user things sorted quickly. Any help is appreciated.

Running * 1.4.7.1, and FreePBX 2.3.0beta1

If I create a fake device for every user that I want to be a roaming user, and on that fake device set the user extension to be the default one, while they are not logged in it will take them to voicemail. If any of them are actually logged onto a real device calls then go to them as per normal.

MWI is busted though while they are logged in at the real devices. Snom 320’s ???

Figured out that by creating the fake extensions, the hints for those users get applied to those devices, hence the MWI, and the BLF for ringing phones.

Well it works OK like this, but it’s obviously not right. Need to be able to delete all of these fake devices to fix the lights issue, but will have to make sure that the issue of users who are not logged on, getting calls bumped to nowhere.

brettm,

can you make a copy of your dialparties.agi and try applying the following patch to see if it fixes your problem. It makes sure the dialstatus is set to something if there are no extensions to dial. If this works, then we need to look closer as to why it is not being set as this is kind of a hack at the end to catch any issues. You should set your verbosity to 5 so you can see the debug message to make sure it is doing something.

[code:1]Index: dialparties.agi

— dialparties.agi (revision 4378)
+++ dialparties.agi (working copy)
@@ -637,6 +637,16 @@
}
}

+// sanity check make sure dialstatus is set to something
+//
+if (! $ds) {

  •   $dialstatus  = get_var( $AGI, "DIALSTATUS" );
    
  •   if (! $dialstatus) {
    
  •           debug("Setting default NOANSWER DIALSTATUS since no extensions available",3);
    
  •           $AGI->set_variable('DIALSTATUS','NOANSWER');
    
  •   }
    

+}
+
$astman->disconnect();

// EOF dialparties.agi
[/code:1]

Thanks that works fine. I have deleted a couple of the fake devices I set up, and have left the real ones having no default user, and the roaming users now go straight to Voicemail while not logged in.

ok - well I accidentally checked that fix into the core module so I guess I will leave it there until we can determine why it wasn’t getting set. Then next module update will have the fix which should be out in the next couple of days.