Inbound calls with stasis and php

I have a PHP application which makes outbound calls via ARI using Stasis. Now I want to do a similar thing for inbound calls. I want the call managed via stasis, but not sure how to trigger the application to register with stasis when an inbound call comes in. I don’t want to have a daemon process constantly registered with stasis, instead I’d like to have the dialplan spawn a new PHP application instance and have it take over the call. Would that be possible?

ARI expects something to be running as the application when a channel enters it. There’s nothing inherently built in to spawn a process, wait for it to connect, then send it on. You’d need to build that yourself using something like AGI.

I can manage the spawning of necessary process handlers on PHP side, but I still don’t have a way to move a channel to that process after it’s been spawned, because the ARI move command expects the channel to already be in stasis, but I don’t have a way to put it there before the dialplan spawns the application worker…

AGI and EXEC command could trigger the statis app

Care to elaborate? I don’t quite understand how EXEC would make this work. From what I can see it’s just a way to trigger asterisk applications.
I’m currently using System() to trigger my PHP application via a shell command, it registers a stasis app, but by the time it does that I don’t see how the incoming channel can be sent to that app.

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