i am trying to make a extensions_custom.conf custom file which when a number(external) call this number it will create a new simulated call with this specific number( as caller id) and call a specific extension
which will remain active until the end user terminates the call
Although you canāt āsimulateā a call, you can easily create a call with ācall.filesā (dozens of examples here and on google) variables you can set include:-
Channel: <channel> - The channel to use for the new call, in the form technology/resource as in the Dial application. This value is required.
Callerid: <callerid> - The caller id to use.
WaitTime: <number> - How many seconds to wait for an answer before the call fails (ring cycle). Defaults to 45 seconds.
MaxRetries: <number> - Number of retries before failing, not including the initial attempt. Default = 0 e.g. donāt retry if fails.
RetryTime: <number> - How many seconds to wait before retry. The default is 300 (5 minutes).
Account: <account> - The account code for the call. This value will be assigned to CDR(accountcode)
.
.
.
Context: <context> - The context in the dialplan
Extension: <exten> - The extension in the specified context
Priority: <priority> - The priority of the specified extension; (numeric or label)
Setvar: <var=value> - You may also assign values to variables that will be available to the channel, as if you had performed a Set(var=value) in the dialplan. More than one Setvar: may be specified.
.
You can also write an inbound context that does, step-by-step, what you outline in your question. This is relatively deep magic, so youāll have to study up on Asterisk context writing, but it is most certainly doable.
There are lots of examples of āORIGINATEā to start a call in a context, and once you get the call started, youāll want to bridge the calls together.
Like I said, this is Deep Magic and would probably be best handled by people that do this professionally. Have you reached out to Sangoma to see what it would cost to do this for you?