[Asterisk-code-review] tests/apps/voicemail/play message: Fix dialplan syntax error. (testsuite[master])
Richard Mudgett
asteriskteam at digium.com
Fri Jul 21 16:17:49 CDT 2017
Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/6066
Change subject: tests/apps/voicemail/play_message: Fix dialplan syntax error.
......................................................................
tests/apps/voicemail/play_message: Fix dialplan syntax error.
Change-Id: I48c20cea8c1148750a44e75d19e4f51984195087
---
M tests/apps/voicemail/play_message/configs/ast1/extensions.conf
M tests/apps/voicemail/play_message/run-test
2 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/66/6066/1
diff --git a/tests/apps/voicemail/play_message/configs/ast1/extensions.conf b/tests/apps/voicemail/play_message/configs/ast1/extensions.conf
index 60ed5f0..7add36f 100644
--- a/tests/apps/voicemail/play_message/configs/ast1/extensions.conf
+++ b/tests/apps/voicemail/play_message/configs/ast1/extensions.conf
@@ -1,14 +1,14 @@
[voicemail]
-exten => playmsg,1,NoOp()
+exten => playmsg,1,NoOp(MAILBOX="${MAILBOX}" MAILCONTEXT="${MAILCONTEXT}" MSGID="${MSGID}")
same => n,GotoIf($[${LEN(${MAILCONTEXT})}=0]?nocontext:context)
same => n(context),VoiceMailPlayMsg(${MAILBOX}@${MAILCONTEXT},${MSGID})
same => n,Hangup()
same => n(nocontext),VoiceMailPlayMsg(${MAILBOX},${MSGID})
same => n,Hangup()
-exten => h,1,NoOp()
- same => n,GotoIf($[${VOICEMAIL_PLAYBACKSTATUS} = SUCCESS]?pass:fail)
+exten => h,1,NoOp(VOICEMAIL_PLAYBACKSTATUS="${VOICEMAIL_PLAYBACKSTATUS}")
+ same => n,GotoIf($["${VOICEMAIL_PLAYBACKSTATUS}" = "SUCCESS"]?pass:fail)
same => n(fail),UserEvent(TestResult,result: fail, status: VoiceMailPlayMsg failed to playback message ${MSGID})
same => n,Goto(out)
same => n(pass),NoOp()
diff --git a/tests/apps/voicemail/play_message/run-test b/tests/apps/voicemail/play_message/run-test
index 7a0b657..32482e7 100755
--- a/tests/apps/voicemail/play_message/run-test
+++ b/tests/apps/voicemail/play_message/run-test
@@ -100,6 +100,10 @@
if 'state' in event and 'message' in event:
if event['state'] == 'PLAYBACK':
logger.debug("Playing back %s" % event.get('message'))
+ elif event['state'] == 'PLAYVOICE':
+ # Playing a recorded voicemail message
+ # or at least trying to play it.
+ logger.debug("Recorded msg %s" % event.get('message'))
def user_event_handler(self, ami, event):
if 'userevent' not in event or 'result' not in event or 'status' not in event:
--
To view, visit https://gerrit.asterisk.org/6066
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I48c20cea8c1148750a44e75d19e4f51984195087
Gerrit-Change-Number: 6066
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170721/2e406004/attachment-0001.html>
More information about the asterisk-code-review
mailing list