[Asterisk-Dev] IAX2 trunk really should send timestamps as part of iax2_meta_trunk_entry..

Steve Kann stevek at stevek.com
Thu Jan 20 17:07:07 MST 2005


Andrew Kohlsmith wrote:

>On January 20, 2005 05:56 pm, Steve Kann wrote:
>  
>
>>   b2) what happens if we _add_ a meta_trunk_entry, with callno == 0?
>>          I haven't tried this yet, but it seems if we put in a
>>meta_trunk_entry with callno == 0, we can use that as a way to add
>>additional information to a trunk frame.    Then we can define something
>>like this:
>>    
>>
>
>... details snipped...
>
>I'm a VERY big fan of this resolution method -- it is extensible, compatible 
>with the old format and adds length to the trunk frames in a 
>preamble+num_channels*channel_data fashion.
>
>  
>
>>This method also allows us to extend this if we want/need to in the
>>future..
>>    
>>
>
>That's the single biggest reason why I prefer this method over all others.
>
>I'm not an IAX2 or trunking guru by any stretch of the imagination but I had 
>always wondered why asterisk would try and munge every call's timestamps into 
>one trunk frame (or rather, eliminate them altogether in lieu of the trunk's 
>timestamp) -- My typical asterisk deployments are exactly as you'd 
>described... many phones all dumped into a common trunk to somewhere else.
>  
>

To play devil's advocate against my own suggestion (I've thought about 
this a bit since I wrote that), the problem is that you now have two 
choices:

1) Put the timestamps at the beginning of the frame:
      This will likely end up meaning copying stuff around when we send, 
because we won't know how big the timestamp stuff is.    But, it's easy 
for the receiver to deal with..

This could be solved if there's a writev-equivalent way to send packets 
from discontinuous areas of memory...

Or, we could just eat the memmove :)


2) Put the timestamps at the end of the frame:
     This is easy to send, but then the receiver needs to walk through 
all the meta entries to the end, to see _if_ there's timestamps there, 
and then read them, before processing all the meta entries..

-SteveK





More information about the asterisk-dev mailing list