Question(email to asterisk)

How did you install Asterisk the first time ? From packages or sources ? Don’t mix packages with sources, if you installed from packages uninstall the Asterisk packages and then build Asterisk from the sources and don’t do this on a production server, try before on a test server.
Also which Linux distro are you using ?


Marco Bruni

Thanks.I installed the asterisk from the source means i downloaded all the file like asterisk 1.4.18.tar.gz and bison , kernel-smp, unixODBC, zeptel-1.4.7.tar.gz and similarly all other files then untar tar package and installed them and installing file using rpm -ivh whose extension was rpm.

I am using centos 4.7. I just installed asterisk 1.6.1 on centos 5 and it works fine but it is on another server. The Asterisk whom i am talking about right now which shows the errors is on centos 4.7.

Can you please tell me what this Bad file descriptor mean and why these errors are coming means what are the possibilities because of which these errors are showing.

Thank you.

I found the problem actually we just changed our IP so the bindaddr in sip.conf points to the old Ip address.When i changed it to the new one all the warnings and also ODBC errors are removed :smile:.

Thank you.


this is exactly what I want to be able to do. send an previously emailed voicemail back into asterisk some time later and play it back via the phone
can you please advise how you got it all to work in steps.
Thanks In advance


Hi Mr. Marco :smile: ,
Hope you are at good health :smile: .It’s long time has been passed since we talked . Anyways you are glad to hear that i did what i want. Now i can send email to asterisk through my email client and it also recognize by Asterisk :wink: . But here I am facing one little problem and is that, Asterisk didn’t tell the time correctly. And i think it’s because of call timestamp parameter.Because my timestamp and timestamp created by asterisk is different. Actually i am unable to understand the call timestamp of Asterisk. It created 10 digits for timestamp and i don’t know how could i interpret it. I created timestamp from the system date.Can you please tell me how Asterisk made it’s timesatmp and what it means, purport how we read it, what it means and how can i crate it with java.

When i call Asterisk it tells me you received new message on 1st januaury 1970 5:33am. I used java to do all the things. It’s a pure java code and i think this time is from Georgian calender which is default. Any ways here i am posting my files and Asterisk files, you will clearly see the difference between timesatmp parameters(mine and Asterisk) .

And one thing more my Asterisk is not playing the message it only tells that you have a new message in both cases either i send message from email or by phone. So can you tell me why this is happening.

Now i am posting generated file. 1st one is mine then the details of each parameter and then file generated by Asterisk.

; Message Information File
origdate=Tue Jan 26 06:00:38 PM PKT 2010
origtime=2010-01-26 18:00:38.709

origmailbox – mailbox the message belongs to
context – the voicemail context, asterisk config dialplan uses “contexts” as configuration items,
macrocontext – which context was used to answer the call
exten - usually, why the call was transfered to the voicemail
priority - the priority in the context
callerchan - the incoming channel
callerid – who called
origdate – date/time of call
origtime – call timestamp
category - i think this is for “categorizing” messages in virtual mailboxes, availble through the vmail.cgi application.
duration – how long is the message

; Message Information file
origmailbox=206 (exist in database)
context=office (exist)
exten=206 (same as origmailbox)
priority=3 (constant means for every user priority is 3)
callerid=“Bashir” <208> (exist in database)
origdate=Fri Oct 31 08:46:27 PM PKT 2008

And here is the code that how i created timestamp with java

import java.sql.Timestamp;
import java.util.Date;

public class OrigTime {

//Method that returns a TimeStamp object
public static Timestamp getCurrentTime(){
    //Instiate a Date object and calls the getTime() method, and creates and returns
    //the Timestamp object with the current time. In one line
    return new Timestamp(new Date().getTime());  


Also tell me one thing that the time is in seconds or milliseconds(duration=2) it is 2 sec. Is it?

Hi brad what you want to do tell me i will tell you everything that i have done so far and also helps you if i am able to do it :wink: .Sorry i just saw your message because i was busy in doing this email to asterisk, that’s why i couldn’t respond you that time, in fact even i don’t no when your message came. Anyways again sorry.

Thank you :smile:

Hello Brad,
sorry can’t help you on this, I just can suggest you to look in the source code of Asterisk, voicemail parts, if you are able to read C code, and see if it does helps you understand the formats for the date and the time, or you could try save some voicemails directly from Asterisk and check carefully how date and time are set.


Marco Bruni

Hope you will be fine. I have some problem that when i call to asterisk (1.4.18) it says, extension of the person you are trying to reach, but when i dial extension nothing happen. First i dial extension 220 and the messages are

then i dial extension 1789 and the messages are

Can you please tell me what is the problem why this is happening because earlier it all works fine.

Thank you.

The problems have solved now.Ping failed because we changed the IP and the user with the changed IP didn’t exist. So after creating user with the changed IP( and grant permission to the user this problem solved.
Also my file in asterisk apps and lib folder are not same so after copying the same files from the backup this issue also solve.