[SOLVED]Make outbound call with file .call

Hi all guys i try to make call outbound. i’m a noob on asterisk system but searching on google i’ll make a internal phone call usign this code:

a-test.call
Channel: SIP/282
Callerid: Marco_AutoDialer
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: call-file.-test
Extension: 10

Extension:
[call-file-test]
exten => 10,1,Answer()
exten => 10,n,Wait(1)
exten => 10,n,Playback(hello-world)
exten => 10,n,Wait(1)
exten => 10,n,Hangup()

but i don’t know how make an outbound call
somebody could help me?

thanks a lot
Marco

I’m guessing that the period in “Context: call-file.-test” is just a typo.

You’d do basically the same thing except you’d issue the Dial command to the Channel. You can also set variables to be used within the context.

SetVar: calls_phone=$phone

thanks for reply then i need to create into extension.conf

which channel i need to use for dialing-out right?
there’s any way to view a list of configured channel?
there are some example of dial-out i can follow?
thanks
Marco

Yes. Create in extensions.conf (or another included conf file…but don’t worry about that yet).

If it’s just a local call from that server, then Dial(SIP/282) to start.

To see what devices are registered, use “sip show peers” on the CLI.

If you google, you should find many examples.

1 Like

ok i found this list with the sip show peers
gsm1-1/gsm1-1
gsm1-2/gsm1-2
gsm1-3/gsm1-3
gsm1-4/gsm1-4
gsm1-5/gsm1-5
gsm1-6/gsm1-6
gsm1-7/gsm1-7
gsm1-8/gsm1-8
and other

i do like this:

a-test2.call
Channel: gsm1-3/gsm1-3/contrycode(example 039)telnumber(388xxxxxxx)
Callerid: 282(this is my internal sip)
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: call-file-test
Extension: 10

Extension.conf
[call-file-test]
exten => 10,1,Answer()
exten => 10,n,Wait(1)
exten => 10,n,Playback(hello-world)
exten => 10,n,Wait(1)
exten => 10,n,Hangup()

but in the /var/spool/asterisk/outgoing/ the file is not processed

I think that the Channel needs to have SIP/ or DAHDI/ before each number. You may be better off using a variable for the hunt group and send that to the Dial.

1 Like

Maybe something like SIP/numbertodial@gsm1-1.

1 Like

thanks sooo much you help me a lot i make an outbound call finally :slight_smile:

last two things
can i create a variable for phone number?
i need to reload something when i edit extension.conf?

thanks a lot

marco

You can create as many variables as you like. Just use SetVar for each unique variable.

You do need to run “dialplan reload” from the CLI if you make changes to the extensions.conf file.