Ticket #2189 (closed Bugs: fixed)

Opened 5 years ago

Last modified 4 years ago

[PATCH] Direct Dial to Voicemail message doesn't work at all with Asterisk 1.4.9

Reported by: copas2 Assigned to: p_lindheimer
Priority: minor Milestone: 2.3
Component: Core Version: 2.3-branch
Keywords: Cc:
Confirmation: Need testing SVN Revision (if applicable):
Backend Engine: Asterisk 1.4.x Backend Engine Version:

Description

The "Direct Dial to Voicemail message type" drop-down box has no meaning. It doesn't matter what you choose, there will always be the not-available-message when directly dialing the extension's mailbox.

Change History

08/01/07 04:20:41 changed by p_lindheimer

  • engine changed from All to Asterisk 1.4.x.

please provide a CLI trace at the point where the Voicemail is being called when you do this. (Just the part of the trace that shows the call to voicemail, for example:

    -- Executing VoiceMail("SIP/200-0950eb98", "200@default|b") in new stack
    -- Playing '/var/spool/asterisk/voicemail/default/200/greet' (language 'en')

If bus voicemail IS working under other conditions, please provide a trace of that as well. I don't have a 1.4.9 system right now to reproduce but according to the wiki the format we are using *should* work (putting the options after the "|" or ",").

08/02/07 09:55:22 changed by josh

Also working on this side using 1.4.5. Busy plays the appropriate recording, as does the Unavail selection. This is on 2.2.2 of freePBX.

08/02/07 10:01:08 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to worksforme.

the code is the same (unless I'm spacing something) for the direct dial between 2.2 and 2.3 branch. Closing as worksforme. If it is still an issue, reopen with a CLI trace of the the call so we can see what it is doing. You will need a trace of busy and a trace of unavailable. If you do - make sure the CLI gets pasted between { { { and } } } so it is readable, or attach it as a file.

08/03/07 17:56:15 changed by copas2

Sorry for the delay: having been very busy in the past days. Yes, you were right, I wasn't enough specific, not even with myself. Yes, direct dialing the extension's voice does work (*1ext), indeed. My bug report was kind of misleading. The problem is, I realized it later, that the 2.2 branch had direct voicemail dialing as destination. Now the 2.3 branch has two kinds of mailbox destinations, one with busy and an other with unavailable message. Neither one is good if you only want to beep it. So if you're having an inbound route to a mailbox destination, it doesnt't matter what your config says in the general tab, it will always read something (unavail or busy).

08/08/07 11:55:57 changed by p_lindheimer

  • status changed from closed to reopened.
  • confirmation set to Need testing.
  • resolution deleted.

If you want you can try the following patch. I have not tested it at all, just wrote it up quickly. If it works, we can evaluate adding it in. As always, make a backup of each file before applying the patches.

First patch is for /var/www/html/admin/modules/core/functions.inc.php

Index: functions.inc.php
===================================================================
--- functions.inc.php (revision 4767)
+++ functions.inc.php (working copy)
@@ -40,6 +40,7 @@
      if(isset($vmboxes[$result['0']])) {
        $extens[] = array('destination' => 'ext-local,vmb'.$result['0'].',1', 'description' => '<'.$result[0].'> '.$result[1].' (busy)', 'category' => 'Voicemail');
        $extens[] = array('destination' => 'ext-local,vmu'.$result['0'].',1', 'description' => '<'.$result[0].'> '.$result[1].' (unavail)', 'category' => 'Voicemail');
+       $extens[] = array('destination' => 'ext-local,vms'.$result['0'].',1', 'description' => '<'.$result[0].'> '.$result[1].' (beep-only)', 'category' => 'Voicemail');
      }
    }
  }
@@ -388,6 +389,8 @@
            $ext->add('ext-local', 'vmb'.$exten['extension'], '', new ext_hangup(''));
            $ext->add('ext-local', 'vmu'.$exten['extension'], '', new ext_macro('vm',"$vm,NOANSWER"));
            $ext->add('ext-local', 'vmu'.$exten['extension'], '', new ext_hangup(''));
+           $ext->add('ext-local', 'vms'.$exten['extension'], '', new ext_macro('vm',"$vm,NOMESSAGE"));
+           $ext->add('ext-local', 'vms'.$exten['extension'], '', new ext_hangup(''));
          }

          $hint = core_hint_get($exten['extension']);

This is for extensions.conf. The first part is completely unrelated but won't hurt anything (it just happens to be in my svn directory pending another bug). The second part is needed. Just go ahead and do both.

Index: extensions.conf
===================================================================
--- extensions.conf (revision 4767)
+++ extensions.conf (working copy)
@@ -61,10 +61,14 @@
 ; Use a Macro call such as the following:
 ;  Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...)
 [macro-dial]
-exten => s,1,GotoIf($["${MOHCLASS}" = ""]?dial)
+exten => s,1,GotoIf($["${MOHCLASS}" = ""]?diala)
 exten => s,2,SetMusicOnHold(${MOHCLASS})
-exten => s,3(dial),AGI(dialparties.agi)
-exten => s,4,NoOp(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS})
+exten => s,3(diala),GotoIf($["${ALERT_INFO}" = ""]?dialb)
+exten => s,4,SipAddHeader(Alert-Info: ${ALERT_INFO})
+exten => s,5(dialb),GotoIf($["${SIPADDHEADER}" = ""]?dialc)
+exten => s,6,SipAddHeader(${SIPADDHEADER})
+exten => s,7(dialc),AGI(dialparties.agi)
+exten => s,8,NoOp(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS})

 exten => s,10,Dial(${ds})                               ; dialparties will set the priority to 10 if $ds is not null
 exten => s,11,Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!="" ]?${DIALSTATUS_CW}:${DIALSTATUS})})
@@ -281,8 +285,10 @@


 ; If vmx not enabled for the current mode,then jump to normal voicemail behavior
+; also - if not message (beep only) is requested, straight to voicemail
 ;
-exten => vmx,1,Set(MODE=${IF($["${ARG2}"="BUSY"]?busy:unavail)})
+exten => vmx,1,GotoIf($["${ARG2}"="NOMESSAGE"]?s-${ARG2},1)
+exten => vmx,n,Set(MODE=${IF($["${ARG2}"="BUSY"]?busy:unavail)})
 exten => vmx,n,GotoIf($["${ARG2}" != "DIRECTDIAL"]?notdirect)
 exten => vmx,n,Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = "1"]?busy:${MODE})})
 exten => vmx,n(notdirect),Noop(Checking if ext ${ARG1} is enabled: ${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)})
@@ -398,6 +404,11 @@
 exten => s-BUSY,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_OPTS}b${VMGAIN})   ; Voicemail Busy message
 exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)

+exten => s-NOMESSAGE,1,NoOp(NOMESSAGE (beeb only) voicemail)
+exten => s-NOMESSAGE,n,Macro(get-vmcontext,${ARG1})
+exten => s-NOMESSAGE,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_OPTS}${VMGAIN})   ; Voicemail Busy message
+exten => s-NOMESSAGE,n,Goto(exit-${VMSTATUS},1)
+
 exten => s-DIRECTDIAL,1,NoOp(DIRECTDIAL voicemail)
 exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
 exten => s-DIRECTDIAL,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_OPTS}${VM_DDTYPE}${VMGAIN})

08/09/07 04:27:23 changed by copas2

Thanks for the reply. I altered the correspondings script and configuration file. Now the "No message" still says the "Please leave a message after the beep" sentence. I think "No message" should beep only.

08/09/07 09:01:56 changed by p_lindheimer

copas - try going to the general screen and checking the box that says: Do Not Play Please leave message after tone to caller. That should stop the message. Let me know if that fixes it.

08/10/07 00:57:48 changed by copas2

Yes, it's working fine. But then the functions.inc.php shouldn't say "beep-only" to stay consistent with the general tab. Instead it should say "no-message". So thanks, this way it's okay since there is really a need for just a mailbox only to be reached from the outside. From my point of view this case can be closed.

08/10/07 02:11:00 changed by p_lindheimer

  • priority changed from minor to major.

copas, I'll change it to read "no-message" - you are right, thanks.

08/15/07 17:21:20 changed by p_lindheimer

  • priority changed from major to minor.
  • summary changed from Direct Dial to Voicemail message doesn't work at all with Asterisk 1.4.9 to [PATCH] Direct Dial to Voicemail message doesn't work at all with Asterisk 1.4.9.

08/18/07 19:12:58 changed by p_lindheimer

  • status changed from reopened to closed.
  • resolution set to fixed.