NT-Mode: channel IE must be included in all cases
TE-Mode: channel IE can be omitted only if any channel is requested.
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_SETUP_REQ, DIRECTION_OUT);
/* channel information */
l3m = create_l3msg();
l1l2l3_trace_header(p_m_mISDNport, this, L3_SETUP_REQ, DIRECTION_OUT);
/* channel information */
- if (channel >= 0) /* it should */
+ if (p_m_d_ntmode || channel != CHANNEL_ANY) /* only omit channel id in te-mode/any channel */
enc_ie_channel_id(l3m, exclusive, channel);
/* caller information */
plan = 1;
enc_ie_channel_id(l3m, exclusive, channel);
/* caller information */
plan = 1;
add_layer3_ie(l3m, p[0], p[1], p+2);
} else {
/* PRI */
add_layer3_ie(l3m, p[0], p[1], p+2);
} else {
/* PRI */
- if (channel == CHANNEL_NO) /* no channel */
- return; /* IE not present */
- if (channel == CHANNEL_ANY) /* any channel */ {
+ if (channel == CHANNEL_NO || channel == CHANNEL_ANY) {
+ if (channel == CHANNEL_NO)
+ channel = 0;
+ else
+ channel = 3;
l = 1;
p[0] = IE_CHANNEL_ID;
p[1] = l;
l = 1;
p[0] = IE_CHANNEL_ID;
p[1] = l;
- p[2] = 0x80 + 0x20 + 0x03;
+ p[2] = 0x80 + 0x20 + channel;
add_layer3_ie(l3m, p[0], p[1], p+2);
return; /* end */
}
add_layer3_ie(l3m, p[0], p[1], p+2);
return; /* end */
}