Send REFER event to external system

Hello! I’m interacting with Asterisk via ARI using the asyncari library for python. I am connected via PJSIP trunk to an external system. When an incoming call arrives, I process it in a python application that is connected to stasis, and make a decision to transfer the call to another external number. I need to exit stasis and somehow transmit the refer event to the external system so that the external system will already forward it call to another number. Please tell me how to do this correctly?

On an answered call the Transfer dialplan application[1] or the redirect route[2] will perform a REFER. Once done the call is no longer in Asterisk.

[1] Transfer - Asterisk Documentation
[2] Channels - Asterisk Documentation

1 Like

Redirect route worked, thank you very much!

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