Is there any way to bypass voicemailmain authentication?

Hello Everyone,

I would like to know if there’s a way to bypass voicemailmain authentication? I’ve created a dialplan that would allow a specific user to access only its voicemail without authentication.

Thanks.

Regards,

Jessie Kid Fernando

The ‘s’ option can be used to disable passcode checking. Full options and arguments are documented with the application[1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_VoiceMailMain

1 Like

Hello Jcolp,

Here’s my dialplan. However every time I call my extension, it still ask for a password.

exten => _85991XXXXX,1,NoOp(${CHANNEL()})
same => n,NoOp(Channel variable is: ${CHANNEL:6:7})
same => n,Set(var1=${CHANNEL:6:7})
same => n,NoOp(var1 = ${var1})
same => n,Set(result=${SHELL(/bin/bash /var/lib/asterisk/agi-bin/test.sh ${CHANNEL:6:7})})
same => n,NoOp(Result is ${result})
same => n,NoOp(Exten variable is ${EXTEN:4})
same => n,Gotoif($[${result}=${EXTEN:4}]?VM:X)
same => n(VM),VoicemailMain(${result}@default,s)
same => n,Goto(s,6)
same => n(X),Hangup()

Did you reload the dialplan? Did you check what is actually being executed for dialplan in the console?

Hello Jcolp,

Yes, dialplan has been reloaded. See console logs.

    -- Called 8600051@default
    -- Executing [8600051@default:1] MeetMe("Local/8600051@default-00000006;2", "8600051,F") in new stack
    -- Local/8600051@default-00000006;1 answered
[Jul 16 08:36:08] WARNING[20609][C-00000010]: func_channel.c:460 func_channel_read: Unknown or unavailable item requested: ''
    -- Executing [8599101118@default:1] NoOp("Local/8600051@default-00000006;1", "") in new stack
    -- Executing [8599101118@default:2] NoOp("Local/8600051@default-00000006;1", "Channel variable is: 8600051") in new stack
    -- Executing [8599101118@default:3] Set("Local/8600051@default-00000006;1", "var1=8600051") in new stack
    -- Executing [8599101118@default:4] NoOp("Local/8600051@default-00000006;1", "var1 = 8600051") in new stack
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
    -- Executing [8599101118@default:5] Set("Local/8600051@default-00000006;1", "result=101118
    -- ") in new stack
    -- Executing [8599101118@default:6] NoOp("Local/8600051@default-00000006;1", "Result is 101118
    -- ") in new stack
    -- Executing [8599101118@default:7] NoOp("Local/8600051@default-00000006;1", "Exten variable is 101118") in new stack
    -- Executing [8599101118@default:8] GotoIf("Local/8600051@default-00000006;1", "1?VM:X") in new stack
    -- Goto (default,8599101118,9)
    -- Executing [8599101118@default:9] VoiceMailMain("Local/8600051@default-00000006;1", "101118
    -- @default,s") in new stack
  == Manager 'sendcron' logged off from 127.0.0.1
    -- <Local/8600051@default-00000006;1> Playing 'vm-login.slin' (language 'en')
[Jul 16 08:36:11] DTMF[20445][C-0000000c]: channel.c:4038 __ast_read: DTMF end '1' received on SIP/101118-00000006, duration 100 ms
[Jul 16 08:36:11] DTMF[20445][C-0000000c]: channel.c:4065 __ast_read: DTMF begin emulation of '1' with duration 100 queued on SIP/101118-00000006
[Jul 16 08:36:11] DTMF[20609][C-00000010]: channel.c:4124 __ast_read: DTMF begin '1' received on Local/8600051@default-00000006;1
[Jul 16 08:36:11] DTMF[20609][C-00000010]: channel.c:4128 __ast_read: DTMF begin ignored '1' on Local/8600051@default-00000006;1
[Jul 16 08:36:12] DTMF[20445][C-0000000c]: channel.c:4158 __ast_read: DTMF end emulation of '1' queued on SIP/101118-00000006
[Jul 16 08:36:12] DTMF[20609][C-00000010]: channel.c:4038 __ast_read: DTMF end '1' received on Local/8600051@default-00000006;1, duration 520 ms
[Jul 16 08:36:12] DTMF[20609][C-00000010]: channel.c:4108 __ast_read: DTMF end passthrough '1' on Local/8600051@default-00000006;1
[Jul 16 08:36:12] DTMF[20445][C-0000000c]: channel.c:4038 __ast_read: DTMF end '0' received on SIP/101118-00000006, duration 100 ms
[Jul 16 08:36:12] DTMF[20445][C-0000000c]: channel.c:4065 __ast_read: DTMF begin emulation of '0' with duration 100 queued on SIP/101118-00000006
[Jul 16 08:36:12] DTMF[20609][C-00000010]: channel.c:4124 __ast_read: DTMF begin '0' received on Local/8600051@default-00000006;1
[Jul 16 08:36:12] DTMF[20609][C-00000010]: channel.c:4128 __ast_read: DTMF begin ignored '0' on Local/8600051@default-00000006;1
[Jul 16 08:36:13] DTMF[20445][C-0000000c]: channel.c:4158 __ast_read: DTMF end emulation of '0' queued on SIP/101118-00000006
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4038 __ast_read: DTMF end '0' received on Local/8600051@default-00000006;1, duration 624 ms
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4108 __ast_read: DTMF end passthrough '0' on Local/8600051@default-00000006;1
[Jul 16 08:36:13] DTMF[20445][C-0000000c]: channel.c:4038 __ast_read: DTMF end '1' received on SIP/101118-00000006, duration 100 ms
[Jul 16 08:36:13] DTMF[20445][C-0000000c]: channel.c:4065 __ast_read: DTMF begin emulation of '1' with duration 100 queued on SIP/101118-00000006
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4124 __ast_read: DTMF begin '1' received on Local/8600051@default-00000006;1
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4128 __ast_read: DTMF begin ignored '1' on Local/8600051@default-00000006;1
[Jul 16 08:36:13] DTMF[20445][C-0000000c]: channel.c:4158 __ast_read: DTMF end emulation of '1' queued on SIP/101118-00000006
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4038 __ast_read: DTMF end '1' received on Local/8600051@default-00000006;1, duration 557 ms
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4108 __ast_read: DTMF end passthrough '1' on Local/8600051@default-00000006;1
[Jul 16 08:36:13] DTMF[20445][C-0000000c]: channel.c:4038 __ast_read: DTMF end '1' received on SIP/101118-00000006, duration 100 ms
[Jul 16 08:36:13] DTMF[20445][C-0000000c]: channel.c:4065 __ast_read: DTMF begin emulation of '1' with duration 100 queued on SIP/101118-00000006
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4124 __ast_read: DTMF begin '1' received on Local/8600051@default-00000006;1
[Jul 16 08:36:13] DTMF[20609][C-00000010]: channel.c:4128 __ast_read: DTMF begin ignored '1' on Local/8600051@default-00000006;1
[Jul 16 08:36:14] DTMF[20445][C-0000000c]: channel.c:4158 __ast_read: DTMF end emulation of '1' queued on SIP/101118-00000006
[Jul 16 08:36:14] DTMF[20609][C-00000010]: channel.c:4038 __ast_read: DTMF end '1' received on Local/8600051@default-00000006;1, duration 712 ms
[Jul 16 08:36:14] DTMF[20609][C-00000010]: channel.c:4108 __ast_read: DTMF end passthrough '1' on Local/8600051@default-00000006;1
[Jul 16 08:36:14] DTMF[20445][C-0000000c]: channel.c:4038 __ast_read: DTMF end '8' received on SIP/101118-00000006, duration 100 ms
[Jul 16 08:36:14] DTMF[20445][C-0000000c]: channel.c:4065 __ast_read: DTMF begin emulation of '8' with duration 100 queued on SIP/101118-00000006
[Jul 16 08:36:14] DTMF[20609][C-00000010]: channel.c:4124 __ast_read: DTMF begin '8' received on Local/8600051@default-00000006;1
[Jul 16 08:36:14] DTMF[20609][C-00000010]: channel.c:4128 __ast_read: DTMF begin ignored '8' on Local/8600051@default-00000006;1
[Jul 16 08:36:14] DTMF[20445][C-0000000c]: channel.c:4158 __ast_read: DTMF end emulation of '8' queued on SIP/101118-00000006
[Jul 16 08:36:14] DTMF[20609][C-00000010]: channel.c:4038 __ast_read: DTMF end '8' received on Local/8600051@default-00000006;1, duration 398 ms
[Jul 16 08:36:14] DTMF[20609][C-00000010]: channel.c:4108 __ast_read: DTMF end passthrough '8' on Local/8600051@default-00000006;1
[Jul 16 08:36:15] DTMF[20445][C-0000000c]: channel.c:4038 __ast_read: DTMF end '#' received on SIP/101118-00000006, duration 100 ms
[Jul 16 08:36:15] DTMF[20445][C-0000000c]: channel.c:4065 __ast_read: DTMF begin emulation of '#' with duration 100 queued on SIP/101118-00000006
[Jul 16 08:36:15] DTMF[20609][C-00000010]: channel.c:4124 __ast_read: DTMF begin '#' received on Local/8600051@default-00000006;1
[Jul 16 08:36:15] DTMF[20609][C-00000010]: channel.c:4128 __ast_read: DTMF begin ignored '#' on Local/8600051@default-00000006;1
    -- <Local/8600051@default-00000006;1> Playing 'vm-password.slin' (language 'en')
[Jul 16 08:36:17] DTMF[20445][C-0000000c]: channel.c:4158 __ast_read: DTMF end emulation of '#' queued on SIP/101118-00000006
[Jul 16 08:36:17] DTMF[20609][C-00000010]: channel.c:4038 __ast_read: DTMF end '#' received on Local/8600051@default-00000006;1, duration 2352 ms
[Jul 16 08:36:17] DTMF[20609][C-00000010]: channel.c:4108 __ast_read: DTMF end passthrough '#' on Local/8600051@default-00000006;1
    -- Incorrect password '' for user '10118' (context = default)
    -- <Local/8600051@default-00000006;1> Playing 'vm-incorrect-mailbox.slin' (language 'en')

You seem to have a newline in the value you are passing to VoicemailMain which is likely screwing it up. You need to remove it.

Hello Jcolp,

Which one? on which step?

The value of ${result} seems to contain a newline.

Hello Jcolp,

this is hte test.sh I am using.

#!/bin/bash
asterisk -rx 'meetme list '$1'' | tr ' ' '\n'| grep SIP | cut -c 5-10 | sed '/^$/d'

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.