D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Asterisk Question

 

On Wed, 7 Jan 2009, Sam Grabham wrote:

Hi Gordon

Have been looking for a sample dialplan script to detect "unknown" using
incoming ${CALLERID}, but as yet haven't found one.

You need to know what actually gets sent by the technology itself, however it's often nothing at all, so if incoming calls end up in the 's' extension, then:

exten => s,n,GotoIf($["${CALLERID(num)}" != ""]?gotNumber)

exten => s,n,Noop(Withheld number call, drop it)
exten => s,n,Hangup()

exten => s,n(gotNumber),Noop(We have a call from ${CALLERID(num)})

and so on.

I would like to make Unknown callers, drop into a script which makes them
have to enter there number by using dial pad and then set the ${CALLERID}
then allow dest caller to accept or drop call into a prerecorded message,
but if they don't enter a number then drop call also.

You need to get the books and start reading up on dialplan logic. Essentailly, you need to Answer() the call, then Playback() a message, then it gets intersting when you need to dial another extension with the caller holding, accept inout from the extension, then bridge (or not) then call, or dump the caller into a mailbox. Left an an excercise to the user :)

What's the best way of creating you own voice messages?

Setup an extension to record a message then dial it, then you can move the file, etc.

exten => *90,1,Answer()
exten => *90,n,Playback(beep)
exten => *90,n,Record(/data/tmp/greeting:alaw,,60)
exten => *90,n,Wait(0.5)
exten => *90,n,Playback(/data/tmp/greeting)
exten => *90,n,Hangup()

This is pretty straightforward - it's in the book: Asterisk, the future of telephony. Google it and get the PDF, or buy the dead tree version.

At the meeting you metioned a mobile phone GSM pad for around £100 or a
standard moblie phone that accepted a USB to allow servers to send text
messages. If you have a URL for the above please can you forward them to me.

It was rs232, not USB, although I guess a usb serial adapter might work:

http://www.discountphonesystems.co.uk/acatalog/Telecom_FM_Fixed_Cellular_Terminals.html

Gordon
-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html