Asterisk 13 - ARI - Forward a call

Hello,
Is the channel’s redirect supposed to forward a call or should I implement it using originate and handling bridge management ?

It depends on what you mean by “forward”. The redirect action does a protocol level redirect (such as a 302 in the case of SIP or a REFER). If you want to keep it on the same system then it’s up to you, which would involve an originate and bridge.

I am not sure I understand your question. The call needs to be forwarded to a different phonenumber or ip address.

My scenario is:

  • Agent Fabio called number 11111111 (PJSIP/11111111@proxytrunk)
  • Agent Fabio called number 2222222 (PJSIP/2222222@proxytrunk)
  • Then number 11111111 answers the call and start talking to Fabio
  • Then number 2222222 answers the call but Fabio is busy now. So this channel belonging to 2222222 will need to be forwarded to a different phonenumber or IP.

I know how to do it using originate and bridges, but the redirect might be usefull in case it fits my needs.
Does my scenario answers your question?

You are confusing ChannelRedirect with Transfer.

Of course the other confusion is that people use Forward and Transfer loosely.

Fabio couldn’t have made the call to 222222 if he was busy, although he could do it if a line was in use.

ChannelRedirect is a forced dialplan goto. If it is issued on something not currently in the PBX, it will be in the PBX after it is issued.

Assuming you can actually determine that Fabio is not going to monitor his second line, a ChannelRedirect on the channel connected to 22222 will clear down Fabio’s second line and then jump 22222 to the dialplan that calls the new destination. I’m not sure what happens if 22222 has not answered, as that is different from an incoming call.

1 Like

Hi David, just to make things clear I will comment on your answer and then make a summary:

Fabio couldn’t have made the call to 222222 if he was busy, although he could do it if a line was in use.

In fact this is how my system works. When “Fabio” called 222222, he wasn’t busy yet. This Agent can fire many originates but he will talk to the first one that answers the call. The other calls will be put on hold (this already works this way). What I am doing now is to implement a forward call in case the call was put on hold (222222).

ChannelRedirect is a forced dialplan goto. If it is issued on something not currently in the PBX, it will be in the PBX after it is issued.

It sounds like a channel continue too right? So it isn’t what I am looking for. I needed to transfer that call (starting a new call to a pre-configured number/ip.address)

So, can I assume redirect is not to transfer/forward a call as I explained in my scenario?

No, it is not for that. You have to implement what you want to do.

1 Like

ok, thanks a lot for your confirmation

That was rather important information than needed to have been in the original question.

It sounds like the system is calling the outside party, and then calling Fabio when they answer. The calls to Fabio are effectively incoming calls, so could be handled the same way as a real incoming call that found Fabio busy.