How to make outgoing calls

I had a file.call script that made calls with my provider, now after the Asterisk 21 update it no longer works with the pjsip channel

OK. What kind of errors are you seeing? Do you have any logs of a failed call? Did it work with chan_pjsip before? We need details and data in order to help.

1 Like

Channel: SIP/18.10.44.244/901010101
Application: Playback
Data: alerta
MaxRetries: 3
RetryTime: 60
WaitTime: 3

quando jogo dentro do arquivo outgoing o asterisk21 infoma que não tenho permissão para executar essa ação, mesmo fazerndo com quê o arquivo esteja no mesmo grupo ou tenha tornado executável via comando ou até mesmo via “chmod -R 7777”

That is the tech prefix for chan_sip. You need to update your call file to use the proper format for chan_pjsip.

That’s using chan_sip, which has been completely removed, starting from Asterisk 21.

chan_pjsip needs an endpoint defining. Either that endpoint can be pointed at 18.10.44.244, and you can use PJSIP/9010101@endpoint, or if you want it to be dynamic, I think you have to use PJSIP/endpoint/[email protected], with the endpoint defining transports, codecs, etc.

Tem alguns exemplos que eu possar usar aqui, porquê de qualquer forma, o asterisk21 não deixar ou dar permissção para executar esse script internamente.

This is call file, not a script. I suspect it has to be owned by the Asterisk user, for Asterisk to be able to manipulate its dates, and that might be your permission problem, but you should have provided the actual error message.

It’s going to fail because of the obsolete channel driver, and that was the most obvious error, which is why two people pointed it out.

Also chmod 7777 is even more dangerous than chmod 777, and neither should ever normally be a valid thing to do. I’m pretty sure that 7777 makes a privilege escalation to the asterisk user easy.

English please.

There are some examples that I can use here, because in any case, asterisk21 does not allow or give permission to run this script internally.

Regarding the originate command or condition, are there examples that can help me?

What does condition mean here?

Note this uses chan_sip dial strings.

If you really meant using a call file, Asterisk auto-dial out - VoIP-Info might help.

Thanks, but it didn’t work

Do you have a server running on

172.0.0.1

? :wink:

1 Like

In fact I have two servers, an Asterisk 13 running and the file being played within Outgoing works perfectly, however when I did this new installation of freepbx with Asterisk 21, I no longer have permission to carry out these executions by copying the file into the OUTgoing directory of asterisk 21. Is there any type of permission unique to the application to be able to execute it?

Have you fixed the script to use the correct tech prefix? What errors are being returned?

file.call below:

Channel: SIP/187.111.111.244/991114111
Application: Playback
Data: alerta
MaxRetries: 3
RetryTime: 60
WaitTime: 30

This is the configuration file that I can send in Asterisk 13 outgoing and it works, but when I try to copy it to run in Asterisk 21 it gives this error screen.

chan_sip has been deprecated for some time, and was finally removed in Asterisk 21. You need to use chan_pjsip configurations and chan_pjsip dial strings.

1 Like

I have also done the test with the updated parameters with channel pjsip/186.111.111.244 and this same parameter does not work in Asterisk 21 whenever I try to execute the file it says that I do not have permission.

Use the FreePBX internals to make calls, and you don’t have to think about sip drivers or asterisk. As long as you can dial a number to another extension or thru an outbound route, then you can use the local channels for everything

Channel: Local/901010101@from-internal
Application: Playback
Data: alerta
MaxRetries: 3
RetryTime: 60
WaitTime: 3
1 Like