From 866f4f6d18cd75bfa23d453ff9f20811bef2c508 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Thu, 30 May 2019 13:32:10 -0700 Subject: [PATCH] changed voicemail to dat2 --- DTMF+REMOTE+VOICE.README | 17 +++++++++++------ OPERATING | 14 +++++++++----- QnetGateway.cpp | 2 +- QnetGateway.h | 2 +- SEcho.h | 2 +- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/DTMF+REMOTE+VOICE.README b/DTMF+REMOTE+VOICE.README index bc557d0..1e7e52f 100644 --- a/DTMF+REMOTE+VOICE.README +++ b/DTMF+REMOTE+VOICE.README @@ -67,12 +67,17 @@ easily create your own! To make your own .dat voice file file, just put " S0" in your radio's YourCall and key up and talk. You will be making a "voice mail" .dat file: -/tmp/X_voicemail.dat, where X is the module on which you are transmitting. -Once you have created it, you can move it out of the /tmp directory and -rename it. Then you can use it in a qnvoice command. You can also replace -all of the standard voice messages with your own. If you want to do this -put your versions in a directory outside of the build directory and make -a small script that will copy your messages over the existing, installed +/tmp/X_voicemail.dat2, where X is the module on which you are transmitting. +Once you have created a voicemail file, you can move it out of the /tmp +directory and rename it, but if you want to use it in a qnvoice command, +you need to strip off the first 56 bytes. You can do this with the command: + +tail -c +56 /tmp/X_voicemail.dat2 > mynewvoiceprompt.dat + +Then you can use it in a qnvoice command. You can also replace all of the +standard voice messages with your own. If you want to do this put your +versions in a directory outside of the build directory and make a small +script that will copy your messages over the existing, installed messages: #!/bin/bash diff --git a/OPERATING b/OPERATING index 49598c6..35407f4 100644 --- a/OPERATING +++ b/OPERATING @@ -52,12 +52,12 @@ YRCALL=_ _ _ _ _ _ _E For Voice Mail: YRCALL=_ _ _ _ _ _ S0 The above command will Store/create voice mail in a proprietary file -x_voicemail.dat. +x_voicemail.dat2. YRCALL=_ _ _ _ _ _ R0 The above command will Recall/playback voice mail from the recorded file -x_voicemail.dat. +x_voicemail.dat2. YRCALL=_ _ _ _ _ _ C0 -The above command will Clear/delete voice mail. File x_voicemail.dat will be +The above command will Clear/delete voice mail. File x_voicemail.dat2 will be deleted. In all cases, the letter x in the file name x_voicemail is the module A,B or C. @@ -235,9 +235,13 @@ the audio: "This is repeater ...". A simple way to create your own recorded "repeater identification file" id.dat is to use your Dstar HT and set YRCALL command: YRCALL=______S0 and key up your repeater. Start talking, and the gateway will record your audio into the file -x_voicemail.dat where x is one of A.B or C. Now copy that file: -sudo cp -f /tmp/C_voicemail.dat /usr/local/etc/it.dat +x_voicemail.dat2 where x is one of A.B or C. Now copy that file: +sudo tail -c +56 /tmp/C_voicemail.dat2 > /usr/local/etc/id.dat + +See the DTMF+REMOTE+VOICE.README for more information. + +============ You may be thinking why did we put all this source code inside QnetLink instead of putting it all inside the Gateway software QnetGateway. Having divided the functionality produces a smaller memory and resource diff --git a/QnetGateway.cpp b/QnetGateway.cpp index 93eba87..130f03d 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -1587,7 +1587,7 @@ void CQnetGateway::ProcessModem() printf("Already recording for voicemail on mod %d\n", i); else { memset(tempfile, '\0', sizeof(tempfile)); - snprintf(tempfile, FILENAME_MAX, "%s/%c_%s", FILE_ECHOTEST.c_str(), dsvt.hdr.rpt1[7], "voicemail.dat"); + snprintf(tempfile, FILENAME_MAX, "%s/%c_%s", FILE_ECHOTEST.c_str(), dsvt.hdr.rpt1[7], "voicemail.dat2"); vm[i].fd = open(tempfile, O_CREAT | O_WRONLY | O_TRUNC | O_APPEND, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (vm[i].fd < 0) diff --git a/QnetGateway.h b/QnetGateway.h index 52e27f6..04dcc7b 100644 --- a/QnetGateway.h +++ b/QnetGateway.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018,2019 by Thomas Early N7TAE + * Copyright (C) 2018-2019 by Thomas Early N7TAE * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/SEcho.h b/SEcho.h index c9aee95..5594ff8 100644 --- a/SEcho.h +++ b/SEcho.h @@ -1,6 +1,6 @@ #pragma once /* - * Copyright 2018 by Thomas Early, N7TAE + * Copyright 2018-2019 by Thomas Early, N7TAE * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by