static int has_diversion_reason(pjsip_rx_data *rdata) { pjsip_param *reason; pjsip_fromto_hdr *hdr = get_diversion_header(rdata); return hdr && (reason = get_diversion_reason(hdr)) && !pj_stricmp2(&reason->value, SEND_TO_VM_REDIRECT_VALUE); }
static int has_diversion_reason(pjsip_rx_data *rdata) { pjsip_param *reason; pjsip_fromto_hdr *hdr = get_diversion_header(rdata); if (!hdr) { return 0; } reason = get_diversion_reason(hdr); return reason && (!pj_stricmp2(&reason->value, SEND_TO_VM_REDIRECT_QUOTED_VALUE) || !pj_stricmp2(&reason->value, SEND_TO_VM_REDIRECT_VALUE)); }