diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index f8ccbd6..7111a1c 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -9885,7 +9885,19 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia "%sanswer,sofia_sla:%s", codec_str, b_private->uuid); } } else { - if (!zstr(bridge_uuid)) { + char* rep_app = NULL; + char* rep_data = NULL; + if(sip->sip_replaces->rq_url->url_params && sip->sip_replaces->rp_call_id) { + rep_app = switch_find_parameter(sip->sip_replaces->rq_url->url_params,"fs-app", switch_core_session_get_pool(session)); + rep_data = switch_find_parameter(sip->sip_replaces->rq_url->url_params,"fs-data", switch_core_session_get_pool(session)); + } + if(rep_app && rep_data) { + switch_channel_mark_hold(b_channel, SWITCH_FALSE); + tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool, "answer,%s:%s", rep_app, rep_data); + } else if(rep_app) { + switch_channel_mark_hold(b_channel, SWITCH_FALSE); + tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool, "answer,%s", rep_app); + } else if (!zstr(bridge_uuid)) { switch_channel_mark_hold(b_channel, SWITCH_FALSE); tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool, "answer,intercept:%s", bridge_uuid); } else {