[pjsip] Media issue with multiple (parallel) calls

Anshuman S. Rawat arawat at 3clogic.com
Fri Feb 8 06:13:50 EST 2008


We have integrated G729 codec with PJSIP 0.7.0 (revision 1538) and media 
flow works fine for 1 call at a time. However, if we make multiple (even 2) 
G729 calls in parallel the media becomes very choppy and choppiness seems to 
increase with increasing number of parallel G729 calls. The root cause of 
the problem seems to be the fact that encoding and decoding happen in a 
single thread for all the calls (I printed out thread IDs in the encode and 
decode routine of G729 - thread ID was same). The small verification I did 
was that I placed 2 parallel (G729) calls and heard choppy media. On plaving 
of the calls on hold the choppiness dissappeared and reappeared when the 
held call was unheld.

I tried increasing the number of worker threads being created in endpoint.c 
to no effect. I was contemplating of how to put encode and decode in 
seperate threads. Maybe Benny or someone whose faced a similar problem could 
give some suggestions?


More information about the pjsip mailing list