[Asterisk-Dev] Identifying associated channel in rtp.c

Kevin P. Fleming kpfleming at digium.com
Wed Apr 20 06:59:12 MST 2005


Alf Thomas Nilsen wrote:

> You say that I cannot control the voice payload in rtp.c. Do I understand it
> correctly if that means that the above mentioned modification will yield no
> decreased bandwidth usage since the frames are already created and I'm only
> packing frames with their headers into a larger frame? In other words, it
> would in fact increase bandwidth usage, since the large frame with all the
> small frames also will need to have its own header. And do, please
> forgive/correct me if I'm mixing terms like frames / packets. 

Yes, that change will have the desired effect for you in some cases. It 
is not the most efficient way to implement it, because you are allowing 
the peers to continue to send 20ms frames, but you are re-packing them 
and sending them on in larger frames. In any situation where Asterisk is 
allowing the peers to 'native bridge', none of what you are doing will 
have any effect, because the peers were not asked to send larger frames 
(longer samples).

> Currently, I have made a quick modification where one is able to set the
> voice payload in rtp.conf. Asterisk is modified to parse that value in
> ast_rtp_reload(). The problem with this, however, is that it affects all
> calls. In reality, different clients may have different optimal voice
> payload sizes and that's why it was thought that it would be a good idea to
> do this through SetVar() in extensions.conf. Now, if there is other
> preferred ways to do this, I'm all ears.

Then you need to modify the channel drivers to read your desired 
variable and pass the value into rtp.c somehow so that this code can use 
it as the input to ast_smoother_new().

> Another thing that might help understanding this code is if I could have a
> look at some kind of functional diagram of Asterisk. I have been looking at
> www.asteriskdocs.org, but that seems to be a work in progress. I would be
> very happy if someone had a functional diagram of Asterisk.

Asterisk is an open-source project; the documentation that exists is 
what has been created by the community. Many of us would be happy if 
there was a "functional diagram of Asterisk", except that it would be a 
maintenance burden like all other documentation :-) As with all 
open-source projects, the true documentation is the code itself, and if 
you have taken on a project that requires you understand the code but 
you don't have the ability/skills to do that, you have some significant 
obstacles to overcome.



More information about the asterisk-dev mailing list