[asterisk-users] VoiceMail - Allow * for only some users

Andrew Ruthven andrew.ruthven at catalyst.net.nz
Thu Jul 21 16:23:28 CDT 2016


Hey,

I have free calling to between DDIs and cellphones on our group plan. I
figure it'd be nice to allow staff with those cellphones to be able to
forward callers to their VoiceMail to their cellphones using the *
feature.

I have a standard extension macro that has VoiceMail support.
So far I've done this by duplicating the standard extension macro, and
adding this rule (where ARG1 is the extension):

  exten => a,1,Goto(vmfwd,${ARG1},1)

Then in the vmfwd context I have rules like this (I need to set the
CALLERID(number) so our SIP provider accepts the call):

  ; Andrew Ruthven
  exten => 7231,1,Set(CALLERID(number)=yyy)
  exten => 7231,n,Goto(pstn,xxx,1)

Which is working nicely. But, I thought, can I simplify this and just
have one macro?

So I've tried doing the following to fold it into my standard extension
macro:

1) Tried using a/_7231 but that didn't match (well, it was worth a try)
2) exten => a,1,Goto(vmfwd,${ARG1},1) works for calls to my extension,
but if I disable the 7231 rules in vmfwd, I get:

  [2016-07-22 09:01:07.691] WARNING[11488][C-00000420]: pbx.c:6646
__ast_pbx_run: Channel 'SIP/192.168.43.254-0000005a' sent to invalid
extension but no invalid handler: context,exten,priority=vmfwd,7231,1

  and the call hangs up, not a very nice user experience.

The second option could work, as long as the user lands back into
VoiceMail if there is no valid extension. I thought about using GoSub,
but how do I get the caller back into VoiceMail?

I've done a bunch of searching for this, but haven't found any general
solutions. Is it possible to do what I'm trying to achieve, or is there
a better approach?

This is Asterisk 11.13.

Cheers,
Andrew

-- 

Andrew Ruthven, Wellington, New Zealand
MIITP, CITPNZ

At work: andrew.ruthven at catalyst.net.nz
At home: andrew at etc.gen.nz
Card   : http://qr.catalyst.net.nz/907675e1
Cloud  : NZs only real cloud - https://catalyst.net.nz/cloud
GPG fpr: C603 FC4E 600F 1CEC D1C8  D97C 4B53 D931 E4D3 E863
LCA2016: LCA By the Bay, Geelong, AU - lca2016.linux.org







More information about the asterisk-users mailing list