Applying patch for bug 9096

Newbie question, please forgive

I am in the US, attempting to setup Caller ID for an Asterisk box that will be in Sao Paulo Brazil. Built a VM with a similer envirnment to attempt this with.

I am attempting to install the patch for bug id 9096 ( and am having trouble. I downloaded wctdm_v3_nopolarity.diff & wctdm_v3_trunk_nopolarity.diff to a freshly built asterisk v1.4.13 w/Freepbx 2.3.1, & Zaptel 1.4.6. Before the patch I can start all services no problem (using modprobe ztdummy). I downloaded the to .diffs to /usr/src/zaptel-1.4.6. Then I (newbie part) did this:
[root@AsteriskTest zaptel-1.4.6]# patch -p0 < wctdm_v3_nopolarity.diff

this is the feedback:

can’t find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|— zaptel-1.2.13/wctdm.c 2007-01-31 11:06:34.000000000 -0300

+++ zaptel-1.2.13mod2/wctdm.c 2007-03-02 11:18:52.000000000 -0300

File to patch: wctdm.c <-- it appeared it wanted this b/c of message above (and wctdm.ko told me to get lost)

patching file wctdm.c
Hunk #1 succeeded at 324 (offset 1 line).
Hunk #2 FAILED at 381.
Hunk #3 succeeded at 468 (offset 6 lines).
Hunk #4 succeeded at 471 (offset 1 line).
Hunk #5 succeeded at 531 (offset 6 lines).
Hunk #6 succeeded at 901 (offset 1 line).
Hunk #7 FAILED at 2439.
2 out of 7 hunks FAILED – saving rejects to file wctdm.c.rej
[root@AsteriskTest zaptel-1.4.6]# ./configure && make && make install

Everything is going good until I get:
make -C /lib/modules/2.6.11-1.1369_FC4/build SUBDIRS=/usr/src/zaptel-1.4.6 HOTPLUG_FIRMWARE=yes modules
make[2]: Entering directory /usr/src/kernels/2.6.11-1.1369_FC4-i686' CC [M] /usr/src/zaptel-1.4.6/wctdm.o /usr/src/zaptel-1.4.6/wctdm.c: In function ‘wctdm_dtmfcheck_fakepolarity’: /usr/src/zaptel-1.4.6/wctdm.c:488: error: ‘dtmf’ undeclared (first use in this function) /usr/src/zaptel-1.4.6/wctdm.c:488: error: (Each undeclared identifier is reported only once /usr/src/zaptel-1.4.6/wctdm.c:488: error: for each function it appears in.) make[3]: *** [/usr/src/zaptel-1.4.6/wctdm.o] Error 1 make[2]: *** [_module_/usr/src/zaptel-1.4.6] Error 2 make[2]: Leaving directory/usr/src/kernels/2.6.11-1.1369_FC4-i686’
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/zaptel-1.4.6’
make: *** [all] Error 2

I have my doubts I’m applying this patch correctly. I’m hoping that I’m not too far off. Can someone please assist and tell me where I went wrong? Help is much appreciated.


There is a new version of zaptel. Try working off that. Also what version of gcc are you running ? I forgot which one it is that has some issues where it breaks.

Thanks Dovid, I updated zaptel to, gcc is (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8).

I tried to apply the patch again and it errored out in the same way as above. Am I patching the correct file wctdm.c?

Its breaking on the Make

The GCC version you are running is OK. I have never tried to patch zaptel before so I am unsure but it seems correct. Ask the asterisk users list and see what they say (