Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Used some clearer language in some parts.

...

Asterisk will rarely ever directly place outbound calls without going through the dialplan. When Asterisk A receives the REFER request from Bob, Asterisk does not immediately send an INVITE with Replaces header to Server B. Instead, Asterisk A looks for a specifically-named extension called "external_replaces". Asterisk searches for this extension in the context specified by the TRANSFER_CONTEXT channel variable if present on Bob's channel, or . If TRANSFER_CONTEXT is not specified, then Asterisk searches for the extension in Bob's endpoint's configured context otherwisesetting. Once in the dialplan, it is the job of the dialplan writer to determine whether to complete the transfer or not.

...

The big reason why Asterisk calls into the dialplan instead of automatically sending an INVITE to the Refer-To URI is for security purposes. If Asterisk automatically sent an INVITE out without going through the dialplan, there are chances that transfers could be used to place calls to destinations that would result in large chargesunwanted destinations that could, for instance, charge you a lot of money for the call.

Writing your external_replaces extension

...