Asterisk 10.4.0 GotoIf to label problem when DUNDi active
Tags: group count, label today, priority number, satellite office
I have a hotdesking environment at my main office, and up until today, the GotoIf that jumps straight to voicemail if a user isn’t log in was working just fine by label. Today, I deployed DUNDi to a satellite office, and now the GotoIf isn’t jumping to the right place. If I replace the label with a priority number, it jumps correctly. Alternatively, if I disable the switch statement for DUNDi, it jumps correctly. But with the DUNDi switch in service and the named label to jump to, it gives me this error:
[May 30 13:57:24] WARNING[6654]: pbx.c:10747 pbx_parseable_goto: Priority ‘not_logged_in’ must be a number > 0, or valid label
Dialplan snippets as follows:
[hotdesk] ;phones dial here
include => hotdesk_outbound
[hotdesk_outbound]
exten => _X.,1,NoOp()
same => n,Set(LOCATION=${CUT(CHANNEL,/,2)})
same => n,Set(LOCATION=${CUT(LOCATION,-,1)})
same => n,Set(WHO=${HOTDESK_PHONE_STATUS(${LOCATION})})
same => n,GotoIf($[${ISNULL(${WHO})}]?internal,${EXTEN},1)
same => n,Set(${WHO}_CID_NAME=${HOTDESK_INFO(cid_name,${WHO})})
same => n,Set(${WHO}_CID_NUMBER=${HOTDESK_INFO(cid_number,${WHO})})
same => n,Set(${WHO}_CONTEXT=${HOTDESK_INFO(defaultcontext,${WHO})})
same => n,Set(${WHO}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${WHO})})
same => n,Set(GROUP(activecallers)=${WHO})
same => n,NoOp(Who: ${WHO} Calls: ${GROUP_COUNT(${WHO}@activecallers)})
same => n,Set(DEVICE_STATE(Custom:${WHO})=INUSE)
same => n,Set(CALLERID(name)=${${WHO}_CID_NAME})
same => n,Set(CALLERID(num)=${${WHO}_CID_NUMBER})
same => n,Goto(${${WHO}_CONTEXT},${EXTEN},1)
[outbound-context]
include => internal-privledged
[internal-privledged]
include => internal
switch => DUNDi/peer
[internal]
exten => _3XX,1,NoOp()
same => n,Set(E=${EXTEN})
same => n,Set(${E}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${E})})
same => n,Set(USER_LOCATION=${HOTDESK_USER_STATUS(${E})})
same => n,GotoIf($[${ODBCROWS} < 1]?not_logged_in)
same => n,Dial(SIP/${USER_LOCATION},20,wWU(answered^${E}))
same => n,ExecIf(${ISNULL(${E})}?NoOp(${HOTDESK_INFO(location,${E})}):ExecIf($[${GROUP_COUNT(${E}@activecalls)}>1]?Set(DEVICE_STATE(Custom:${E})=INUSE):Set(DEVICE_STATE(Custom:${E})=NOT_INUSE)))
same => n,Set(GROUP(activecalls)=${NULL})
same => n,Voicemail(${E}@${${E}_VMCONTEXT},b)
same => n,Hangup()
same => n(not_logged_in),Set(LOGGED_OFF=1)
same => n,Voicemail(${E}@${${E}_VMCONTEXT},u)
same => n,Hangup()
Any suggestions on other things to try? Or is this a bug I should file?
Thank you,
Noah Engelberth
MetaLINK Technologies
SamyGo said:
May 31, 12 at 1:35 amHi,
You might have already tried but can you try reducing the label name and
exclude the underscore in it !
Regards,
Sammy
On Wed, May 30, 2012 at 11:02 PM, Noah Engelberth <
Noah@directlinkcomputers.com> wrote:
Noah Engelberth said:
May 31, 12 at 8:15 amYes, I tried several different combinations of possible labels, some with and some without underscores.
Sent: Thursday, May 31, 2012 1:36 AM
Hi,
You might have already tried but can you try reducing the label name and exclude the underscore in it !
Regards,
Sammy
I have a hotdesking environment at my main office, and up until today, the GotoIf that jumps straight to voicemail if a user isn’t log in was working just fine by label. Today, I deployed DUNDi to a satellite office, and now the GotoIf isn’t jumping to the right place. If I replace the label with a priority number, it jumps correctly. Alternatively, if I disable the switch statement for DUNDi, it jumps correctly. But with the DUNDi switch in service and the named label to jump to, it gives me this error:
[May 30 13:57:24] WARNING[6654]: pbx.c:10747 pbx_parseable_goto: Priority ‘not_logged_in’ must be a number > 0, or valid label
Dialplan snippets as follows:
[hotdesk] ;phones dial here
include => hotdesk_outbound
[hotdesk_outbound]
exten => _X.,1,NoOp()
same => n,Set(LOCATION=${CUT(CHANNEL,/,2)})
same => n,Set(LOCATION=${CUT(LOCATION,-,1)})
same => n,Set(WHO=${HOTDESK_PHONE_STATUS(${LOCATION})})
same => n,GotoIf($[${ISNULL(${WHO})}]?internal,${EXTEN},1)
same => n,Set(${WHO}_CID_NAME=${HOTDESK_INFO(cid_name,${WHO})})
same => n,Set(${WHO}_CID_NUMBER=${HOTDESK_INFO(cid_number,${WHO})})
same => n,Set(${WHO}_CONTEXT=${HOTDESK_INFO(defaultcontext,${WHO})})
same => n,Set(${WHO}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${WHO})})
same => n,Set(GROUP(activecallers)=${WHO})
same => n,NoOp(Who: ${WHO} Calls: ${GROUP_COUNT(${WHO}@activecallers)})
same => n,Set(DEVICE_STATE(Custom:${WHO})=INUSE)
same => n,Set(CALLERID(name)=${${WHO}_CID_NAME})
same => n,Set(CALLERID(num)=${${WHO}_CID_NUMBER})
same => n,Goto(${${WHO}_CONTEXT},${EXTEN},1)
[outbound-context]
include => internal-privledged
[internal-privledged]
include => internal
switch => DUNDi/peer
[internal]
exten => _3XX,1,NoOp()
same => n,Set(E=${EXTEN})
same => n,Set(${E}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${E})})
same => n,Set(USER_LOCATION=${HOTDESK_USER_STATUS(${E})})
same => n,GotoIf($[${ODBCROWS} < 1]?not_logged_in)
same => n,Dial(SIP/${USER_LOCATION},20,wWU(answered^${E}))
same => n,ExecIf(${ISNULL(${E})}?NoOp(${HOTDESK_INFO(location,${E})}):ExecIf($[${GROUP_COUNT(${E}@activecalls)}>1]?Set(DEVICE_STATE(Custom:${E})=INUSE):Set(DEVICE_STATE(Custom:${E})=NOT_INUSE)))
same => n,Set(GROUP(activecalls)=${NULL})
same => n,Voicemail(${E}@${${E}_VMCONTEXT},b)
same => n,Hangup()
same => n(not_logged_in),Set(LOGGED_OFF=1)
same => n,Voicemail(${E}@${${E}_VMCONTEXT},u)
same => n,Hangup()
Any suggestions on other things to try? Or is this a bug I should file?
Thank you,
Noah Engelberth
MetaLINK Technologies
Chad Wallace said:
Jun 01, 12 at 6:41 pmOn Wed, 30 May 2012 18:02:00 +0000 wrote:
Noah Engelberth
What do you get when you run “dialplan show internal” on the Asterisk
CLI? Does it show the not_logged_in label?
Have you looked at the CLI output when you reload? There may be a
syntax error before your not_logged_in line…
Also, along the same vein, you might try moving the
[internal-privledged] context (with the switch/DUNDi line) to below the
[internal] one.
Noah Engelberth said:
Jun 01, 12 at 7:01 pm- No syntax errors or warnings showing in the CLI when I reload with verbosity at 3.
Noah