[asterisk-r2] Alarm on openR2 spans leave channels with RxCAS 0xC state

Moises Silva moises.silva at gmail.com
Mon Feb 13 18:59:29 CST 2012


On Mon, Feb 6, 2012 at 10:04 PM, Marcelo Pacheco <marcelo at m2j.com.br> wrote:

> **
> I noticed openr2 doesn't discard signalling if the fixed bits (usually 01)
> are different from the proper settings.
> I changed src/r2proto.c, function openr2_proto_handle_cas:
>
>    adding:
>  if ((cas & 3) != r2chan->r2context->cas_nonr2bits)
>  { // Treat NON CAS bits diferent than expected as an invalid CAS bits
>    r2chan->cas_tx_signal = OR2_CAS_INVALID;
>    return 0;
>   }
>   /* pick up only the R2 bits */ <- This comment already existed
>
> In addition, ignore alarms (continue handling input CAS bits as normal).
>

I'm not sure I am following what you're doing here. You are basically
taking the non cas bits by doing:

(cas & 3) ... this basically takes the CD bits only. Then you compare the
CD bits to see if they are what we expect. If they are not what we expect,
then you ignore the whole thing? how do you know the AB bits did not
change?? you just assume that a change in bits CD will not happen at the
same time than a change in AB. I don't think that's right.

In fact, the current code in openr2 seems to make more sense, it takes the
bits that matter, and only if the bits that matter change, then we do
something, otherwise, we ignore the bit changes in the bits that do not
matter anyways.

Can you elaborate what is this supposed to fix?


*Moises Silva
**Software Engineer, Development Manager***

msilva at sangoma.com

Sangoma Technologies

100 Renfrew Drive, Suite 100, Markham, ON L3R 9R6 Canada


t.   +1 800 388 2475 (N. America)

t.   +1 905 474 1990 x128

f.   +1 905 474 9223



**<http://www.sangoma.com/contact?utm_source=signature&utm_medium=email&utm_campaign=email+signatures>

Products<http://sangoma.com/products?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>
 | Solutions<http://sangoma.com/solutions?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>
 | Events<http://sangoma.com/about_us/events?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>
 | Contact<http://www.sangoma.com/contact?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>
 | Wiki<http://wiki.sangoma.com/?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>
 | Facebook<http://www.facebook.com/pages/Sangoma-VoIP-Cards/43578453335?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>
 | Twitter<http://www.twitter.com/sangoma?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>`|
| YouTube<http://www.youtube.com/sangomatechnologies?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-r2/attachments/20120213/9c865022/attachment.htm>


More information about the asterisk-r2 mailing list