[asterisk-dev] IAX2 negative timestamps.

Harmen van der Wal harmen at harmwal.nl
Mon Dec 18 09:55:07 MST 2006


I wonder if IAX2 negative timestamps are allowed or a bug?

calc_timestamp at chan_iax2.c calculates the timestamp by taking the
difference of the delivery time and the channel offset. Early on in
the call this can lead to negative values (which show up in the log as
big positive numbers, because they are formatted unsigned).

For instance when delivery = 1165841516sec+988882usec and offset =
1165841517sec+40000usec then the the timestamp is -52.
Because printf("Timestamp: %05lums\n", -52) prints 4294967244ms the
log shows:

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: VOICE Subclass: 2
   Timestamp: 4294967244ms SCall: 00002 DCall: 00001
   [192.168.1.10:4569]

Also see my bug report http://bugs.digium.com/view.php?id=8546

-- 
(setq message-signature (lambda ()           ; Harmen van der Wal
                          (end-of-buffer)    ; http://www.harmwal.nl
                          (insert "\n-- \n")
                          (insert-file "~/.signature")))


More information about the asterisk-dev mailing list