Lines Matching refs:_dialog
229 _sip_dialog_t *_dialog;
231 _dialog = (_sip_dialog_t *)dialog;
232 if (_dialog->sip_dlg_route_set == NULL ||
233 _dialog->sip_dlg_req_uri.sip_str_ptr == NULL) {
236 val = sip_get_header_value(_dialog->sip_dlg_remote_target,
242 req_uri = &_dialog->sip_dlg_req_uri;
1428 _sip_dialog_t *_dialog;
1431 _dialog = (_sip_dialog_t *)*sip_dialog;
1433 (void) pthread_mutex_lock(&_dialog->sip_dlg_mutex);
1434 _dialog->sip_dlg_msgcnt++;
1435 sip_add_log(&_dialog->sip_dlg_log[_dialog->sip_dlg_state],
1436 (sip_msg_t)sip_msg, _dialog->sip_dlg_msgcnt, SIP_DIALOG_LOG);
1437 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1456 (void) pthread_mutex_lock(&_dialog->sip_dlg_mutex);
1466 if (_dialog->sip_dlg_method == INVITE &&
1467 method == INVITE && _dialog->sip_dlg_remote_cseq != 0 &&
1468 SIP_CSEQ_LT(cseq, _dialog->sip_dlg_remote_cseq)) {
1469 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1475 if (_dialog->sip_dlg_method == INVITE && method == INVITE) {
1485 if (_dialog->sip_dlg_remote_target != NULL) {
1487 _dialog->sip_dlg_remote_target);
1489 _dialog->sip_dlg_remote_target = nchdr;
1492 _dialog->sip_dlg_remote_cseq = cseq;
1493 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1507 (void) pthread_mutex_lock(&_dialog->sip_dlg_mutex);
1508 if (_dialog->sip_dlg_state == SIP_DLG_DESTROYED) {
1509 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1512 if (_dialog->sip_dlg_state != SIP_DLG_EARLY &&
1513 _dialog->sip_dlg_state != SIP_DLG_CONFIRMED) {
1514 sip_write_to_log((void *)_dialog, SIP_DIALOG_LOG |
1517 assert(_dialog->sip_dlg_state == SIP_DLG_EARLY ||
1518 _dialog->sip_dlg_state == SIP_DLG_CONFIRMED);
1525 if (!sip_get_rtarg(_dialog, sip_msg)) {
1527 &_dialog->sip_dlg_mutex);
1530 (sip_dialog_t)_dialog,
1533 sip_dialog_terminate(_dialog,
1537 if (_dialog->sip_dlg_state == SIP_DLG_EARLY) {
1538 _dialog->sip_dlg_state =
1540 (void) sip_dlg_recompute_rset(_dialog,
1543 &_dialog->sip_dlg_mutex);
1546 (sip_dialog_t)_dialog,
1548 _dialog->sip_dlg_state);
1551 } else if (_dialog->sip_dlg_new_local_contact
1553 if (_dialog->sip_dlg_local_contact ==
1556 _dialog, SIP_DIALOG_LOG |
1560 assert(_dialog->sip_dlg_local_contact
1562 sip_free_header(_dialog->
1564 _dialog->sip_dlg_local_contact =
1565 _dialog->sip_dlg_new_local_contact;
1566 _dialog->sip_dlg_new_local_contact =
1571 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1666 _sip_dialog_t *_dialog;
1674 _dialog = (_sip_dialog_t *)dialog;
1675 (void) pthread_mutex_lock(&_dialog->sip_dlg_mutex);
1676 _dialog->sip_dlg_msgcnt++;
1677 sip_add_log(&_dialog->sip_dlg_log[_dialog->sip_dlg_state],
1678 (sip_msg_t)sip_msg, _dialog->sip_dlg_msgcnt, SIP_DIALOG_LOG);
1679 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1684 (void) pthread_mutex_lock(&_dialog->sip_dlg_mutex);
1687 if (error != 0 || _dialog->sip_dlg_method != SUBSCRIBE ||
1689 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1695 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1700 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1704 prev_state = _dialog->sip_dlg_state;
1705 if (_dialog->sip_dlg_state == SIP_DLG_CONFIRMED) {
1706 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1707 } else if (_dialog->sip_dlg_state == SIP_DLG_EARLY) {
1713 sip_write_to_log((void *)_dialog, SIP_DIALOG_LOG |
1718 _dialog->sip_dlg_state = SIP_DLG_CONFIRMED;
1723 if (_dialog->sip_dlg_type == SIP_UAS_DIALOG && _dialog->
1733 _dialog->sip_dlg_local_contact
1735 _dialog->sip_dlg_new_local_contact =
1739 (void) sip_dlg_recompute_rset(_dialog, sip_msg,
1741 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1747 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1749 } else if (_dialog->sip_dlg_state == SIP_DLG_NEW) {
1750 if (!isreq && _dialog->sip_dlg_method == SUBSCRIBE &&
1752 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1755 if (_dialog->sip_dlg_type == SIP_UAC_DIALOG) {
1758 if (_dialog->sip_dlg_on_fork) {
1759 new_dlg = sip_copy_partial_dialog(_dialog);
1762 &_dialog->sip_dlg_mutex);
1773 &_dialog->sip_dlg_mutex);
1774 SIP_DLG_REFCNT_DECR(_dialog);
1775 _dialog = new_dlg;
1777 &_dialog->sip_dlg_mutex);
1778 SIP_DLG_REFCNT_INCR(_dialog);
1796 _dialog->sip_dlg_timer)) {
1798 _dialog->sip_dlg_timer);
1802 &_dialog->sip_dlg_mutex);
1804 (void *)_dialog->sip_dlg_id,
1807 &_dialog->sip_dlg_mutex);
1813 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);
1814 if ((dialog = sip_complete_dialog(sip_msg, _dialog)) ==
1816 if (_dialog->sip_dlg_type == SIP_UAC_DIALOG && decr_ref)
1817 SIP_DLG_REFCNT_DECR(_dialog);
1821 SIP_DLG_REFCNT_DECR(_dialog);
1823 (void) pthread_mutex_unlock(&_dialog->sip_dlg_mutex);