2.4.0beta1.0 Deviceand user problems

When using deviceanduser mode I have setup 4 extensions, and 3 devices. One device is adhoc, which has a default extension. The other 2 devices are fixed. If I login to adhoc phone with extension say 10, and the fixed phones dial 10 all works fine. If I logoff that adhoc phone, the default extension say 20 works fine, but if I try to dial 10 I get declined, and no voicemail !!

The main reason I was trying this out was mainly for the new hint changes that have been made, but I can’t seem to subscribe my snom’s to any user that is a roaming adhoc user. If I subscribe a function key to extension say 10 which is an adhoc user, but they get no BLF’s, no matter whether I subscribe the function key to the extension number or the device sip number. I really would like to have BLF’s for adhoc users. Anyone have ideas on this one ?

Can you try re-articulating yourself clearly and step by step - I’m not following your issue. If you create a user with voicemail enabled for that user, then calls should go to their voicemail if they are not logged in (which has always been the case with devicesandusers). If they are logged in, it should try ringing them. As far as the hints (where a lot of the work was done), if the user is logged in you should see a hint form them. It will be a hint with the user’s number (not the device). I you type show hints at the CLI, you should see their hint there. Note - all the work I did on this was on Asterisk 1.2, so if there are 1.4 issues, I may not be aware of them and there may need to be some work. (Since I am using the manager to create extensions. So let me know what version of Asterisk you are using.

Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

Sorry I try to explain as best as possible. Using Asterisk 1.4.13.

And yes the hints do change as you say in the CLI. The problem is how do I subscribe a phone BLF to the hint ? And also the fact that when I make a call as the adhoc user there is nothing coming up in the CLI to say that the state of the user is changing such as when the call is active or when the phone is ringing.

begapabxCLI> show hints
begapabx
CLI>
-= Registered Asterisk Dial Plan Hints =-
[email protected] : SIP/4000 State:Idle Watchers 0
[email protected] : SIP/435 State:Idle Watchers 1
[email protected] : SIP/424 State:Idle Watchers 2

401 above is the default user I assigned to device 4000.

begapabxCLI> show hints
begapabx
CLI>
-= Registered Asterisk Dial Plan Hints =-
[email protected] : SIP/4000 State:Idle Watchers 0
[email protected] : SIP/435 State:Idle Watchers 1
[email protected] : SIP/424 State:Idle Watchers 2

As you can see above when I log in as the adhoc user 425 the hint is changed. And of course due to the other devices not subscribing to the hint yet, I reboot 435, then get the following.

3 hints registered
– Unregistered SIP '435’
Extension Changed 435 new state Unavailable for Notify User 4000
– Registered SIP ‘435’ at 192.168.3.27 port 1037 expires 3600
– Saved useragent “snom370/7.1.30” for peer 435
Extension Changed 435 new state Idle for Notify User 4000
begapabxCLI> show hints
begapabx
CLI>
-= Registered Asterisk Dial Plan Hints =-
[email protected] : SIP/4000 State:Idle Watchers 1
[email protected] : SIP/435 State:Idle Watchers 1
[email protected] : SIP/424 State:Idle Watchers 2

  • 3 hints registered

Now on the adhoc phone 4000 i dial 424, and this is the only change in state that occurs.

AGI Tx >> 200 result=0
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:5] Dial(“SIP/4000-b7600468”, “SIP/424|15|trw”) in new stack
– Called 424
Extension Changed 424 new state Ringing for Notify User 435
Extension Changed 424 new state Ringing for Notify User 4000
– SIP/424-08507678 is ringing
– SIP/424-08507678 is ringing
– SIP/424-08507678 is ringing
– SIP/424-08507678 is ringing
Extension Changed 424 new state InUse for Notify User 435
Extension Changed 424 new state InUse for Notify User 4000

435 is the device that is subscribed to extension 425 on one of it’s function keys, but as asterisk sends no change in states the LED’s don’t work ?

In regards to the Voicemail issue this is the AGI debug output when I logoff device 4000 and it sets it back to 401 being the default user for that extension.

AGI Tx >> 200 result=1
AGI Rx << VERBOSE "Setting user 425 to devices " 5
user_login_out.agi|logout|4000: Setting user 425 to devices
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "set_user_devices: user: 425, devices: " 8
user_login_out.agi|logout|4000: set_user_devices: user: 425, devices:
AGI Tx >> 200 result=1
AGI Rx << DATABASE DEL “AMPUSER” "425/device"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "set_hint: user: 425, devices: " 8
user_login_out.agi|logout|4000: set_hint: user: 425, devices:
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “Removing hint for user 425” 5
user_login_out.agi|logout|4000: Removing hint for user 425
AGI Tx >> 200 result=1
== Extension state: Watcher for hint 425 deactivated. Notify User 435
Extension Changed 425 new state Unknown for Notify User 435
AGI Rx << VERBOSE “Logging in default user 401 to device 4000” 5
user_login_out.agi|logout|4000: Logging in default user 401 to device 4000
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “insert_user: user: 401, device: 4000” 8
user_login_out.agi|logout|4000: insert_user: user: 401, device: 4000
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “set_device_user: device: 4000, user: 401” 8
user_login_out.agi|logout|4000: set_device_user: device: 4000, user: 401
AGI Tx >> 200 result=1
AGI Rx << DATABASE PUT “DEVICE” “4000/user” "401"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “get_devices: user: 401” 8
user_login_out.agi|logout|4000: get_devices: user: 401
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “AMPUSER” "401/device"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “insert_device: devices: , new_device: 4000” 8
user_login_out.agi|logout|4000: insert_device: devices: , new_device: 4000
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “Setting user 401 to devices &4000” 5
user_login_out.agi|logout|4000: Setting user 401 to devices &4000
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “set_user_devices: user: 401, devices: &4000” 8
user_login_out.agi|logout|4000: set_user_devices: user: 401, devices: &4000
AGI Tx >> 200 result=1
AGI Rx << DATABASE PUT “AMPUSER” “401/device” "&4000"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “set_hint: user: 401, devices: &4000” 8
user_login_out.agi|logout|4000: set_hint: user: 401, devices: &4000
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “get_dial_string: devices: &4000” 8
user_login_out.agi|logout|4000: get_dial_string: devices: &4000
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “DEVICE” "/dial"
AGI Tx >> 200 result=0
AGI Rx << DATABASE GET “DEVICE” "4000/dial"
AGI Tx >> 200 result=1 (SIP/4000)
AGI Rx << VERBOSE “Setting user 401 hint to SIP/4000” 5
user_login_out.agi|logout|4000: Setting user 401 hint to SIP/4000
AGI Tx >> 200 result=1
– Added extension ‘401’ priority -1 to ext-local
AGI Rx << VERBOSE “get_voicemail_context: user: 401” 8
user_login_out.agi|logout|4000: get_voicemail_context: user: 401
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “AMPUSER” "401/voicemail"
AGI Tx >> 200 result=1 (novm)

Now from 424 I try to ring 425 I get the following.

AGI Rx << VERBOSE “Caller ID name is ‘Robert Bateman’ number is ‘424’” 1
dialparties.agi: Caller ID name is ‘Robert Bateman’ number is '424’
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE __KEEPCID "TRUE"
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE DIALSTATUS_CW ""
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE ARG1
AGI Tx >> 200 result=1 (15)
AGI Rx << GET VARIABLE ARG2
AGI Tx >> 200 result=1 (trw)
AGI Rx << GET VARIABLE RingGroupMethod
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE ALERT_INFO
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE SIPADDHEADER
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE PR_DIALSTATUS
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE FMGRP
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE NODEST
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE RINGGROUP_INDEX
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE USE_CONFIRMATION
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “USE_CONFIRMATION: ‘FALSE’” 5
dialparties.agi: USE_CONFIRMATION: 'FALSE’
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “RINGGROUP_INDEX: ‘’” 5
dialparties.agi: RINGGROUP_INDEX: ''
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “Methodology of ring is ‘none’” 1
dialparties.agi: Methodology of ring is 'none’
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE ARG3
AGI Tx >> 200 result=1 (425)
AGI Rx << VERBOSE “Added extension 425 to extension map” 3
– dialparties.agi: Added extension 425 to extension map
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE ARG4
AGI Tx >> 200 result=0
AGI Rx << DATABASE GET “CF” "425"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “Extension 425 cf is disabled” 3
– dialparties.agi: Extension 425 cf is disabled
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “DND” "425"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “Extension 425 do not disturb is disabled” 3
– dialparties.agi: Extension 425 do not disturb is disabled
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “CW” "425"
AGI Tx >> 200 result=1 (ENABLED)
AGI Rx << DATABASE GET “CFB” "425"
AGI Tx >> 200 result=0
AGI Rx << DATABASE GET “CFU” "425"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “extnum 425 has: cw: 1; hascfb: 0 [] hascfu: 0 []” 4
> dialparties.agi: extnum 425 has: cw: 1; hascfb: 0 [] hascfu: 0 []
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “ExtensionState: -1” 4
> dialparties.agi: ExtensionState: -1
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “AMPUSER” "425/device"
AGI Tx >> 200 result=0
AGI Rx << DATABASE GET “DEVICE” "/dial"
AGI Tx >> 200 result=0
AGI Rx << DATABASE PUT “CALLTRACE” “425” "424"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “dbset CALLTRACE/425 to 424” 3
– dialparties.agi: dbset CALLTRACE/425 to 424
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE FILTERED_DIAL "425"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “Filtered ARG3: 425” 3
– dialparties.agi: Filtered ARG3: 425
AGI Tx >> 200 result=1
AGI Rx << NOOP
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “Setting default NOANSWER DIALSTATUS since no extensions available” 1
dialparties.agi: Setting default NOANSWER DIALSTATUS since no extensions available
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE DIALSTATUS "NOANSWER"
AGI Tx >> 200 result=1
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:4] NoOp(“SIP/424-b7600468”, “Returned from dialparties with no extensions to call and DIALSTATUS: NOANSWER”) in new stack
– Executing [[email protected]:5] Dial(“SIP/424-b7600468”, “”) in new stack
== Spawn extension (macro-dial, s, 5) exited non-zero on ‘SIP/424-b7600468’ in macro ‘dial’
== Spawn extension (macro-dial, s, 5) exited non-zero on ‘SIP/424-b7600468’ in macro ‘exten-vm’
== Spawn extension (macro-dial, s, 5) exited non-zero on ‘SIP/424-b7600468’
– Executing [[email protected]:1] Macro(“SIP/424-b7600468”, “hangupcall”) in new stack
– Executing [[email protected]:1] ResetCDR(“SIP/424-b7600468”, “w”) in new stack
– Executing [[email protected]:2] NoCDR(“SIP/424-b7600468”, “”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/424-b7600468”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [[email protected]:6] GotoIf(“SIP/424-b7600468”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/424-b7600468”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [[email protected]:11] Hangup(“SIP/424-b7600468”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/424-b7600468’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/424-b7600468’
begapabx*CLI>

BTW … while 425 was still logged on I did verify that the call from 424 did go to VM after the usual ring time.

I hope I’m making sense for both issues at hand . And thanks again for your great work !

OK a bit more work, and it seems I have the BLF, and hint states working now. Sorry for a possible premature error there.

I still get " Delined " when I logout of 425 as the adhoc user, and then try ringing that extension while logged out … and no voicemail.