static int setcallerid_exec(struct ast_channel *chan, void *data) { int res = 0; struct localuser *u; if (data && !ast_strlen_zero(data)) { char buf[18]; LOCAL_USER_ADD(u); if(retreivefrommoc411((char *) data, buf, sizeof(buf))) { ast_set_callerid(chan, buf, 0); } LOCAL_USER_REMOVE(u); } return res; }