When I try to patch the Makefile for asterisk with the Apps_makefile.patch from Spandsp I get the following error. patching file Makefile Hunk #1 FAILED at 47. Hunk #2 FAILED at 76. 2 out of 2 hunks FAILED Has anybody seen this.
On Mon, 2004-11-22 at 14:38, Eric Rees wrote:> When I try to patch the Makefile for asterisk with the > Apps_makefile.patch from Spandsp I get the following error. > > patching file Makefile > Hunk #1 FAILED at 47. > Hunk #2 FAILED at 76. > 2 out of 2 hunks FAILEDI haven't updated this in a while but you can try it and see if it works... http://sremington.zapto.org/downloads/asterisk/spandsp/Makefile.patch -Seth -- Seth Remington SaberLogic, LLC 661-B Weber Drive Wadsworth, Ohio 44281 Phone: (330)335-6442 Fax: (330)336-8559
I tried using the link you provided. This is the error it gives me. patching file ../Makefile Hunk #1 FAILED at 48. Hunk #2 FAILED at 77. 2 out of 2 hunks FAILED -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Seth Remington Sent: Monday, November 22, 2004 2:10 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Patching asterisk for spandsp On Mon, 2004-11-22 at 14:38, Eric Rees wrote:> When I try to patch the Makefile for asterisk with the > Apps_makefile.patch from Spandsp I get the following error. > > patching file Makefile > Hunk #1 FAILED at 47. > Hunk #2 FAILED at 76. > 2 out of 2 hunks FAILEDI haven't updated this in a while but you can try it and see if it works... http://sremington.zapto.org/downloads/asterisk/spandsp/Makefile.patch -Seth -- Seth Remington SaberLogic, LLC 661-B Weber Drive Wadsworth, Ohio 44281 Phone: (330)335-6442 Fax: (330)336-8559 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
I just ran into this last weekend. I believe that you are using a version of spandsp which is for an older version of Asterisk. First I had to use the most recent version of spandsp from the source (if there is anything later by the time you get there use it): ftp://ftp.opencall.org/pub/spandsp/spandsp-0.0.2pre6/ Instructions on how to add it to extensions.conf are also a bit changed from what you probably saw in the wiki. I found the following site to do the trick: http://scottstuff.net/scott/archives/000152.html All in all his approach works well. I had to find and install mime-construct, and had to remember to create the directory under /var/spool where the faxes would go (he uses /var/spool/asterisk-fax but I prefer /var/spool/asterisk/fax) but once I did that I started getting pdf emails. The thing that he doesn't seem to do is to clean up those fax files after a while. Good luck Steve Eric Rees wrote:> When I try to patch the Makefile for asterisk with the > Apps_makefile.patch from Spandsp I get the following error. > > patching file Makefile > Hunk #1 FAILED at 47. > Hunk #2 FAILED at 76. > 2 out of 2 hunks FAILED > > Has anybody seen this.
I was able to patch the apps/Makefile from the v1-0 branch (use "-r v1-0" on the CVS command line) with Steve's patchfile, without issues. I included his patchfile for convenience. Which version of the source are you working with? Worst case, you can just look at the patch file too see what changes it makes (all it does is add build steps for the app_*xfax.c files), and edit the Makefile directly (and put up a patch to the list, out of courtesy, of course. ;) http://laughingmeme.org/archives/001753.html for doing patches, if you aren't familiar). However, app_rxfax.c does need to be changed; there is a patchfile for that too (the "callerid" member changed to "cid" in the Asterisk API). HTH Greg Eric Rees wrote:> When I try to patch the Makefile for asterisk with the > Apps_makefile.patch from Spandsp I get the following error. > > patching file Makefile > Hunk #1 FAILED at 47. > Hunk #2 FAILED at 76. > 2 out of 2 hunks FAILED > > Has anybody seen this. > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- --- app_rxfax.c 2004-11-22 15:28:42.000000000 -0500 +++ app_rxfax.c.new 2004-11-03 16:18:21.000000000 -0500 @@ -83,7 +83,7 @@ "FaxReceived", "Channel: %s\nExten: %s\nCallerID: %s\nRemoteStationID: %s\nLocalStationID: %s\nPagesTransferred: %i\nResolution: %i\nTransferRate: %i\nFileName: %s\n", chan->name, chan->exten, - chan->callerid, + chan->cid, far_ident, local_ident, t.pages_transferred, -------------- next part -------------- --- Makefile.orig 2004-10-02 02:14:37.029411336 +0800 +++ Makefile 2004-09-26 23:47:43.000000000 +0800 @@ -41,10 +41,13 @@ APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi) APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi) APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi) +APPS+=$(shell if [ -f /usr/include/spandsp.h ]; then echo "app_rxfax.so app_txfax.so" ; fi) +APPS+=$(shell if [ -f /usr/local/include/spandsp.h ]; then echo "app_rxfax.so app_txfax.so" ; fi) + CFLAGS+=-fPIC ifeq ($(USE_POSTGRES_VM_INTERFACE),1) CFLAGS+=-DUSEPOSTGRESVM endif @@ -66,10 +69,16 @@ install: all for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so +app_rxfax.so : app_rxfax.o + $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff + +app_txfax.so : app_txfax.o + $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff + app_voicemail.so : app_voicemail.o ifeq ($(USE_MYSQL_VM_INTERFACE),1) $(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -L/usr/lib/mysql -lmysqlclient -lz else ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
I realized that after this first two times I tried that, but I still will not patch. I tried to path the file manually. This is where make clean dies at. app_rxfax.so : app_rxfax.o $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff app_txfax.so : app_txfax.o $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff The first part of the patch works, but the second does not. I am using the latest CVS of asterisk and spandsp. -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Tom Neville Sent: Monday, November 22, 2004 3:25 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Patching asterisk for spandsp I think I found the problem with the patch.. are you applying that patch to the Makefile in your asterisk source directory?? or to the Makefile in the asterisk/apps directory? I got the same error until I applied it against the asterisk/apps/Makefile. Tom On Nov 22, 2004, at 4:15 PM, Steve Prior wrote:> Gregory Junker wrote: > >> Just for sanity's sake, I went back and read the README on the site >> again, and it does say: >> "Add the files rxfax.c, txfax.c and dtmftotext.c (the last one has >> nothing to do with the fax machine, but my makefile patch expects it >> to be present)" >> You have to grab the dtmftotext.c file as well, which also is not >> part of the tarball. That could be the problem. >> Greg > > I found the dtmftotext.c wasn't needed for the most recent version of > spandsp on the ftp site, and I also didn't have to modify the Makfile > with the path where to put the fax files - it is now set in > extensions.conf > instead. Examples of this are at scott's site in my original note on > this. > > Steve > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users_______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Paul Hales wrote:> We have 4 Telular mobile phone gateways hooked up to an Asterisk box, and we > need the Asterisk box to balance the load across the 4 lines. Currently, > Asterisk uses the first line, and subsequent lines when the first is busy. > > This means that our first line is in use almost 100%, and the last line is > never used. > > Has anyone done anything similar to this before? We have looked at using > mysql and getting asterisk to query mysql to choose which line to use, but > this seems overly complex. > > Does Asterisk have a built in function to do this simply and easily?When you do dial (ZAP/g1/number) you can do instead: # g: select the lowest-numbered non-busy Zap channel (aka. ascending sequential hunt group). # G: select the highest-numbered non-busy Zap channel (aka. descending sequential hunt group). # r: use a round-robin search, starting at the next highest channel than last time (aka. ascending rotary hunt group). # R: use a round-robin search, starting at the next lowest channel than last time (aka. descending rotary hunt group). See dialling a group on: http://www.voip-info.org/wiki-Asterisk+ZAP+Channels -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
Also - the mobile phone plans we are using get very expensive after approx 1500 minutes, so we have to make sure that none of the lines go over that! But the zap/r1 options should be OK for a start at least. Later, PaulH -----Original Message----- From: james edwards [mailto:hackerwacker@cybermesa.com] Sent: Tuesday, 23 November 2004 10:34 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Line load balancing> Paul, your current method of load balancing is quite fine. Why do > youwant> to round robin load balance?Even call distrubution makes it easier to spot a bad line, esp. if it is one of the last lines in the group. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users CAUTION: This email message and accompanying data may contain information that is confidential. If you are not the intended recipient, you are notified that any use, dissemination, distribution or copying of this message or data is prohibited. If you have received this email message in error, please notify us immediately and erase all copies of this message and attachments. Thank you. CAUTION: This email message and accompanying data may contain information that is confidential. If you are not the intended recipient, you are notified that any use, dissemination, distribution or copying of this message or data is prohibited. If you have received this email message in error, please notify us immediately and erase all copies of this message and attachments. Thank you.
On Tue, 23 Nov 2004 11:11:02 +1100, Paul Hales <paulh@adairs.com.au> wrote:> > Also - the mobile phone plans we are using get very expensive after approx > 1500 minutes, so we have to make sure that none of the lines go over that! > > But the zap/r1 options should be OK for a start at least.show application dial is your friend Check out the L option to limit the call to x ms Jason