How to add a function to dialplan?

// for examples :

// extensions.conf

exten => 123,1,Answer()
exten =>123,n,Fnn()
exten =>123,n,Hangup()

// end

If I add a Fnn function , I want the function execute .

How to do ?

Any help ?

Actually, if you are doing like you wrote, you’ll be executing an application.

Take a look at the following documentation to help you clarify your mind.

Applications: … n+commands


Dialplan functions have the following basic syntax:
You reference a function’s name the same way as a variable’s name, but you reference a
function’s value with the addition of a dollar sign, an opening curly brace, and a closing
curly brace:
Functions can also encapsulate other functions, like so:

exten => 123,1,NoOp()
same => n,Set(TEST=example)
same => n,Playback(silence/1)
same => n,SayNumber(${LEN(${TEST})})