[asterisk-dev] libpri - q931.c assumes only T1 uses slot maps

Richard Mudgett rmudgett at digium.com
Mon Nov 22 14:26:43 CST 2010



----- Original Message -----
> Hi,
> 
> 
> As mentioned in q931.c, (line 892 onwards in 1.4.11.4) in the
> comments, the code assumes that only T1 uses slot maps. However, I'm
> using an E1 Line. I have a few questions regarding this :
> 
> 
> 1. How does it assume T1 ? Does the and-ing of data[pos] with 0x10
> imply that ?

No.  That is a test to see if the following octets are a slot map.

> 2. How can I expand this to E1 ?

The assumption made about the slot map is the number of octets the slot map contains.  For T1, the slot map will contain 3 octets.  For E1, the slot map will contain 4 octets.  The other bit of ambiguity with E1 slot maps is in the treatment of time slots 0 and 16.  Are they included in the slot map or does the slot map only represent logical channels?  See the chan_mapping_logical option.

Also libpri does not actually decode the slot map to figure out what channel is requested.  It just stores it and assumes the channel was not specified.  Libpri will only send a slot map if the upper layer has not picked a channel and a slot map was previously received.  In practice, libpri will not send the slot map because the upper layer would not know what the channel is.

Richard



More information about the asterisk-dev mailing list