[asterisk-dev] Need help about transmit_bearer_capability

Tilghman Lesher tlesher at digium.com
Tue Sep 15 08:12:07 CDT 2009


On Tuesday 15 September 2009 04:51:37 Roger Schreiter wrote:
> I try to understand in libpri's q931.c the function
>
> static FUNC_SEND(transmit_bearer_capability)
> i.e. static int transmit_bearer_capability(int full_ie, struct pri ...
>
> I want to understand the return value. It seams, the function's return
> value is two more than the the number of bytes, it explicitely sets.

That's correct.  It's the total number of bytes in the IE, which includes the
IE indicator and a length byte.

> I assume, this is some sort of reserveration for a record delimiter
> or similar. Since I did not yet find, from where this function is
> called, I could not yet check, what is done with this return value.
> (Propably this function is called implicitely, taking the values
> from an array of IE fields.)

It's called from a table of functions, based upon which IEs are included with
various messages.  The return value is substituted into the second field of
the IE, which is the length byte.

> It seams, that Cisco routers do reject calls from our system due
> to the bearer capability sent by our (asterisk based) router.
> That's why I would like to play with theses bytes and would like
> to understand a little bit more.

You should probably download the Q.931 specification from the ITU website,
as this is the formal standard for most IEs implemented here.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list