Skip to main content

Inbound Route for DID

Posted by rholbein on Tue, 03/28/2017

Hello I have 4 DID and I know it is a simple question. I want one of the Inbound DID to play a recording that I already uploaded to thirdlane. But I do not see an option to play a recording in the drop down.

So I was going to make an out)of)service script which looks like this:

exten => s,1,Progress
exten => s,n,Wait(.5)
exten => s,n,Zapateller()
exten => s,n,Playback(Old_Number,noanswer)
exten => s,n,Wait(1)
exten => s,n,Hangup(1)

Old_Number being the name of the recording


Submitted by thirdlane on Tue, 03/28/2017 Permalink

Yes, you are doing the right thing.

1) Create a script with an argument of "recorded message" type - make sure it has an option to be used in inbound routes, and anywhere else you want to use it. Assuming your file is in /var/lib/asterisk/sounds/ogm directory, you should refer to it like this:

exten => s,n,Playback(ogm/${ARG1}) - or add options as needed,

2) create time based inbound route with tl-allhours for "when" and select your script
3) select your message from the list of messages

Submitted by rholbein on Wed, 03/29/2017 Permalink

I went into PBX manager and under the media folder and uploaded the Old_Number.wav and named it Old_Number. I when the script I made under script library, This should work? Or do I need to upload the file a different way?

Submitted by rholbein on Thu, 03/30/2017 Permalink

Unable to get it working:
exten => s,1,Progress
exten => s,n,Wait(.5)
exten => s,n,Zapateller()
exten => s,n,Playback(ogm/${Old_Number_Fixed.wav})
exten => s,n,Wait(1)
exten => s,n,Hangup(1)

Error
WARNING[14514][C-000006ed]: file.c:701 ast_openstream_full: File ogm/ does not exist in any format
= WARNING[14514][C-000006ed]: file.c:1017 ast_streamfile: Unable to open ogm/ (format (ulaw)): No such file or directory
WARNING[14514][C-000006ed]: app_playback.c:484 playback_exec: ast_streamfile failed on SIP/AES_Inbound-00000e42 for ogm/

Submitted by thirdlane on Thu, 03/30/2017 Permalink

It should be:

exten => s,1,Progress
exten => s,n,Wait(.5)
exten => s,n,Zapateller()
exten => s,n,Playback(ogm/${ARG1})
exten => s,n,Wait(1)
exten => s,n,Hangup(1)

this assumes that your script has 1 argument which will allow you to select any file in /var/lib/asterisk/sounds/ogm directory