Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 19
Registered: ‎08-13-2009
My Device: Not Specified

Re: SIP Stack for Blackberry

[ Edited ]

well.. I think you should be using simulator from BB to test all the code, BB API is doesn't follow the standards, specially when it come to hardware management, and also it changes a lot from version to version (for example,  search for connector class from api 4.5 and compare to connector from api 4.6).

Player is also a little different from standard. If you're developing for BB devices, you should be using BB API and BB Simulator, since they're BB implementations of JavaME, not the standard JavaME.

http://www.blackberry.com/developers/docs/4.5.0api/

http://www.blackberry.com/developers/docs/4.6.0api/

 

Almost forgot... USE BB MEDIA MANUALS, they're in the developers download page, they have a lot of examples on how to develop a DataSource for BB.

 

Have fun

Contributor
Posts: 32
Registered: ‎03-24-2010
My Device: 9000
My Carrier: socc

Re: SIP Stack for Blackberry

Now I'm facing a big problem: which type of connections can I use to send/receive the rtp packets?

I can use the normal blocking connections like UDPDatagramConnection(and DatagramConnectionBase to receive)? Or i need other types of connections, maybe non-blocking (but they exists in BB platform?)?

If u wanna provide some code, i would be very interested in reading myself, but if not possible, thanks for the informations Smiley Happy

Contributor
Posts: 32
Registered: ‎03-24-2010
My Device: 9000
My Carrier: socc

Re: SIP Stack for Blackberry

I resolved the problem implementing Datasource and the Sourcestream...I tested it with the transmission of big amr data through rtp... the problem is that i must send a little amount of data, I think that - 20-40 ms of data are good...with the pre defined bit-rate, 240 bytes of data (12.2kbps * 20 ms) is ok?

And what about buffering? I need to buffer amr audio in the implemented read method of the sourceStream, how can i buffer them in just one amr  chunk (composed maybe by ~10 audio amr paload? Which value i can return while buffering, without make the player going into exception?

Thanks for all the answers

Highlighted
New Developer
Posts: 19
Registered: ‎08-13-2009
My Device: Not Specified

Re: SIP Stack for Blackberry

About the connection, I was using UDPDatagram stuff, but I also tried the raw socket approach, however it's an issue you must solve according to your OS version, there are several changes in the connection class, between OS 4.5 and 4.6. If your planning to support 4.5 and previous OS you should be trying the raw socket, however, I could advice you to live and let die, use the UDPDatagram, and never, ever try your app in any device previous to 4.6. Smiley Happy

 

About the buffering, I never tried the amr codec over the net, I only tried the uLaw, so the magic numbers, like the amount of bytes and miliseconds are completely different, and the only way you're going to get those numbers is testing your app. What I did was, letting the recording player write in the buffer as fast as it can, and later, reading the buffer by chunks of 20ms (if I can remember well) then transcode the chunks and then send em over the net. You don't need the transcode, but I don't know if you can split the chunks like I used to, because I was splitting PCM, and it's very easy to handle. The problem here is that you can't control how many bytes the player record into the buffer, you can only hope for it to be constant, In my case it was arround 200ms of data, sometimes it read 50ms, and the next time it reads 400ms, so you should be aware of that while coding. While reading and playing, its a bit easier, because the player will try to read always a huge amount of data, so you can simply give it whatever you have, and then return the read function with no data, the player makes a few tries and then stop, later plays the data, and as it runs short of data comes back for more, don't worry.

 

Thats pretty much it.

Have fun.

Contributor
Posts: 32
Registered: ‎03-24-2010
My Device: 9000
My Carrier: socc

Re: SIP Stack for Blackberry

Well, actually i'm receiving the rtp packet directly in the read methods...so i can write always the same amount of data in the buffer...the problem is that now i've to buffer the amr payloads into a big one, so i've to buffer them, no problem if you don't know alejandromagnus...But i wanna just know how's the behaviour of the player and ifit tries to buffer...I tried with small amr and it didn't work, so, can I buffer them and return 0 data read (or something else), without making him reporting exceptions?

Contributor
Posts: 29
Registered: ‎04-01-2011
My Device: 9800
My Carrier: torch

Re: SIP Stack for Blackberry

Hi

    I am very New for Voip Calling...I dont have any Idea that how do I start its Implementatation..I found one link but that is J2ME Based. http://stackoverflow.com/questions/1628849/is-it-possible-to-use-mjsip-api-with-blackberry

Can you please help me that how i start with voip...if Possible Please send me some source code...

ashutosh.porchys@gmail.com.

 

Thanks In Advance!!!!!!!!

Thanks
With Best Regards
Ashutosh Srivatava
Developer
Posts: 139
Registered: ‎02-23-2012
My Device: Blackberry bold
My Carrier: Vodafone India

Re: SIP Stack for Blackberry

Hi All,

Do any one developed the VoIP application for blackberry?

Please help to start the development

Thank in advance
warm regards
Mohammed Aziz