Transfer per ARI

Hi, I have a scenario where I make a call through ARI, and through WS I collect information on whether the call was answered, and finally, I want to transfer it to the internal number 1001.
After sending such a request:

I receive an error:
Channel not in Stasis application

Is a different flow required to perform the transfer?

You’ll need to say what “make a call through ARI” actually means for your usage, and show what the channel is actually doing. For many things in ARI you can only control it while in ARI. As well if by “transfer” you mean send the call into a dialplan application, then that is done differently using “continue” but does also require the channel to be in ARI.

I make a call through ARI - I mean sending a request:

then Asterisk establishes a connection with the mobile phone.

By transfer, I mean redirecting the received call from my mobile phone to extension 1001.

You can not do so from ARI. The channel is not in ARI.

Is there any known solution for performing such a transfer?

You can do it from AMI using the Redirect AMI action.

Okay, just out of curiosity - ARI doesn’t support REFER, right?
Could I use continueInDialplan and then create a context in the dialplan for transfer?

This goes back to, the channel has to be in the ARI application. If you change your channel create to NOT go into the dialplan but instead the ARI application, then you can use continue to send it into the dialplan, or use redirect to initiate a SIP level transfer.

As I’ve stated before though, the channel must be in the ARI application.

Okay, I’m not using the dialplan now, just the ARI application. After sending a request to Redirect, I receive a 204 No Content response. I don’t see any description of this error in the documentation or information on what content I should send.

It’s not an error. It’s success.

the code is marked as successful, but there are no actions in the Asterisk logs. This is the case both in sngrep and in log/asterisk/full.

ok i see in sngrep 603 Declined (policy)
I’ll keep checking, thank you for the help.

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