LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Closed Thread
 
Search this Thread
Old 11-11-2009, 01:17 AM   #1
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Rep: Reputation: 15
Question Conversion of voice mail into Asterisk voice mail format


Hi to all,
Hope you all will be fine. I want to send voice mail to Asterisk through email client. For this what i have done so far with the help of one of the senior member of this forum is to send voice mail to Asterisk folder i.e, where Asterisk stores all it's voice messages(/var/spool/asterisk/voicemail/brights/220/INBOX/) . The format with Astersik stores messages when you record a voice message to Asterisk by phone is different from the format when i send voice mail to asterisk by email client. So I want to know can any one help me on this topic, any idea or any help or any hint that how this can be done i.e, when you send voice mail to asterisk through email client Asterisk treats it as it is a recorded voice message by the phone to Asterisk.

Thank You
 
Old 11-11-2009, 02:33 AM   #2
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
There isn't anything Asterisk-specific in the voicemail files. They are "standard" audio files in their respective format.
Asterisk itself will usually save a voicemail in different formats, as governed by /etc/asterisk/voicemail.conf.
What format are your audio files?
WAV should be the easiest, Asterisk's own are: 16 bit mono 8kHz PCM.
 
Old 11-11-2009, 02:55 AM   #3
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi,
Thank you. Yes the voice mail that i send is also in wav format. I tell you the whole story that what i have been done so far

Actually i want to send voice email to asterisk through email client and the whole thing that i have just done with one of the senior member help i.e, send mail to asterisk/voicemail/brights/220/INBOX is a part of it because when we record a voice message to Asterisk it contains voice mail in this folder but it manages file like this

msg0000.txt
msg0000.wav

and then msg0001 and then msg0002 and so on

The mesg0000.txt contains things like

;
; Message Information file
;
[message]
origmailbox=202
context=internal-3
macrocontext=
exten=202
priority=3
callerchan=Zap/2-1
callerid=Unknown
origdate=Fri Oct 24 04:05:41 PM PKT 2008
origtime=1224846341
category=
duration=11

Now what we have done so far that when mail goes to asterisk through our procedure i.e., receive by sendmail and then filter by procmail and then go to Asterisk it store likes this

msg-5184-1.html
Voicemail277552.wav

and msg-5184-1.html contain things like

<HTML><table width="100%" style="border: 1px solid #215576;">
<tr>
<td style="padding: 3px;" nowrap>
This Email has Voice maill attached : <br>
</td>
</tr>
</table>
<br>
<HTML>
this si atest voice mail to see whether it is working or not<br>
<BR><hr>Msg sent via NetKarachi - http://www.netkarachi.com/</HTML>

</HTML>

Although it goes to folder where asterisk store messages for extension suppose if i record a message for extension 220, the Asterisk put it in (/var/spool/asterisk/voicemail/brights/220/INBOX)and then when i call to Asterisk it says you have a new email message, but when i send voice mail through email client and then call to asterisk it says you don't have any new email, so why it is saying this.So i think this means it's not only a matter of putting or sending file in Asterisk voice mail folder, something we have to do before sending it to the folder, may be i am wrong because i have no idea about it.

So please help me, any idea or hint or help or anything regarding this.

Thanks in advance
 
Old 11-11-2009, 08:09 AM   #4
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
As you wrote yourself, Asterisk's voicemail storage looks like
Code:
msg0000.txt
msg0000.wav
which constitutes an info text file and one (or several for different formats) audio file(s).

But then you put in the directory:
Code:
msg-5184-1.html
Voicemail277552.wav
Is there anything that makes you assume that would work? Why?
 
Old 11-12-2009, 02:28 AM   #5
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi,
Thank you. Yes i just have an idea but i don't no whether it will work or not, i will have to work out that which module asterisk run when we call to asterisk and the code and whatever procedure asterisk follows when we call and then try to run the same module at the time when send-mail receive mail, first it run the asterisk code and then send it to the INBOX folder, i think it will be code defineitely that asterisk run when we call it, what do you think will it work and do you know the module that Asterisk run when we call it.

Thank you
 
Old 11-12-2009, 07:38 AM   #6
Terry56
Member
 
Registered: Oct 2009
Posts: 49

Original Poster
Rep: Reputation: 15
Hi,
Hope you will be fine. Now what to do now is when voice mail is received by send mail then using procmail extaract the voicemail from the whole email, rename it to msgNNNN.wav, then create a normal text file and named it to msgNNNN.txt and it cantain the relevant material means when i call to Asterisk to record a voice message for extension 206 it stores the msg0000.txt file with the info.

;
; Message Information file
;
[message]
origmailbox=206
context=office
macrocontext=
exten=206
priority=3
callerchan=SIP/208-09fb58c0
callerid="Bashir" <208>
origdate=Fri Oct 31 08:46:27 PM PKT 2008
origtime=1225467987
category=
duration=2

So now if i send my voice mail to extension 220 i have to create a text file with the same info as above file contain but for extension 220, and then send it to INBOX folder. So this means that now i require another script that can do this thing.

Do you know such kind of script that can do it .

Thank you.
 
Old 11-14-2009, 07:00 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] voice recording program needed to record .wav for asterisk Agustina Linux - Software 8 07-16-2009 07:23 PM
LXer: Digium is The Voice of Asterisk LXer Syndicated Linux News 0 06-06-2006 04:54 PM
LXer: Create your own Voice-over-IP PBX using Asterisk LXer Syndicated Linux News 0 02-21-2006 11:31 AM
Conversion of outlook .pst file into any Linux mail client format Mayuresh Linux - Software 1 08-09-2004 11:52 AM
how do i send voice mail with ftp and audacity green-ears Linux - Newbie 0 11-17-2003 01:17 PM


All times are GMT -5. The time now is 07:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration