DTMF Collection using Event response message system
#include <esl.h> #include <cstring> int main() { char *s,*v; esl_handle_t handle = {{0}}; esl_event_t *event; char l_callerUniqueId[1000]; esl_connect(&handle, "localhost", 8022, NULL, "ClueCon"); esl_events(&handle, ESL_EVENT_TYPE_PLAIN, "all"); printf("event is %s \n", handle.last_sr_event); esl_send_recv(&handle, "api originate {origination_caller_id_number=2010,originate_timeout=3000}sofia/internal/2009%172.18.1.221 2009\n\n"); if (handle.connected && handle.last_sr_event) { esl_event_dup(&event, handle.last_sr_event); event =(esl_event_t *) malloc( sizeof(esl_event_t)); } // strcpy(l_callerUniqueId, esl_event_get_header(handle.info_event, "caller-unique-id")); // const char* cuuid = esl_event_get_header(event, "core-uuid"); // esl_f...