Can I use a .call file to make an outbound call?

I want to create .call files to make outbound calls that play a message to the recipient. I’ve got this working internally like this:

Channel: SIP/104
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Application: Playback
Data: custom/MyMessage

That dials my extension (104) and plays the message. But I can’t figure out how to make it dial an external number.
I’ve tried using “Channel: SIP/5551112222#” but that doesn’t work. I also tried “Channel: my_trunk_name/5551112222”. I get “Unable to request channel my_trunk_name/5551112222” in the log file.

Also I need to tell it to go through a specific trunk, if possible. Thanks for any help.

Use TECH/TRUNK/NUMBER, for example SIP/provider1/number.

Cheers.

Marco Bruni

I have had good luck with

SIP/NUMBER@Provider

mbruni that worked great, thank you for your help.

Is it possble to run more than one Application from a .call file? I need to capture what happened with the call and update a database with that information. I was going to use System() or something similar to send the data to a perl script which would then insert it into a database. But I have found that I can only run one Application command.

You could send a call to an extension in the dial plan and do all you want with it there.

For Example

SIP/NUMBER@provider
MaxRetries: 1
RetryTime: 20
CallerID: 
WaitTime: 20
Context: outboundmsg001
Extension: 800
Priority: 1

Then you could set up the extension to do the playback and populate the database.

Hope that help.

Thank you, I will try that.

I use Trixbox/FreePBX, I don’t know much about editing the files directly.

I added this in extensions_custom.conf:

[ext-local]
exten => 601,1,Wait(1)
exten => 601,2,Playback(custom/MainMenuLive)
exten => 601,3,Wait(1)
exten => 601,4,Hangup

Then did a “service asterisk reload”.

But in my testing, when I dial extension 601 I get a message that its not a valid extension. I wasn’t sure what context to put it under, so I just used ext-local which is the one I see is used for my regular extensions in extensions_additional.conf.

Sound like you have a context problem. Not sure without more debug output but sounds like the phone you are calling from can not see the context you are dialing.

Sorry I do not know much about Trixbox/FreePBX. Perhaps other can help.