Voicemail automatic login bug?

Hello all,

I want my users not to type in their mailbox number all the time so I want to add that the called extension is automatically logged in:

But my configuration is like this:
sip.conf:

[a1u1e100]
type = friend
context = account_1
host = dynamic
insecure = invite
mailbox=100@account_1

voicemail.conf:

[account_1]
100 => 1234,My Name

extensions.conf:

[account_1]
exten => 7,1,VoiceMailMain(s100@account_1)
exten => 100,1,Macro(voicemail,SIP/a1u1e100,account_1)

This works because I manually added s100@account1 in the VoiceMailMain application.

But if I replace it to:
VoiceMailMain(s${CALLERID(num)}@account_1)

It will be replaced by “a1u1e100” because thats the account name.

But that is not accepted because it will still ask for my password.

Is this a bug or a feature? This makes the voicemail a little less flexible. Ofcourse I can split on the “e” and stuff, but it’s not very neat.

Instead of CALLERID(num) try SIPPEER(${CALLERID(num)}:mailbox) (core show function SIPPEER) - see if that works.

Of course, you could always play with the ${CHANNEL} information.

[quote=“Raffles”]Instead of CALLERID(num) try SIPPEER(${CALLERID(num)}:mailbox) (core show function SIPPEER) - see if that works.

Of course, you could always play with the ${CHANNEL} information.[/quote]
Ah you are right this works, I didnt know you could access parameters like that! Very handy to know.

That’s why I’m a dCap :wink:.

Anyway, you’re welcome.

Hi

The reason why using the SIPPEER method is flawed, is that when you have more than one mailbox defined against a peer, this will report back all mailboxes.

NoOp("SIP/2225-a8816078", "2225,2224,2001") which is obviously not much help, and wont work.

The following is used and proven on may sites.

'123' => 1. Answer() [pbx_config] 2. Noop(${SIPCALLID}) [pbx_config] 3. Voicemailmain(${CALLERID(num)}@context|s) [pbx_config] 4. Hangup() [pbx_config]

is 1.0 and 1.2 format not 1.4 or 1.6 The options moved to the end in 1.2 but still worked, in 1.4 that method was removed.

Ian

What I found out is that if CallerID is defined in sip.conf then SIPPEER results nothing! So pretty useless.

But I have not his that works pretty well:

exten => 3,1,VoiceMailMain(s${CALLERID(num)}@${CONTEXT})

Which is pretty much the same you suggested :smile:

Hi Rogier21

you should to swap the option to the end as if you dont you will get caught out later on.

Ian

Correct Ian. But in this case, he didn’t - hence it was the right answer to this question. There are lots of other ways to get the same information (${CALLERID(ANI)}, ${CHANNEL}, usage of global variables etc.) all of which are user/scenario dependent.

Anyway, glad it’s all sorted.

[quote=“ianplain”]Hi Rogier21

you should to swap the option to the end as if you dont you will get caught out later on.

Ian[/quote]
Except that I am not sure what you mean by this sentence?

He means the ‘s’ at the beginning (the one you add before the extension number). In the old days - that looks like an ‘option’ which would now go at the end.

Just a bit of confusion me thinks :smile:.

[quote=“Raffles”]He means the ‘s’ at the beginning (the one you add before the extension number). In the old days - that looks like an ‘option’ which would now go at the end.

Just a bit of confusion me thinks :smile:.[/quote]
Aha ok I didn’t know that :smile:

These are just things you really need to know, because in the docs and wiki’s it is still how I did it :smile:

Hi

The problem is that you cant have it working for one and broken for another. I agree that it would work in this case, but Features have to work for all extensions.

The first port of call should be core show application

The wiki is only as good as people updating it and sadly the wiki is often out of date.

[quote]cymonCLI> core show application VoiceMailMain
cymon
CLI>
-= Info about application ‘VoiceMailMain’ =-

[Synopsis]
Check Voicemail messages

[Description]
VoiceMailMain([mailbox][@context][|options]): This application allows the
calling party to check voicemail messages. A specific mailbox, and optional
corresponding context, may be specified. If a mailbox is not provided, the
calling party will be prompted to enter one. If a context is not specified,
the ‘default’ context will be used.

Options:
p - Consider the mailbox parameter as a prefix to the mailbox that
is entered by the caller.
g(#) - Use the specified amount of gain when recording a voicemail
message. The units are whole-number decibels (dB).
s - Skip checking the passcode for the mailbox.
a(#) - Skip folder prompt and go directly to folder specified.
Defaults to INBOX
[/quote]

Ian