Open WhiteyDude opened 5 years ago
Yes the issue is you are trying to send to sip:100@127.0.0.1
, which looks like a loop to the drachtio server.
The code you have is basically fine, and would work if you were sending for instance out a sip trunk. Is there a reason you want to send the INVITE in a loop?
Thanks Dave, that's what I suspected!
Drachtio is acting as a PBX and a UAC in this scenario. We have a trunk on the edge to take inbound and outbound calls.
In this instance, I want drachtio to initiate and INVITE out to the trunk. However I wish to trigger this invite from an external application.
So the first drachtio application (the UAC, example above) sends an INVITE to drachtio-server. There is a second drachtio application listening for INVITE requests. This creates a media endpoint and creates a second INVITE out via the trunk. Once answered, the two endpoints are bridged and playback, user input etc is done on the second endpoint.
I hope I've explained this right. The basic flow is:
Exposed web API -> Drachtio UAC instance -> Drachtio Server -> Drachtio "PBX" instance -> Trunk
Hi Dave,
I have a scenario where I need to programatically generate a new call. I'll likely wrap this in sinatra or similar.
I've built a quick PoC like this:
And called it directly from the console. However I get thrown:
I'm assuming this is something built into drachtio server to ensure we don't get caught in a loop scenario. What would you recommend is the best way to "cold initiate" a call like this?
Thanks!