Changing the event flag of Newexten AMI event

This requires a change in the C code. Please read and if there are more people interested in this please go to the follwing link and add to the request.

Currently the event flag for the “Newexten event” is set to EVENT_FLAG_CALL. It generates a lot of events that are not always needed, especially with big and complex dialplans. I was trying to turn it off to minimize the events send but there is no way since it is the same flag used for “real call” events.

I suggest we create another event flag called EVENT_FLAG_DIALPLAN or EVENT_FLAG_EXTEN and replace it wiht this so we can seperate it from the real call events and subsribe to it seperatly.

Does it make sense?
It is only located in 2 places. “pbx.c” and “pbx realtime.c” :

manager_event(EVENT_FLAG_CALL, “Newexten”,
“Channel: %s\r\n”
“Context: %s\r\n”
“Extension: %s\r\n”
“Priority: %d\r\n”
“Application: %s\r\n”
“AppData: %s\r\n”
“Uniqueid: %s\r\n”,
c->name, c->context, c->exten, c->priority, app->name, passdata ? passdata : “(NULL)”, c->uniqueid);

We would also have to add it to to manager.c :

static struct permalias {
int num;
char *label;
} perms[] = {
{ EVENT_FLAG_SYSTEM, “system” },
{ EVENT_FLAG_CALL, “call” },
{ EVENT_FLAG_LOG, “log” },
{ EVENT_FLAG_VERBOSE, “verbose” },
{ EVENT_FLAG_COMMAND, “command” },
{ EVENT_FLAG_AGENT, “agent” },
{ EVENT_FLAG_USER, “user” },
{ -1, “all” },
{ 0, “none” },