HI . I write custom function which calls extention from C code. It works fine but I believe it’s buggy. what is your comment?
int i;
for (i = 1;; i++) {
int status = ast_exists_extension(chan, ast_channel_context(chan), exten, i, ast_channel_exten(chan));
if (status != 0) {
ast_spawn_extension(chan, ast_channel_context(chan), exten, i, ast_channel_exten(chan), 0, 0);
} else {
break;
}
}