[Asterisk-Users] VoiceMailMain skipping extension and password prompting

2003-09-26 Thread John Harragin
OK, Here is a down and dirty which will work in limited situations (like
when there are not to many extensions to re-define - which is one of the
things I want to avoid)... The channel is the first parameter passed to

[globals]
Zap/5-=s6147
Zap/16=s6158

exten = 6199,1,GoToIf(${${CHANNEL:0:6}}?6199|2:6199|4)
exten = 6199,2,VoicemailMain2(${${CHANNEL:0:6}})
exten = 6199,3,Hangup
exten = 6199,4,VoicemailMain2
exten = 6199,5,Hangup

John





This e-mail was scanned and found clean by Monroe-Woodbury CSD Antivirus.

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] VoiceMailMain skipping extension and password prompting

2003-09-25 Thread John Harragin
I would like to access VoiceMailMain2 skipping extension and password
prompting if calling from a resource that has a mailbox defined. What
variables can I use to retrieve the calling channel  calling extension (if
it exists)?

Here is what I'm trying to accomplish (of course ${CallingResourse.MailBox}
is not a real way to retrieve this info)...

exten = 7799,1,gotoif(${CallingResourse.MailBox}?7799|2:7799|4)
exten = 7799,2,VoicemailMain2(s${CallingResourse.MailBox})
exten = 7799,4,VoicemailMain2

... currently extensions.conf is ...
exten = 7799,1,VoicemailMain2

... and from zapata.conf ...
callerid=TCC hcaar 321-222-2553
mailbox=7731
channel=19

Any suggestions?

John Harragin


This e-mail was scanned and found clean by Monroe-Woodbury CSD Antivirus.

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] VoiceMailMain skipping extension and password prompting

2003-09-25 Thread Florian Overkamp
Hi,

At 12:13 25-9-2003 -0400, you wrote:
I would like to access VoiceMailMain2 skipping extension and password
prompting if calling from a resource that has a mailbox defined. What
variables can I use to retrieve the calling channel  calling extension (if
it exists)?
Here is what I'm trying to accomplish (of course ${CallingResourse.MailBox}
is not a real way to retrieve this info)...
exten = 7799,1,gotoif(${CallingResourse.MailBox}?7799|2:7799|4)
exten = 7799,2,VoicemailMain2(s${CallingResourse.MailBox})
exten = 7799,4,VoicemailMain2
... currently extensions.conf is ...
exten = 7799,1,VoicemailMain2
... and from zapata.conf ...
callerid=TCC hcaar 321-222-2553
mailbox=7731
channel=19
Any suggestions?
Actually, I've experienced that its not always -just- that local extension 
that you want to give this kind of access to, so I've written some AGI code 
that helps. Here is a snippet that gives you the general idea...

=
// parse agi headers into array $agi[callerid]
while ($env=read()) {
  errlog($env);
  $s = split(: ,$env);
  $agi[str_replace(agi_,,$s[0])] = trim($s[1]);
  if (($env == ) || ($env == \n)) {
break;
  }
}
// Main run
$clid = $agi[callerid];
switch($clid) {
  // enter the mailbox number for each valid callerid
  // prepend 's' if you wish to trust the callerid and skip the password check
  case 3001:  $parms = s1; break;
  case 06123456:$parms = s1; break;
  default: $parms = 0; break;
}
if($parms != ) $parms =  $parms;
echo EXEC VoiceMailMain2$parms\n;
=
I find this approach more flexible. Hope this gets you somewhere.

Best regards,
Florian
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users