diff options
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r-- | res/res_pjsip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 0fc5346bd..171f383f7 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -2711,7 +2711,11 @@ pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? ";transport=" : "", (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? pjsip_transport_get_type_name(type) : ""); +#ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK + *status = pjsip_dlg_create_uas_and_inc_lock(pjsip_ua_instance(), rdata, &contact, &dlg); +#else *status = pjsip_dlg_create_uas(pjsip_ua_instance(), rdata, &contact, &dlg); +#endif if (*status != PJ_SUCCESS) { char err[PJ_ERR_MSG_SIZE]; @@ -2724,6 +2728,9 @@ pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, dlg->sess_count++; pjsip_dlg_set_transport(dlg, &selector); dlg->sess_count--; +#ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK + pjsip_dlg_dec_lock(dlg); +#endif return dlg; } |