I am reading AMR payload from amr file, and then sending the same in RTP packet. In amr file, after file header, frame header + speech frames are present. The frame header portion in file looks as below.
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|P| FT |Q|P|P|
+-+-+-+-+-+-+-+-+
Where FT is speech coding mode and Q bit says about frame quality.
Now when I packetize AMR data in a RTP packet, the header before speech frame contains
CMR as below
0 1 2 3
+-+-+-+-+
| CMR |
+-+-+-+-+
And ToC as below
0 1 2 3 4 5
+-+-+-+-+-+-+
|F| FT |Q|
+-+-+-+-+-+-+
In ToC the F bit indicates if speech frame is last one in packet or not. If F bit is 1, then there is a next speech frame in packet. If F bit is 0, then there is no speech frame present in packet.
From amr file, I do not have any data that indicates what value F bit should have. How do I know whether I need to set F bit to 0 or 1?