On Fre, 2008-11-14 at 18:29 +0100, Wolfgang Pichler wrote: > Michael Neuhauser schrieb: > > I'm pretty sure that the wrong User information layer 1 byte is to > > blame. Especially since I've tested it with my libpri (version 1.2.2 + > > bristuff 0.3.0.pre1n, already pretty old) and for a digital call, the > > user-layer 1 byte is *not* there (Bearer Capability is only 4 bytes > > long, not 5 as in your SETUP). Libpri contains the following code: > > > > static FUNC_SEND(transmit_bearer_capability) > > ... > > if ((tc & PRI_TRANS_CAP_DIGITAL)&&(pri->switchtype == PRI_SWITCH_EUROISDN_E1)) { > > /* Apparently EuroISDN switches don't seem to like user layer 2/3 */ > > return 4; > > } > > /* add userlayer 1 info */ > > > i do have asterisk 1.4.22 and libpri-1.4.7 - so quit new... > i can see this code in q931.c in the FUNC_SEND - but the user-layer-1 is > still there... You have to look closer, the code is slightly different in libpri-1.4.7: if ((tc & PRI_TRANS_CAP_DIGITAL) && (pri->switchtype == PRI_SWITCH_EUROISDN_E1) && (call->transmoderate == TRANS_MODE_PACKET)) { /* Apparently EuroISDN switches don't seem to like user layer 2/3 */ There is an extra check for (call->transmoderate == TRANS_MODE_PACKET) and since your call has a 'circuit' transfer mode, the condition is not met and the userl1 value is added to the bearer caps. But from the discussion with Klaus about video calls I now think that this check is not the cause/cure for your problem. In transmit_bearer_capability() the userl2/l3 are not added if they are invalid (< 0), but the code for userl1 is different because it adds the userl1 no matter what its value is, as long as transmoderate != TRANS_MODE_PACKET. > i think it is not a good idea to put a debug statement into there to see > what is going on... Why not? That's what pri_message() is for (among other things). But I think it is not needed. > how can i get rid of the user-layer-1 bit ? In my opinion, you should check if not adding a userl1 value < 0 in transmit_bearer_capability() solves your problem, i.e., something like: if (call->transmoderate != TRANS_MODE_PACKET) { + if (call->userl1 == -1) /* Do not add an invalid user-info-layer-1 value. */ + return pos + 2; /* If you have an AT&T 4ESS, you don't send any more info */ Even if this is not valid for all possible cases (can there be a userl2/l3 value if userl1 is invalid?), it should allow to test if the userl1 value is the cause of the rejected call. Regards, Mike -- Dr. Michael Neuhauser mailto:mike@firmix.at Firmix Software GmbH sip:mike@firmix.at Vienna/Austria/Europe tel:+43-1-7890849-30 Linux Development and Services http://www.firmix.at/