Extensions_additional.conf how to edit it and the consequences of the changes

I’ve made changes to the file
/etc/asterisk/extensions_additional.conf

Obviously every time I use the graphical interface are deleted

how can I do?

here is the block to recreate, specifically the line is the one that deals with the “CURL”

[play-system-recording]
include => play-system-recording-custom
exten => 1,1,Answer
exten => 1,n,Playback(custom/invito-a-conferenza)
exten => 1,n,Hangup

exten => 10,1,Answer
exten => 10,n,Set(result=${CURL(http://192.168.17.246/ergotel/invmail.php?num=${CALLERID(number)})})
exten => 10,n,Playback(custom/ringraziamento-sul-richiamo)
exten => 10,n,Hangup

Don’t do that. Put them in extensions_custom.conf if you aren’t overwriting an existing context. If you are overwriting an existing context, put the in extensions_freepbx_override.conf (double check my spelling on that last one - the ‘override’ part is the piece you need).

do what you say I do not find it
I found: /etc/asterisk/extensions_override_freepbx.conf

In fact I must add:
exten => 10, n, Set (risultato = $ {CURL ( http://192.168.17.246/ergotel/invmail.php?num=${CALLERID(numero) })}
I do not think it’s okay to just move the line …?

[play-system-recording]

exten => 10,n,Set(result=${CURL(http://192.168.17.246/ergotel/invmail.php?num=${CALLERID(number)})})

I tried to include this code in: /etc/asterisk/extensions_override_freepbx.conf

but nothing…

found the file to edit is:
/etc/asterisk/extensions_override_freepbx.conf

and the code to enter is:

[Play-system-recording]
exten => 10.1, Answer
exten => 10, n, Set (result = $ {CURL (http://192.168.17.246/ergotel/invmail.php?num=$ {CALLERID (number)}}}}
exten => 10, n, Playback (custom / thank-on-call)
exten => 10, n, hangup

But everything else remains unchanged ???
That is, in that field the other elements continue to function as if nothing was ???

here is the rest in the /etc/asterisk/extensions_additional.conf file

[play-system-recording]
include => play-system-recording-custom
exten => 1,1,Answer
exten => 1,n,Playback(custom/invito-a-conferenza)
exten => 1,n,Hangup

exten => 10,1,Answer
exten => 10,n,Playback(custom/ringraziamento-sul-richiamo)
exten => 10,n,Hangup

exten => 2,1,Answer
exten => 2,n,Playback(custom/messaggio_standard_gratuito)
exten => 2,n,Hangup

exten => 3,1,Answer
exten => 3,n,Playback(custom/ci-scusiamo-per-l-attesa)
exten => 3,n,Hangup

exten => 4,1,Answer
exten => 4,n,Playback(custom/msg-cv-ergosol-2015)
exten => 4,n,Hangup

exten => 5,1,Answer
exten => 5,n,Playback(custom/msg-opa-1-liv-ergosol-rifatto)
exten => 5,n,Hangup

exten => 6,1,Answer
exten => 6,n,Playback(custom/msg-notte-ergosol–rif)
exten => 6,n,Hangup

exten => 7,1,Answer
exten => 7,n,Playback(custom/15)
exten => 7,n,Hangup

exten => 8,1,Answer
exten => 8,n,Playback(custom/msg-public-rif)
exten => 8,n,Hangup

exten => 9,1,Answer
exten => 9,n,Playback(custom/premere-5-per-richiamare)
exten => 9,n,Hangup

;–== end of [play-system-recording] ==–;

maybe there is a better way to do all this?

Put your code in a context called play-system-recording-custom in the -custom file.

[play-system-recording-custom]
exten => 10,1, Answer

I noticed that all of your commas are periods. That might have something to do with the thing not working…

I did not explain it well
now it only works that I would like to understand better …
having done so basically I just changed this period leaving the rest intact right?
exten => 10.1, Answer
exten => 10, n, Set (result = $ {CURL (http://192.168.17.246/ergotel/invmail.php?num=$ {CALLERID (number)}}}}
exten => 10, n, Playback (custom / thank-on-call)
exten => 10, n, hangup

right?

another thing that is not clear to me … what are the differences between these files?
extensions_additional.conf
extensions.conf
extensions_custom.conf
extensions_override_freepbx.conf

The period was definitely wrong. I can’t speak to the quality of the rest of the code. Spelling, punctuation, and capitalization all count here.

The system sets up the extension configuration by processing the following files in (basically) this order:

extensions_override_freepbx.conf (user managed)
extensions.conf (FreePBX managed)
extensions_additional.conf (FreePBX managed)
extensions_custom.conf (user managed)

If a context is established in one of these files, the subsequent context will not be defined (you get a “cannot redefine context error”). There’s no differences between the files - they are parts of a larger extensions configuration file set. The extensions.conf file is basically the traffic cop that calls out to each of the other files so that the order of the definitions is consistent. The other three are where the work gets done. The file extensions_additional.conf is managed by FreePBX. Any changes you make to this file while it’s “at rest” will be overwritten any time you update the system.

The other two files are managed by you. The “override” file is interpreted first to allow you to change the default contexts to do something you want them to do. The “custom” file is interpreted last to allow you to define new features.