if (icd_caller__has_role(that, ICD_AGENT_ROLE)) { if (!icd_caller__get_onhook(that)) { result = ast_streamfile(that->chan, "beep", that->chan->language); if(icd_caller__get_acknowledge_call(that)) { if(icd_bridge_wait_ack(that) < 0) { //... } } if (!result) result = ast_waitstream(that->chan, AST_DIGIT_ANY); } }