Hello,
It is about how I got a voice working between UE connected to Osmocom 3G (external call handling - Kamailio PBX) and VoIP softphone connected to the PBX. The part about is IuUP only. (Transcoding comes later)
I have a traces of a call where a commercial NITB was used and I compared them to traces which I got from a call where Osmocom system was used. (Osmocom Core consisted of libosmocore of branch laforge/iu_up, osmo-mgw of branch neels/iuup and other stuff from Nightly Builds)
My femtocell (nano3g ip.access) uses AMR 12.2k as a codec.
The difference in IuUP <-> AMR conversion between two.
When converting from IuUP to AMR: - Osmo-mgw only strips IuUP header from RTP payload; - Commercial NITB strips IuUP header and prepends AMR header to RTP payload;
When converting from AMR to IuUP: - Osmo-mgw only prepends IuUP header to RTP payload; - Commercial NITB strips AMR header and prepends IuUP header to RTP payload;
So that means basically that my femtocell sends AMR payload as IuUP payload without AMR header. And expects AMR payload inside IuUP message without AMR header.
IuUP header is 4 bytes. AMR header for octet-aligned mode is 2 bytes.
To test this I've modified the code of iuup_cn_node.c so that it does: - when converting from IuUP data (rx_data): after stripping IuUP header it prepends 0xf03c as a header (it is for AMR 12.2k). - when converting to IuUP data (osmo_iuup_cn_tx_payload): before prepending IuUP header it strips AMR header.
The call performed had voice on both sides. It was performed between a regular phone connected to a femtocell and a VoIP softphone connected to Kamailio PBX.
Kind regards, Mykola
So, the AMR header is hardcoded (0xf03c) and this hack won't to work with AMR of a different bitrate or a different codec. And the problem that arise is how to form a header...
On Wed, Dec 19, 2018 at 08:56:38PM +0200, Mykola Shchetinin wrote:
So, the AMR header is hardcoded (0xf03c) and this hack won't to work with AMR of a different bitrate or a different codec. And the problem that arise is how to form a header...
Please refer to http://osmocom.org/issues/1936 for more background and http://git.osmocom.org/libosmocore/log/?h=laforge/iu_up for [untested] code to parse and encode IuUP headers with CRC, etc.
Can you post your changes somewhere? Even more so, can you post pcap trsaces of a working setup (whether or not osmocom)? Thanks!
Can you post your changes somewhere?
Yes, I've uploaded them to gerrit: https://gerrit.osmocom.org/#/c/osmo-mgw/+/12390/ Jenkins build failed as it needs to be compiled against libosmocore of branch laforge/iu_up. I've just uploaded it to make it easier to share the changes.
Even more so, can you post pcap trsaces of a working setup (whether or not osmocom)?
I cannot post the pcap trace of a call where commercial NITB was used. Though I attach a trace of a call of Osmocom system with the patch referenced above. Description: 10.0.3.20: nano3g ip.access S8 10.0.3.19: Osmocom System (where the trace was captured) 172.48.1.3: Kamailio PBX and rtpengine