Sending Audio using RTPClient

Topics: Question
May 17, 2016 at 10:15 AM
Hello Julius,

for our Xamarin App (which is for a Doorbell with a Webcam) in the next step we want to answer to the doorbell (with sound only).

So we found out how to use the Smartphone's microphone and get a byte-Array with Sound data.

Is there a sample or some Code somewhere how to sent Audio data using the rtpclient?
I had a look in your unit Tests and did not find something.

Or is our Basic idea to create a new RTPPacket with a byte-Array and just send it using the RTPClient the correct way? Do we Need to packetize it somehow?

On the doorbell there is a asterisk with sip and rtp. Receiving the Video and audiodata from the doorbell to our app is working with your RTPClient (thanks for your help and Support).

Thanks a lot,
May 17, 2016 at 1:09 PM
It depends on the codec / encoding of the data you get in the byte-Array.

In general all formats require packetization, For most Audio codecs the process is simple and the samples can just be encapsulated inside a RtpPacket Payload and sent or received but some require more advanced packetization.

An example of an audio codec which does require packetization is AAC, although I would probably guess that your using AuLaw or MuLaw, both have similar packetization and depacketization processes which are defined in RFC3551.

They should already be supported, let me know if you run into something which is not and I will add support.

I will take a look into the issues you described with 'clicking' and 'artifacts' but the new code only uses threads when told to, meaning that if you don't enable threads your using the same code as you were in older versions (albeit with improvements).
Marked as answer by juliusfriedman on 5/17/2016 at 5:09 AM
May 17, 2016 at 2:41 PM
Got Audio sending working on Android! We are using RTPPackets (instead of RTPFrames) then it works.
Will also test with iOS when I have a RTPClient Version running on iOS again.

Thanks Julius!
May 17, 2016 at 2:56 PM
Since you already have the data you only need a RtpHeader, you can create the RtpPacket from that header and the payload bytes.

You should be able to do with frames or packets, the semantic is the same....

Thanks for the info, let me know if you need anything else.
Marked as answer by juliusfriedman on 5/17/2016 at 6:56 AM