freetdm: wait for state change to be cleared when placing outgoing calls

this fixes a race where the call is hangup even before the state
         DIALING is processed and therefore the HANGUP state change is
         ignored.
This commit is contained in:
Moises Silva 2010-11-25 09:35:14 -05:00
parent 6a9a27b791
commit 75bd564210
1 changed files with 2 additions and 0 deletions

View File

@ -2270,6 +2270,8 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_place(const char *file, const char
UNREFERENCED_PARAMETER(line);
#endif
ftdm_wait_for_flag_cleared(ftdmchan, FTDM_CHANNEL_STATE_CHANGE, 100);
ftdm_channel_unlock(ftdmchan);
return status;