+ /* callref from nt-lib */
+ if (p_m_d_ntmode)
+ {
+ /* nt-library now gives us the id via CC_SETUP */
+ if (dinfo&(~0xff) == 0xff00)
+ {
+ PERROR("fatal software error: l3-stack gives us a process id 0xff00-0xffff\n");
+ exit(-1);
+ }
+ l3_trace_header(CC_NEW_CR | INDICATION, DIRECTION_IN);
+ if (p_m_d_l3id)
+ add_trace("callref", "old", "0x%x", p_m_d_l3id);
+ add_trace("callref", "new", "0x%x", dinfo);
+ end_trace();
+ if (p_m_d_l3id&(~0xff) == 0xff00)
+ p_m_mISDNport->procids[p_m_d_l3id&0xff] = 0;
+ p_m_d_l3id = dinfo;
+ p_m_d_ces = setup->ces;
+ }
+
+ l3_trace_header(prim, DIRECTION_IN);
+ dec_ie_calling_pn(setup->CALLING_PN, (Q931_info_t *)((unsigned long)data+headerlen), &calling_type, &calling_plan, &calling_present, &calling_screen, (unsigned char *)p_callerinfo.id, sizeof(p_callerinfo.id));
+ dec_ie_called_pn(setup->CALLED_PN, (Q931_info_t *)((unsigned long)data+headerlen), &called_type, &called_plan, (unsigned char *)p_dialinginfo.number, sizeof(p_dialinginfo.number));
+ dec_ie_keypad(setup->KEYPAD, (Q931_info_t *)((unsigned long)data+headerlen), (unsigned char *)keypad, sizeof(keypad));
+#ifdef CENTREX
+ /* te-mode: CNIP (calling name identification presentation) */
+ if (!p_m_d_ntmode)
+ dec_facility_centrex(setup->FACILITY, (Q931_info_t *)((unsigned long)data+headerlen), (unsigned char *)p_callerinfo.name, sizeof(p_callerinfo.name));
+#endif
+ dec_ie_useruser(setup->USER_USER, (Q931_info_t *)((unsigned long)data+headerlen), &useruser_protocol, useruser, &useruser_len);
+ dec_ie_complete(setup->COMPLETE, (Q931_info_t *)((unsigned long)data+headerlen), &p_dialinginfo.sending_complete);
+ dec_ie_redir_nr(setup->REDIR_NR, (Q931_info_t *)((unsigned long)data+headerlen), &redir_type, &redir_plan, &redir_present, &redir_screen, &redir_reason, (unsigned char *)p_redirinfo.id, sizeof(p_redirinfo.id));
+ dec_ie_channel_id(setup->CHANNEL_ID, (Q931_info_t *)((unsigned long)data+headerlen), &exclusive, &channel);
+ dec_ie_hlc(setup->HLC, (Q931_info_t *)((unsigned long)data+headerlen), &hlc_coding, &interpretation, &presentation, &hlc, &exthlc);
+ dec_ie_bearer(setup->BEARER, (Q931_info_t *)((unsigned long)data+headerlen), &bearer_coding, &capability, &mode, &rate, &multi, &user);
+ end_trace();
+