Issue when Patching Asterisk for Cisco Devices

I am currently rebuilding my FreePBX (that has the Cisco patch) that has been running for several years. I have FreePBX setup, phones registered (7800 and 8800 series), trunks configured - all is well there!

But, I’m having trouble getting the patch to install. I’ve taken the patching documentation from the FreePBX wiki and updated the versions and dead links and I’m left with this:

yum groupinstall "Development Tools"
yum install sangoma-devel
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros


cd ~/rpmbuild/SOURCES
yumdownloader --source asterisk13

rpm --nomd5 -ivh ~/rpmbuild/SOURCES/asterisk13-13.29.2-1.sng7.src.rpm
rpm --nomd5 -ivh ~/rpmbuild/SOURCES/mISDNuser-2.1.0+2.0.22+git6-1.1.src.rpm
yum-builddep ~/rpmbuild/SPECS/mISDNuser.spec 
rpmbuild -bp ~/rpmbuild/SPECS/mISDNuser.spec
rpmbuild -ba ~/rpmbuild/SPECS/mISDNuser.spec
rpm -Uvh ~/rpmbuild/RPMS/x86_64/libmisdn1-*.rpm
rpm -Uvh ~/rpmbuild/RPMS/x86_64/mISDNuser*.rpm
yum-builddep ~/rpmbuild/SPECS/asterisk13.spec
rpmbuild -bp ~/rpmbuild/SPECS/asterisk13.spec
nano ~/rpmbuild/SPECS/asterisk13.spec
	[Add this line below the Patch9 entry at line 27]
	Patch10: cisco-usecallmanager-13.30.0.patch
	[Add this below the patch8 entry at line 612]
	%patch10 -p1
	[save the file and close the editor]
rpmbuild -bp ~/rpmbuild/SPECS/asterisk13.spec
rpmbuild -ba ~/rpmbuild/SPECS/asterisk13.spec
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk13-28*.rpm --force
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk13-[n-r]*.rpm --force
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk13-t*.rpm --force
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk13-voicemail-13*.rpm --force

I’m specifically having trouble when running “rpmbuild -bp ~/rpmbuild/SPECS/asterisk13.spec” after editing the asterisk13.spec file. When I run that command again, I am left with this:

error: Bad exit status from /var/tmp/rpm-tmp.wqiTov (%prep)

RPM build errors:
    bogus date in %changelog: Thu Nov 11 2019 Matteo Bignotti <[email protected]> - 13.29.2-1
    Bad exit status from /var/tmp/rpm-tmp.wqiTov (%prep)

Same result when running “rpmbuild -ba ~/rpmbuild/SPECS/asterisk13.spec”

Then, when I try to run the last four “rpm -Uvh” commands, the file it’s looking for is not found. When I ls the ~/rpmbuild/RPMS/x86_64 directory, there are no asterisk13 RPMs, so I’m assuming that has something to do RPM build errors.

Has anyone done this recently? If so, do you have any insight?

Thats currently the best manual for patching Asterisk 13/freePBX 14

1 Like

This is what I used. Just fixed the dead openSUSE link and used the most recent version of the patch.

I see…I think I applied the patch to Asterisk 13.28.1 just a month ago…and it worked…sorry, cannot help…

1 Like

Is there any chance you have access to your asterisk13.spec file? I’m thinking I’m adding lines in the wrong spot. The directions say to add “Patch10: cisco-usecallmanager-13.19.0.patch” below Patch9, but I don’t have a Patch9 in my spec file - just Patch2, 3, 4, and 6.

You are trying to patch something for an Asterisk version you don’t have. That could be why.

1 Like

:man_facepalming:t2: bingo. Didn’t ever realize that.

Downloaded Asterisk 13.28.1 source and 13.28.0 patch and it appears to be building now.

Thank you!

If you get tired of patching custom versions of Asterisk, you could try to Chan-SCCP-P driver. It supports native SKINNY mode and works with the “non portable” SIP versions of the 88xx series phones. The information on using it instead of having to custom build Asterisk kernels in in the Wiki I wrote:

Not saying that doing things the hard way is wrong, just trying to help.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.