Implement a simple call simulator/generator

Hello everyone.

For the purpose of an academic work i’m trying to implement an asterisk call generator/simulator. The general idea is to generate a certain amount of calls To an Asterisk server and with that have a demonstration of stress load on a given hardware.

now i know there’s good software out there that does this job very well but im trying to implement this on my own on a very simple way just for academic purposes, so im wondering if i can use the Asterisk Manager Interface to generate calls through a script. or should i make one script that places .call files in the /outgoing folder. im asking this because im making the generator itself another asterisk server with a trunk to the one thats being tested.

What’s the best approach?.
Using the AMI Originate() function or placing many .call files simultaneously will get me the behavior wanted?

thanks for your answers

AMI is going to be the way to go on this because the .call scenario is under control of Asterisk’s internal pbx_spool module. This will basically do “one-at-a-time” calls dependent on the number of lines you have to call on.

Thanks for your answer.

Here’s the outcome of it.

I had some trouble trying to “parse” the response events from the manager, if anyone knows a cleaner way of reading the events back (specially the OriginateResponse ones) like some external api, would be appreciated.