RESOLVED: How do I apply a patch to Asterisk on FreePBX distro?

Hi
I want to apply this patch for Cisco SIP phones so that Asterisk plays nice with Cisco’s new 9 series of firmware.

https://issues.asterisk.org/jira/browse/ASTERISK-13145

Its for a new install so I’m not worried about the downtime of Asterisk being recompiled and what not but I haven’t found any info on how to go about applying this to an install with the latest version of the FreePBX distro

Thanks

We use RPMs for all our packages, so all you need to do is grab our SRPM - [removed old] - add your patch, and rebuild!

1 Like

Thanks xrobau,

unfortunately I’ve never patched anything before, so I need a little more hand holding.

Is there a guide that you know of for patching freepbx/asterisk?

I havent found any how to written for patching FreePBX

Progress so far for others looking to patch asterisk

Find your Asterisk version by logging into FreePBX, enter "asterisk -r"
Version will be displayed as you enter the asterisk CLI

Download SRPM related to your Asterisk version
[removed old]

Follow this guide:
http://bradthemad.org/tech/notes/patching_rpms.php

UPDATE … still not working. I got to the “rpmbuild” part but it says “libresample-devel is needed by asterisk, this is needed by asterisk, that is needed by asterisk”

over and over with different dependencies that are missing (or in use?)

I have no idea what I’m doing … trying to follow sketchy guides like the one above and this one

Ok for anyone still reading this I was able to get it working, the best guide is

It is mostly accurate except for a few things like syntax - when installing misdn “yum misdn” but its really “yum mISDN”

Also some of the commands reference older versions of things, but I updated my commands to reference newer versions

my rpmbuild didnt work the first time, but I was able to fix the missing dependencies with yum-builddep asterisk11.spec

However, for yum-builddep to work I first had to remove epel-release (yum remove epel-release)

What a huge pain in the ass. I’ve spent like 4hours on this. Well at least learning Linux is never time wasted…

Well the install seemed like it worked

but now when i log into FreePBX GUI it shows asterisk on fire (down)

says “Asterisk Mngmt Interface astman failure”

To complete this thread, here are the right steps to apply a patch:

[Fresh Install of FreePBX 12 Distro: 6.12.65 x86_64]
    
    RPM Source: asterisk11-11.18.0-1.shmz65.1.81.src.rpm
    Patch: cisco-usecallmanager-11.18.0.patch
    
    # yum install epel-release
    # yum install mISDN
    # cd /home/
    # wget http://download.opensuse.org/factory/repo/src-oss/suse/src/mISDNuser-2.0.19-1.2.src.rpm
    # yum erase epel-release
    # yum install rpm-build
    # yum groupinstall "Development Tools"
    # wget http://yum1.freepbxdistro.org/pbx/SRPMS/asterisk/11/asterisk11-11.18.0-1.shmz65.1.81.src.rpm
    # mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
    # echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
    # rpm --nomd5 -ivh asterisk-11.14.1-1.src.rpm
    
    
    WARNING: group mockbuild does not exist - using root
    WARNING: group mockbuild does not exist - using root
    WARNING: group mockbuild does not exist - using root
    WARNING: group mockbuild does not exist - using root
    asterisk 11 ########################################
    WARNING: group mockbuild does not exist - using root
    WARNING: group mockbuild does not exist - using root
    WARNING: group mockbuild does not exist - using root
    
    # rpm --nomd5 -ivh mISDNuser-2.0.19-1.2.src.rpm
    
    WARNING: mISDNuser-2.0.19-1.2.src.rpm: Header V3 RSA/SHA256 Signature, key ID 1324lkha: NOKEY
    
       1. mISDNuser ################################# [100%]
    
    # cd /root/rpmbuild/SPECS
    # yum-builddep misdnuser.spec
    # rpmbuild -bp misdnuser.spec
    # rpmbuild -ba misdnuser.spec
    # cd /root/rpmbuild/RPMS/x86_64
    # rpm -Uvh libmisdn1-*.rpm
    # rpm -Uvh mISDNuser*.rpm
      1. mISDNuser-devel     ######################## [100%]
      2. mISDNuser-debuginfo ######################## [100%]
      3. mUSDNuser           ######################## [100%]
    # cd ../../SPECS
    # yum-builddep asterisk11.spec
    # rpmbuild -bp asterisk11.spec
    # cd ../SOURCES
    # wget https://issues.asterisk.org/jira/secure/attachment/52713/cisco-usecallmanager-11.18.0.patch
    # cd ../SPECS
    # nano asterisk11.spec
    
    Added the following, where appropriate:
    
    Patch 13: cisco-usecallmanager-11.18.0.patch
    %patch13 -p1
    
    // Installing Asterisk here, I left out the following rpms:
    // asterisk11-misdn*.rpm, asterisk11-snmp*.rpm, and all the asterisk11-voicemail*.rpms
    // except the asterisk11-voicemail-11*.rpm one
    
    # rpmbuild -bp asterisk11.spec
    # rpmbuild -ba asterisk11.spec
    # cd /root/rpmbuild/RPMS/x86_64
    # rpm -Uvh asterisk11-[a-l]*.rpm --force
    # rpm -Uvh asterisk11-[n-r]*.rpm --force
    # rpm -Uvh asterisk11-t*.rpm --force
    # rpm -Uvh asterisk11-voicemail-11*.rpm --force
    # rpm -Uvh libmisdn1*.rpm --force
    # rpm -Uvh mISDN*.rpm --force
    
    # service asterisk restart

It is generally recommended that you never build anything as root. It’s a linux thing, root can do anything and you are trusting “somebody else” that’s why an untrusted user like mockbuild is used, then root just needs to install ( do the dirty work) to get it going.

JM2CWAE

Thanks dicko i’ll remember that next time

Hey, sorry to drag up an old topic, but I wanted to put this here since it’s on the front page of google when searching how to apply the cisco-usecallmanager patch to freepbx.

There is a new version of this patch which applies to asterisk 13.10.0, which is the version of asterisk used by the newest FreePBX - 10.13.66-15. So since we have Cisco 7900 phones, I wanted to get the cutting-edge FreePBX working with them. After several hours and much ado I have something to show for it, and here it is:

https://drive.google.com/drive/folders/0B211QsfoNBOPVHd1TlRhX2lycnM

Here I have the shmz6 version of asterisk 13.10.0-1.shmz6.x86_64 patched with the cisco-usecallmanager-13.10.0 patch:

https://issues.asterisk.org/jira/browse/ASTERISK-13145

I have provided both an SRPM and an RPM and my notes of what was done to produce them.

To install it:
Make sure you are running version 10.13.66-15 of FreePBX:

http://wiki.freepbx.org/display/PPS/FreePBX-Distro-10.13.66

Then download my asterisk13-core RPM and then simply:

fwconsole stop
rpm -Fvh --nodeps asterisk13-core-13.10.0-2.shmz6.x86_64.rpm --force
fwconsole start

I hope this helps someone! :smile:

PS: Sorry for the links not being links, I signed up just so I could post this, and it won’t let me post links because I am a new user, so you’ll have to copy/paste.

Edit by @xrobau: Fixed the links so they’re clickable. Thanks!

1 Like

Grintor,

I appreciate that you created the RPM to make it eaiser for the rest of us. I am trying to get some features working but I am running into some issues. Could you please post your sample configs? The ones that you would generate from the patch process. I noticed that you did not include them in the RPM.

Thanks!

What features are you having issues with?

Thanks for the quick response. The two features that I am trying to use are conference/joining between three phones and also video format negotiation. The resolution is too low. I know there are settings that need to be made for the cisco endpoints (9971s). I just need a point in the right direction.

Thanks again for your assistance!

Doing conferencing shouldn’t be any different than any other phone, this is a configuration on the pbx, not the phone afaik: http://wiki.freepbx.org/display/FPG/Conference+Module+User+Guide

The video resolution doesn’t seem to be configurable as far as I can tell, maybe what you want is to adjust the video bitrate?

Settings -> Asterisk Sip Settings -> Chan SIP Settings -> Video Support->Enable -> Set your desired max bitrate->Save->Apply

You can also move around the priority of the video formats to see if changing the format gets you better clarity

I am able to create a conference bridge. That piece works fine. I am not able to get the process of, place call A, after connect press conference button, place call B, then press conference button to join. This piece fails. I get an error that says “Unable to complete conference” As for the video part, I was referencing this site lists.digium.com/pipermail/asterisk-video/2011-October/003560.html but the patch needed might not be included in your fix.

Thanks again for the follow up. I thought there might be some light shed in the sample configs

Thanks for posting this…

so I tried to download and follow your instructions … however I now get a red box at the top of the GUi saying “CANNOT CONNECT TO ASTERISK”

how do i fix this?

Hey, I tried to edit my original post but it won’t let me. At the time when I wrote it, freepbx 10.13.66-15 used asterisk 13.10 and I thought specific freepbx versions were tied to specific asterisk versions. That’s not the case, and by upgrading to 10.13.66-15 you will have upgraded to the latest asterisk version at that time in the process. That means that you are running asterisk13-core at version 13.10 but all the other asterisk components are a different version. The steps above should be:

fwconsole stop
yum downgrade asterisk13*-13.10.0-*
rpm -Fvh --nodeps asterisk13-core-13.10.0-2.shmz6.x86_64.rpm --force
fwconsole start

you should also do

nano /etc/yum.conf

and add the line:

exclude=asterisk1*

This will allow you up keep freepbx up to date without asterisk upgrading

Tried to do all the above. A new version of this “rpm -Uvh mISDNuser*.rpm” can’t find. Would like to apply Cisco patch to my Freepbx testing box. Yes I will apply in working environment if it works.

Any help would be cool!

Asterisk = 13.12.1
FreePBX 13.0.190.7

Cisco 8841
11-5-1 firmware

HI

I recently updated FreePBX to 10.13.66-16 and now the patch appears to have stopped working. Is there a way i can apply it to this version or do I have to go back to the old version?