Simulate a call

Hello to all, i need some help

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

Thanks to all!

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.
    .
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files
1 Like

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.

Hello, can you give me an example of the structure of the command?

Thanks a lot!

Google is your friend here.

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?

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.