IVR front end application

I need to create an IVR-type front-end interface, where the dialplan plays prompts and accepts digits, and sends/receives packets to/from remote appliances using a binary socket. What is best practice for this sort of thing?

There’s nothing built in for arbitrary sending/receiving of packets so you’d need to use one of the different mechanisms Asterisk has for yielding to outside control - AGI, FastAGI, the System command. Which one is best really depends on what exactly needs to be done.

1 Like

So I could create app_customivr.c, and use ast_register_application_xml() to set up functions to communicate with the appliance? In this environment it’s possible to do socket programming? If so, is this done “normally” with socket(), select(), read(), write(), or through ast_() functions?

That would be writing your own application in C. You get handed the channel and then it’s up to you to do everything.

You can use normal socket(), select(), etc.

This is all developer stuff, whereas this is an end user forum, but you would need to call auto service start and stop, if your processing took time to run, or you would need to handle events on the channel yourself.

Most people would have used AGI or even System and a script, rather than a custom application.