Added check_dahdi function