git-svn-id: http://svn.openzap.org/svn/openzap/trunk@299 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale 2007-07-02 14:15:43 +00:00
parent a4942a13d6
commit f30fa1b95e
2 changed files with 15 additions and 3 deletions

View File

@ -196,11 +196,12 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen)
zchan->caller_data.raw_data_len = cplen;
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_RING);
fail = 0;
zap_log(ZAP_LOG_CRIT, "hi %s\n", zchan->caller_data.cid_num);
}
}
if (fail) {
zap_log(ZAP_LOG_CRIT, "FIX ME!\n");
zap_log(ZAP_LOG_CRIT, "FIX ME! %s\n", zap_channel_state2str(zchan->state));
// add me
}

View File

@ -171,11 +171,22 @@ static unsigned zt_open_range(zap_span_t *span, unsigned start, unsigned end, za
zchan->physical_span_id = ztp.span_no;
zchan->physical_chan_id = ztp.chan_no;
if (type == ZAP_CHAN_TYPE_FXS || type == ZAP_CHAN_TYPE_FXO) {
if (type == ZAP_CHAN_TYPE_FXS || type == ZAP_CHAN_TYPE_FXO || type == ZAP_CHAN_TYPE_B) {
if (ztp.g711_type == ZT_G711_ALAW) {
zchan->native_codec = zchan->effective_codec = ZAP_CODEC_ALAW;
} else {
} else if (ztp.g711_type == ZT_G711_MULAW) {
zchan->native_codec = zchan->effective_codec = ZAP_CODEC_ULAW;
} else {
int type;
if (zchan->span->trunk_type == ZAP_TRUNK_E1) {
type = ZAP_CODEC_ALAW;
} else {
type = ZAP_CODEC_ULAW;
}
zchan->native_codec = zchan->effective_codec = type;
}
}