I need to build a workflow which gonna look something like this:
AI assistant picks up the call -> after the initial conversation it forwards the call to the queue of real agents who gonna take it from there.
I am using RingCentral as a provider to handle agent queues, they provided me with SIP creds. Long story short, I had to use Asterisk to set up a connection with RingCentral and I am now able to route calls from Asterisk to RingCentral. I tested with a softphone app that supports SIP and it works.
Question is now how can I forward calls from VAPI to my Asterisk instance?
I tried multiple ways of providing it with the sipUri, but it always ends up with the call being hung once the transferCall function is called.
Here is what I tried (extension=10001 is the extension of the queue in RingCentral where Im trying to forward the call):
sip:username:password@asterisk-ip;extension=10001
sip:username@asterisk-ip;extension=10001 (i removed password in asterisk)
sip:username:password@asterisk-ip:5060;extension=10001
sip:username@asterisk-ip:5060;extension=10001 (i removed password in asterisk)
The call ids are:
c77b4841-e447-4194-a1fd-8fa287104dfa
9490dd94-c7dc-437e-8216-1bc9122a79ea
47880096-5aea-4517-8598-838e5f3a1eb5
1902f522-6109-4cbb-8d33-7f8d74f12f9a
Also tried to enable Asterisk debugging, but it had no effect as it seems it is never being reached by the VAPI. Logs in VAPI just mention the call is forwarded, but no additional info (e.g. error logs)
UPD: I read in other support ticket that VAPI does not support PSTN to SIP forwarding. Does it mean that the only option for me in this case is to assing a dedicated phone number for every queue I need to be able to forward to?
Thanks!