[Asterisk-Users] Toshiba Integration - MWI Light

Matthew Drobnak mdrobnak at optonline.net
Mon Aug 1 15:57:37 MST 2005


I received an off-list follow-up to this, so I figured I'd post some 
more info about how I got it to work:

exten => _91XXX, 1, Voicemail(u${EXTEN:2})
exten => _91XXX, 2, HasNewVoiceMail(${EXTEN:2})
exten => _91XXX, 3, Hangup
exten => _91XXX, 103, System(sed 's/__EXTEN__/${EXTEN:2}/' 
/etc/asterisk/vmon.call > /var/spool/asterisk/outgoing/vmon-`date +s`.call);
exten => _91XXX, 104, Hangup

exten => _92XXX, 1, VoicemailMain(${EXTEN:2})
exten => _92XXX, 2, HasNewVoiceMail(${EXTEN:2})
exten => _92XXX, 3, System(sed 's/__EXTEN__/${EXTEN:2}/' 
/etc/asterisk/vmoff.call > /var/spool/asterisk/outgoing/vmoff-`date 
+s`.call);
exten => _92XXX, 4, Hangup
exten => _92XXX, 103, Hangup


vmon.call:
Channel: Zap/1/#63__EXTEN__
MaxRetries: 5
RetryTime: 15
WaitTime: 30
Application: NoOp

vmoff.call:
Channel: Zap/1/#64__EXTEN__
MaxRetries: 5
RetryTime: 15
WaitTime: 30
Application: NoOp


Create those two files, and put those extensions in your context that 
you're answering or going to, and you should be good to go.

-Matt


Karl H. Putz wrote:

>Use a Call file to dial back to the PBX.
>
>In voicemail.conf set the externnotify value to something like:
>externnotify=/usr/local/sbin/mwi.pl
>
>where the perl script creates the Call file.  I set up a specific group and
>dedicated a port to making these calls instead of chancing the glare with
>the pbx.  Also, my specific pbx needed some delay between dialing a feature
>access key "#" and the MWI dial code itself so that is why my string is
>"#www91$ext".
>
>Here is the perl script:
>
>#!/usr/bin/perl
>
>my ($context,$ext,$msgs, at junk) = @ARGV;
>
>my $tmpcallpath = "/var/tmp";
>my $astpath = "/var/spool/asterisk/outgoing";
>
>my $tmpname = "mwi-" . time();
>
>my $tmpcallfile = "$tmpcallpath/$tmpname";
>my $callfile = "$astpath/$tmpname";
>
>$ext =~ s/\@default//;
>
>if ($msgs > 0) {
>   $channel = "Zap/g3/#www91$ext";
>} else {
>   $channel = "Zap/g3/#www90$ext";
>}
>
>sleep 2;
>
>print STDERR "channel: $channel\n";
>
>open (CALLFILE,">$tmpcallfile");
>
>print CALLFILE qq(
>Channel: $channel
>MaxRetries: 0
>WaitTime: 5
>Context: mwi
>Extension: s
>Priority: 1
>);
>
>close(CALLFILE);
>
>rename($tmpcallfile, $callfile);
>
>
>
>Good luck!
>
>
>Karl Putz
>
>  
>
>>-----Original Message-----
>>From: asterisk-users-bounces at lists.digium.com
>>[mailto:asterisk-users-bounces at lists.digium.com]On Behalf Of Matthew
>>Drobnak
>>Sent: Wednesday, July 27, 2005 4:58 PM
>>To: Asterisk Users Mailing List - Non-Commercial Discussion
>>Subject: [Asterisk-Users] Toshiba Integration - MWI Light
>>
>>
>>Hi All,
>>
>>On our Toshiba PBX, to light the MWI, one dials "#63__EXTENSION__" --
>>how is it possible to easily trigger this after a voicemail is sent?
>>
>>Thanks,
>>
>>-Matthew Drobnak
>>_______________________________________________
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>To UNSUBSCRIBE or update options visit:
>>  http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>    
>>
>
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>  
>



More information about the asterisk-users mailing list