How to run System() in dialplan in the background on Asterisk/FreePBX

In Asterisk, a System() command like

exten => 123456,n,System(mycommand)

will generally run in the foreground, i.e. Asterisk will wait until the command is finished before continuing with the Dialplan.

However, just like in any normal Linux shell, you can add a & to the end to run the command in the background:

exten => 123456,n,System(mycommand &)