Author: anthm Date: Wed Feb 20 21:27:27 2008 New Revision: 7715 Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c freeswitch/trunk/src/switch_ivr_originate.c Log: have we seen the last of the Michael Myers Bug(tm)? Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Wed Feb 20 21:27:27 2008 @@ -1789,11 +1789,6 @@ } } - if (!match && greedy) { - skip++; - continue; - } - if (!match && near_match) { const switch_codec_implementation_t *search[1]; char *prefs[1]; @@ -1816,6 +1811,11 @@ match = 1; } + if (!match && greedy) { + skip++; + continue; + } + if (mimp) { char tmp[50]; tech_pvt->rm_encoding = switch_core_session_strdup(session, (char *) map->rm_encoding); Modified: freeswitch/trunk/src/switch_ivr_originate.c ============================================================================== --- freeswitch/trunk/src/switch_ivr_originate.c (original) +++ freeswitch/trunk/src/switch_ivr_originate.c Wed Feb 20 21:27:27 2008 @@ -1161,6 +1161,10 @@ done: *cause = SWITCH_CAUSE_UNALLOCATED; + if (caller_channel && !switch_channel_ready(caller_channel)) { + status = SWITCH_STATUS_FALSE; + } + if (status == SWITCH_STATUS_SUCCESS) { if (caller_channel) { switch_channel_set_variable(caller_channel, "originate_disposition", "call accepted");