Summary:ASTERISK-19510: RTP stream/Directmedia/Musiconhold/SIP not working
Reporter:Yohan L (yohanl)Labels:
Date Opened:2012-03-09 09:16:50.000-0600Date Closed:2012-03-21 15:28:38
Versions: Frequency of
Environment:RHEL6/5/4Attachments:( 0) MoH_DirectMedia.txt
( 1) MoH_No_DirectMedia.txt
( 2) sip.conf
( 3) test_rtp_stream_moh.cap
Description:The musiconhold doesnt work anymore when directmedia=yes or directrtpsetup=yes.

The bug:

3 SIP peers with reinvite capable

Peer A calling Peer B, Peer C calling B also. When Peer B is putting on hold Peer A to answer Peer C, Peer A is not able to hear the musiconhold.

There is, on asterisk, a bridging output going on but no RTP stream is going to Peer A. This is easily replicable.
Allthough, If i'm configuring in the dialplan, lets say *50 linked with the application musiconhold. All the peers are able to hear it correctly.
Comments:By: Matt Jordan (mjordan) 2012-03-09 09:30:50.078-0600

This is not related to ASTERISK-19095, and is not a regression.

Please provide your SIP configuration, as well as a pcap demonstrating the problem.

By: Matt Jordan (mjordan) 2012-03-13 10:27:52.574-0500


Just as an FYI, if you're using features.conf (*50, for example), the bridging that Asterisk performs between RTP sessions is completely different then the bridging that occurs in a directmedia setup.  I would expect the behavior to be different in some cases.

In your pcap, what are the IP addresses of Peer A and Peer B?

By: Irontec (irontec) 2012-03-14 11:46:01.710-0500

-Same- -here.-

-INFO- -DTMF- -Mode- -must- -be- -used- -to- -reproduce- -it.-

-Simple- -call- -with- -direct- -RTP- -audio.- -A- -holds- -B- -(or- -viceversa)- -and- -no- -MoH.-

-Attached- -two- -files- -capturing- -Hold- -SIP- -trace- -with- -and- -without- -directmedia.-

Sorry, it's working now.
In my case was a faulty Dahdi installation.


By: David Woolley (davidw) 2012-03-15 05:35:34.997-0500

I haven't looked at the pcap here, but would it include direct RTP between B and A, or was it captured on the Asterisk box with nnnBaseT ethernet?  You can get somewhat unpredictable results if B is sourcing RTP to A after it has sent a=sendonly, as Asterisk doesn't force the holder's RTP stream back to itself, so it is possible for A to receive two conflcting RTP streams.

By: David Woolley (davidw) 2012-03-20 05:37:14.418-0500

If the phone has a built-in ethernet hub, you may get a more complete trace if you capture on a PC plugged into the back of the phone.

By: Yohan L (yohanl) 2012-03-21 15:27:58.888-0500

Hi guys,

Finally Irontec said something about dahdi which is use for timing. I've used the list of dependencies for res_musiconhold to see all of the needed modules to make it work. Finally i've activated res_timing_pthread and it made the trick. So, if you need to activate directmedia and need the music on hold you also need to install the res_timing_pthread module. You can all concidered this solved.

By: Yohan L (yohanl) 2012-03-21 15:28:38.064-0500

See comments