[Asterisk-Dev] Adding caller ID playback to VM

Steve Rodgers hwstar at rodgers.sdcoxmail.com
Fri Nov 28 17:23:14 MST 2003


Hello,

I'm thinking about adding caller ID playback to app_voicemail.c. I would 
change app_voicemail to read back the caller's number or extension after
the date and time are announced. 

The only issue I have is there doesn't seem to be enough data in the text file 
to determine if the call originated from an internal extension, or from an 
outside source. Here's a sample of some data in one of the text files 
generated after a voice mail message was left in my mailbox:

[message]
origmailbox=101
context=macro-vmexten2
exten=s
priority=103
callerchan=Zap/2-1
callerid="Steve Rodgers"<101>
origdate=Fri Nov 28 03:57:51 PM PST 2003
origtime=1070063871
duration=4


One could make an assumption based on the number of digits, but this would be 
cheezy. I would like to code it to announce the caller's number one of three 
ways:

1. "from extension XXXX" for internal calls 

2. "from XXXXXXXXXX" for external calls

3. "from an unknown number" for calls without caller ID

The data available in the text file will not be very useful for making a 
decision based on cases 1 and 2 above.

I could possibly add a configuration option to voicemail.conf which allows
pattern matching on the incoming caller id to determine if it is an extension
or not but there are shortcomings to this approach as multiple pattern matches
might be necessary for some users.

It would really be nice to have a way to determine if the call originated 
internally or externally be convieniently inserted in the text file. 
Allthough I don't really see an easy way to do this.

Any suggestions, ideas, pointers, or clues?


Thanks,

Steve Rodgers
San Diego, CA








More information about the asterisk-dev mailing list