[asterisk-dev] [Code Review] Support setting and receiving Reverse Charging Indication over ISDN PRI

rmudgett at digium.com rmudgett at digium.com
Wed Jul 1 18:27:16 CDT 2009



> On 2009-07-01 16:23:37, rmudgett wrote:
> > /trunk/channels/sig_pri.h, line 165
> > <http://reviewboard.digium.com/r/303/diff/1/?file=5835#file5835line165>
> >
> >     This bit field is too small.  It would be better to simply make it an int.
> 
>  wrote:
>     Why is it too small?  It is 3 bits in the RCI IE.

Three bit fields can only contain eight values.  This is a signed three bit field.  It can only contain values -4 to 3.  If it were an unsigned three bit field it could only contain values 0 to 7.  The nine values it must be able to contain are -1 to 7.

The base type for this bit field is an int.  There are no other bit fields of the same base type defined right before or right after it.  Thus the structure will still use the space of an int and only use the number of bits specified in that int.  Also the RCI IE has spare bits that could conceivably and conveniently be passed in the same int if it made sense.  Therefore, it would be better to simply make it an int and not place any restrictions on the value passed from libpri.


- rmudgett


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/303/#review921
-----------------------------------------------------------


On 2009-07-01 16:55:10, Sean Bright wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/303/
> -----------------------------------------------------------
> 
> (Updated 2009-07-01 16:55:10)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This is a continuation of review 292 which added the ability to get/set Reverse Charging Indication in LibPRI.  This patch adds the ability to specify RCI on the outbound leg of a PRI call, by prefixing the dialed number with a capital 'C' like:
> 
> ...,Dial(DAHDI/g1/C4445556666)
> 
> And to read it off an inbound channel:
> 
> exten => s,1,Set(RCI=${CHANNEL(reversecharge)}) 
> 
> 
> This addresses bug 13760.
>     https://issues.asterisk.org/view.php?id=13760
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_dahdi.c 204679 
>   /trunk/channels/sig_pri.h 204679 
>   /trunk/channels/sig_pri.c 204679 
>   /trunk/configs/chan_dahdi.conf.sample 204679 
> 
> Diff: http://reviewboard.digium.com/r/303/diff
> 
> 
> Testing
> -------
> 
> Compilation testing only.
> 
> 
> Thanks,
> 
> Sean
> 
>




More information about the asterisk-dev mailing list