Hi,
I’m writing my own module and have a situation where I need to connect two endpoints in response to an event. I have the custom event tied into my module and I know my endpoints that I need to connect but it’s not clear to me how to set up this connection.
It appears that I cannot (or at least don’t want) to set up this connection on the thread the event came in on as that stalls other events from coming in. I think I need to create a new thread and session then use switch_ivr_originate and bridge the two. That however seems easier said than done, so I must be missing something.
Switch_thread_create looks fairly straight forward but in the examples of it they all are used in situations where a session already exists. It’s uses the pool from that session. In the event handler I don’t have any session. I need to set the entire phone call/session up from scratch. I keep looking for a “switch_create_session” like call to setup this but that doesn’t exist. Clearly I’m going about it wrong.
Are there any examples or docs on how to do this programmatically? I’ve search and can’t find anything like this.
I’m fairly new to FS but hopefully this isn’t a total newbie question and that it makes sense. I’m excited for ClueCon, that’ll shed a lot of light on FS for me.
Kevin