Summary:ASTERISK-26439: chan_rtp: Crash when originating
Reporter:Kayode (gltduser)Labels:
Date Opened:2016-10-05 05:30:10Date Closed:2016-11-22 11:42:34.000-0600
Status:Closed/CompleteComponents:Channels/chan_multicast_rtp Resources/res_rtp_multicast
Versions:14.0.2 Frequency of
Environment:Centos 7 64bitAttachments:( 0) ASTERISK-26439.patch
( 1) backtrace.txt
Description:When I run the channel originate command below:

channel originate UnicastRTP/ extension 600@demo

Asterisk crashes and It says a segmentation fault.

Comments:By: Asterisk Team (asteriskteam) 2016-10-05 05:30:11.520-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2016-10-05 06:11:20.363-0500

Thank you for the crash report. However, we need more information to investigate the crash. Please provide:

1. A backtrace generated from a core dump using the instructions provided on the Asterisk wiki [1].
2. Specific steps taken that lead to the crash.
3. All configuration information necesary to reproduce the crash.


[1]: https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

By: Kayode (gltduser) 2016-10-05 06:51:39.561-0500

Hi Joshua, Thanks for your prompt response. Here are the details to reproduce the issue. It is pretty easy.

I downloaded http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14.0.2.tar.gz

I ran make && make install && make config && make samples

In the asterisk console, I ran the command "channel originate UnicastRTP/ extension 600@demo"

And that caused the crash.

By: Kayode (gltduser) 2016-10-05 06:53:43.399-0500

Backtrace from the crash from the originate.

By: Kayode (gltduser) 2016-10-12 07:18:54.931-0500

Hi Joshua,
I wanted to catch up with this issue. Are you able to reproduce the bug on your own system. It looks you are saying it might be a clone of another issue, is there a patch we can apply temporarily that fixes this issue or some config change we can do on our side to get this going. We will really appreciate your prompt response on this. Thanks.

By: Joshua C. Colp (jcolp) 2016-10-12 07:23:41.894-0500

I don't believe I said any of that... my comment was just to get the required information to look at it. The issue itself has been accepted and there's nothing else to do or provide. If you wanted you could try the 14 branch though to see if it was actually fixed there already.

By: Kayode (gltduser) 2016-10-12 07:55:14.050-0500

I think it was your colleague Rusty that mentioned that. So when you say try out the 14 branch, you are talking about the git repository right? I should do a git pull from that branch? Also, is there any sort of way to prioritize this issue so it can be fixed (assuming it's not fixed in the git source already)

By: Joshua C. Colp (jcolp) 2016-10-12 08:00:37.820-0500

Yes, I'm referring to getting the 14 branch from the Git repository. There's no way to prioritize this, if you need it done sooner you can try to find an Asterisk consultant who could take it on otherwise it is up to a community member to do so or the Digium developer team when we are able.

By: Moises Silva (moy) 2016-10-13 02:20:02.981-0500

Hi Joshua,

I tried using gerrit to submit a patch, but I'm getting access denied. First time using gerrit, so I'm most likely doing it wrong :)

moy@sigchld asterisk-14 (ASTERISK-26439)
$ git review -R ASTERISK-26439 -t ASTERISK-26439
remote: Processing changes: refs: 1, done
To ssh://gerrit.asterisk.org:29418/asterisk.git
! [remote rejected] HEAD -> refs/publish/ASTERISK-26439 (branch ASTERISK-26439 not found)
error: failed to push some refs to 'ssh://moy@gerrit.asterisk.org:29418/asterisk.git'

I'll try to go over the instructions in more detail with a fresh brain tomorrow, but see the attachment here for the one-liner that solves this problem.

Kayode, you can work-around the crash by explicitly specifying an rtp engine to use in your originate string, like this:

channel originate UnicastRTP/,e(asterisk) extension 600@demo

By: Moises Silva (moy) 2016-10-13 02:23:40.429-0500

Woah! got it right this time:


By: Moises Silva (moy) 2016-10-13 02:40:29.019-0500

And second thought not even sure makes sense to keep the engine option, considering using the multicast engine will cause a crash and I don't know of any other engine?

By: Kayode (gltduser) 2016-10-13 05:41:05.686-0500

Hi Moises, this works now. Thanks. I use ffmpeg to stream the call to ffserver. Joshua, I have a quick question: Currently we see about 12 seconds delay before we hear the stream via an http url (served by ffserver). I was wondering what sort of latency you experienced when you tested this initially.

By: Joshua C. Colp (jcolp) 2016-10-13 05:46:50.682-0500

The latency depends on the streaming server itself, it's dependent on the configuration (if it allows you to control it) and how it internally buffers. It's also dependent on the client as the client will buffer it. Mine was a bit more, but I didn't tweak it.