Modify

Opened 6 years ago

Closed 5 years ago

Last modified 2 years ago

#8132 closed defect (fixed)

Include Asterisk 1.8

Reported by: superm1@… Owned by: zandbelt
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

Hi,

Asterisk 1.8 has been recently released. I've adjusted the Asterisk 1.6 packaging to work with 1.8. I'll attach the delta from the old to new packaging to this bug.

Attachments (8)

packaging.patch (22.7 KB) - added by superm1@… 6 years ago.
Packaging patch
packaging.diff (24.2 KB) - added by superm1@… 6 years ago.
add an RTP package
packaging.2.diff (24.5 KB) - added by superm1@… 6 years ago.
3rd rendition, includes alaw and g722
packaging.4.diff (27.3 KB) - added by superm1@… 6 years ago.
4th rendition, updated to latest 1.6 base and includes GV fix
packaging.5.diff (27.8 KB) - added by superm1@… 6 years ago.
rendition 5, accidentally dropped g722 and rtp in rendition 4
packaging.6.diff (27.9 KB) - added by superm1@… 6 years ago.
6th rendition, includes missed md5sum when rediffing
openwrt-asterisk-1.8.patch (192.7 KB) - added by zandbelt 6 years ago.
010-main_code_fix.patch (861 bytes) - added by twinclouds <twinclouds2004@…> 5 years ago.

Download all attachments as: .zip

Change History (107)

Changed 6 years ago by superm1@…

Packaging patch

comment:1 Changed 6 years ago by superm1@…

I've also generated packages here if anyone is interested in using them: http://arctangent.net/~superm1/openwrt/

comment:2 Changed 6 years ago by jow

  • Owner changed from developers to zandbelt
  • Status changed from new to assigned

comment:3 Changed 6 years ago by escolamo@…

can you please add suport to chan_mobile and chan_datacard?
I already asked for this feature and it was assigned to zandbelt but no news on this

comment:4 Changed 6 years ago by anonymous

I tried using asterisk-18 packages (from superm1) with my 1.6 configuration and it didn't work, had some errors that I couldn't find some reference to online :

ERROR[2843] rtp_engine.c: No RTP engine was found. Do you have one loaded?
ERROR[2843] chan_sip.c: Got SDP but have no RTP session allocated.

At first I thought it was due to a lacking config line in sip.conf (engine=asterisk) but It didn't change anything and rtp.conf was the default one.

Codecs seemed loaded correctly (translation table was OK).

Also, while starting, I had to adjust /etc/hosts in order to change the first line to :
127.0.0.1 localhost <hostname> localhost.

Where <hostname> is my hostname, because otherwise I had this error in the startup log:
ERROR[20169] netsock2.c: getaddrinfo("<hostname>", "(null)", ...): Name or service not known
WARNING[20169] acl.c: Unable to lookup '<hostname>'
ERROR[20169] acl.c: Cannot create socket

comment:5 Changed 6 years ago by superm1@…

I've tracked this down to a change from 1.6 to 1.8 where RTP is now a loadable module. I've updated the packages on that repo and will attach an updated packaging patch.

Changed 6 years ago by superm1@…

add an RTP package

comment:6 Changed 6 years ago by anonymous

This fixed the RTP problem and so far everything seems to work correctly with the new modules.

comment:7 Changed 6 years ago by Craig <candrews@…>

(cc'ing myself) I hope we can see this in OpenWRT soon... I'm psyched to get a Google Voice / SIP bridge working :-)

comment:8 Changed 6 years ago by superm1@…

Craig:
At least until this gets included, i've got ar71xx and brcm-2.4 packages at http://www.arctangent.net/~superm1/openwrt/ and directions how to use them at http://goo.gl/46UX6. If that doesn't match your arch, you should be able to build them by just applying this patch to the asterisk16 sources in an svn tree and rebuild.

comment:9 Changed 6 years ago by abdqds@…

You have done a great job so far, and is expecting a working meetme also

comment:10 Changed 6 years ago by superm1@…

I noticed that there is no support currently for G722 and Alaw (even though they're both being built). Here's an updated diff to build additional packages for them.
(asterisk18-codec-alaw asterisk18-codec-g722)

Changed 6 years ago by superm1@…

3rd rendition, includes alaw and g722

comment:11 Changed 6 years ago by anonymous

sorry if i am a pain in the ass.
can you please add chan_mobile and chan_datacard or at least chan_mobile?

comment:12 Changed 6 years ago by twinclouds <twinclouds2004@…>

I am trying to build build asterisk 1.8.x for Kirkwood platform. The patch files Mario provided is for asterisk 1.6.2.13. The current package directory downloaded from svn is 1.6.2.14. Is there anyway I can get the patched directory or the 1.6.2.13 directory. Thanks for help.

comment:13 Changed 6 years ago by zandbelt

  • Status changed from assigned to accepted

can you update your patch to latest trunk? I'll then apply it...

comment:14 Changed 6 years ago by twinclouds <twinclouds2004@…>

The patch file between 1.6.2.14 and 1.8.0 will work for me.

Changed 6 years ago by superm1@…

4th rendition, updated to latest 1.6 base and includes GV fix

comment:15 Changed 6 years ago by anonymous

I've attached an updated patch that's between the latest 1.6 base and also includes the patch developed today for google voice outbound dialing.

Updated binaries are available at my repository at http://www.arctangent.net/~superm1/openwrt/ .

as for anonymous's request for chan_mobile and chan_datacard, I think that should be a separate ticket.

Changed 6 years ago by superm1@…

rendition 5, accidentally dropped g722 and rtp in rendition 4

comment:16 Changed 6 years ago by twinclouds <twinclouds2004@…>

Packagin.5.diff does not renew MD5sum, i.e., the new Makefile still have the old 1.6.2.14 checksum.
Otherwise the patch process runs successfully.

Changed 6 years ago by superm1@…

6th rendition, includes missed md5sum when rediffing

comment:17 Changed 6 years ago by superm1@…

Whoops, thanks!

Changed 6 years ago by zandbelt

comment:18 Changed 6 years ago by zandbelt

submitted to apply on the openwrt-devel mailing list (it requires more svn commit rights than I have)

comment:19 Changed 6 years ago by candrews@…

Asterisk 1.8.1 was released on Wednesday, December 8, 2010: http://www.asterisk.org/node/51533

I haven't yet confirmed if it includes the Google Voice outbound calling fix - it isn't mentioned in the changelog, so I doubt it.

comment:20 Changed 6 years ago by zandbelt

the latest patch uploaded by me in the attachments applies to 1.8.1; it involves renaming in the packages parent directory; I have requested on openwrt-devel for someone with sufficient svn rights in the base tree to apply it

comment:21 follow-up: Changed 6 years ago by anonymous

Thanks for working on this guys... it's great to have 1.8 on OpenWrt.

I patched my feeds/packages/net/asterisk-1.6.x directory with mario's patch "packaging.6.diff" (and renamed the directory to 1.8.x). After using the feeds script to install the new package and update the feeds index, Asterisk 1.8 was available in menuconfig. Everything compiled and built fine.

However, I didn't have good results with the newer "openwrt-asterisk-1.8.patch" using the same procedure. During patching, it complained about patching files that didn't exist and/or files that have already been patched (don't know why there are references to Asterisk 1.4 patches in this patch). Perhaps I did something wrong... has anyone had success with this patch?

Thanks.

comment:22 Changed 6 years ago by anonymous

Ok... looks like the latest patch not only creates Asterisk 1.8, but also removes Asterisk 1.4? It must be applied using a different process? Am I correct on this?

comment:23 follow-up: Changed 6 years ago by candrews@…

Can you please build the "http" module?

comment:24 in reply to: ↑ 23 Changed 6 years ago by candrews@…

Replying to candrews@…:

Can you please build the "http" module?

I realized I neglected to include my reason for this request - I'd love to use the Asterisk GUI (see #6543) and it requires the Asterisk HTTP module.

As far as I know, this GUI is the only GUI interface to Asterisk that can be used with OpenWRT (all of the others require PHP or other very heavy software, and no support connecting to remote Asterisk servers), so it would be quite cool to have it available.

comment:25 in reply to: ↑ 21 Changed 6 years ago by anonymous

Replying to anonymous:

However, I didn't have good results with the newer "openwrt-asterisk-1.8.patch" using the same procedure. During patching, it complained about patching files that didn't exist and/or files that have already been patched (don't know why there are references to Asterisk 1.4 patches in this patch). Perhaps I did something wrong... has anyone had success with this patch?

I ran this patch in the parent directory this time (after copying asterisk-1.6.x to asterisk-1.8.x) and it patched fine w/o any errors. It compiled and built fine.

However, it appears this patch also deletes the content of all files in asterisk-1.4.x and asterisk-1.6.x. Not sure why?

comment:26 follow-up: Changed 6 years ago by twinclouds

I only used .5 patch. It works fine after edited the MD5 in the Makefile. I have to copy the patch file from the patch directory into the main directory (same as the Makefile) to run the patch there for it to work.
What do you mean by you "have to ran this patch in the parent directory this time"? It will help me to save some time when I want run the new patch to update my asterisk 1.8.0 to 1.8.1. Thanks

comment:27 in reply to: ↑ 26 Changed 6 years ago by anonymous

Replying to twinclouds:

I only used .5 patch. It works fine after edited the MD5 in the Makefile. I have to copy the patch file from the patch directory into the main directory (same as the Makefile) to run the patch there for it to work.
What do you mean by you "have to ran this patch in the parent directory this time"? It will help me to save some time when I want run the new patch to update my asterisk 1.8.0 to 1.8.1. Thanks

I meant I ran the .6 patch from the feeds/packages/net/asterisk-1.6.x directory (like you did)... but I ran the 1.8.1 patch from the feeds/packages/net directory.

comment:28 follow-up: Changed 6 years ago by anonymous

When using this patch to build Asterisk 1.8, it builds fine... but I get a segmentation fault when starting asterisk on my ar71xx. Is anyone else having this problem? Any ideas?

comment:29 in reply to: ↑ 28 ; follow-up: Changed 6 years ago by anonymous

Replying to anonymous:

When using this patch to build Asterisk 1.8, it builds fine... but I get a segmentation fault when starting asterisk on my ar71xx. Is anyone else having this problem? Any ideas?

I built 1.8 (actually 1.8.1.1) on my ixp4xx and it works fine... but still get a segmentation fault on my ar71xx with the same asterisk release. The SIGSEGV occurs at start-up of asterisk, so I am unable to get any console or verbose errors.

comment:30 follow-up: Changed 6 years ago by jow

The startup segfault issue might be an uclibc ldso crash we're investigating currently.

comment:31 in reply to: ↑ 29 ; follow-up: Changed 6 years ago by twinclouds <twinclouds2004@…>

Replying to anonymous:

Replying to anonymous:

When using this patch to build Asterisk 1.8, it builds fine... but I get a segmentation fault when starting asterisk on my ar71xx. Is anyone else having this problem? Any ideas?

I built 1.8 (actually 1.8.1.1) on my ixp4xx and it works fine... but still get a segmentation fault on my ar71xx with the same asterisk release. The SIGSEGV occurs at start-up of asterisk, so I am unable to get any console or verbose errors.

Which patch you used to build 1.8.1.1? Thanks.

comment:32 in reply to: ↑ 31 ; follow-up: Changed 6 years ago by ledwards@…

Which patch you used to build 1.8.1.1? Thanks.

I patched my asterisk-1.6.x directory to asterisk 1.8 with the "packaging.6.diff" patch (then renamed the directory to asterisk-1.8.x). To build 1.8.1.1, I modified the Makefile to download the 1.8.1.1 tarball (instead of the 1.8.0) from the asterisk downloads repository. You'll have to update the md5 accordingly (or delete it). Also, the 1.8.1.1 release already contains the Google Talk fix, so you'll have to delete the "patches/101-fix-google-voice-out.patch" patch.

PKG_NAME:=asterisk 
PKG_VERSION:=1.8.1.1
PKG_RELEASE:=1 
 
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/ 
PKG_MD5SUM:=

1.8.1.1 is running great with Google Talk/Voice on my ixp4xx... but not my ar71xx (segfault).

comment:33 Changed 6 years ago by candrews@…

Using openwrt-asterisk-1.8.patch I have found that Asterisk is unable to open it's database:
[Dec 25 05:31:01] WARNING[2029]: db.c:112 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': No such file or directory

Asterisk should be looking at /usr/lib/asterisk/astdb (that's what the OpenWRt packaging of Asterisk 1.6 does).

comment:34 Changed 6 years ago by twinclouds <twinclouds2004@…>

Built asterisk 1.8.0 (with patch) and 1.8.1-1. Both built fine but has segment fault when run.

comment:35 follow-up: Changed 6 years ago by anonymous

Good to know I'm not the only one having the problem. Hopefully it is related to the uclibc ldso problem jow described and will be fixed when that is resolved.

comment:36 in reply to: ↑ 35 Changed 6 years ago by twinclouds <twinclouds2004@…>

Replying to anonymous:

Good to know I'm not the only one having the problem. Hopefully it is related to the uclibc ldso problem jow described and will be fixed when that is resolved.

I also built both for Kirkwood (Dockstar). They were built fine and start up fine. However, I still have the same problem as described previously in the Dockstar/Debian environment, i.e., login password mismatching and rtp engine engine missing. So far, no one has known why and hadn't a solutions yet.

comment:37 Changed 6 years ago by twinclouds <twinclouds2004@…>

Asterisk 1.8.0-2 compiles fine under backfire. It also appears working fine so far. It compiled well under trunk version but had segfault when run.
Asterisk 1.8.1-1 also compiles and runs without segfault under backfire. It seems have some issues in functionality. I have not made it work yet. (All in brcm47xx platform.)

comment:38 Changed 6 years ago by candrews@…

None of these Asterisk packages include asterisk18-func-uri which includes the URIENCODE/URIDECODE functions (which are quite important when using curl, which is included in the packaging).

comment:39 follow-up: Changed 6 years ago by candrews@…

Just noticed that the packing is also missing res_srtp. There's probably a lot missing...

comment:40 in reply to: ↑ 39 ; follow-up: Changed 5 years ago by ledwards@…

Replying to candrews@…:

None of these Asterisk packages include asterisk18-func-uri which includes the URIENCODE/URIDECODE functions (which are quite important when using curl, which is included in the packaging).

Add the following to the bottom of your Makefile to get func_uri:

$(eval $(call Buildasterisk18ModuleTemplate,func_uri,URI encoding and decoding,Encodes and decodes URI-safe strings))

comment:41 Changed 5 years ago by candrews@…

Can we please get this into OpenWRT's source tree so we can start keeping track of the changes, and provide a wider audience an easier means of testing/collaboration?

comment:42 follow-up: Changed 5 years ago by ledwards@…

I can confirm the same results as twincloud on my ipx4xx... Asterisk 1.8.0 and 1.8.1.1 compile fine with both the latest trunk and Backfire SVN builds. However, it only works properly under Backfire. It doesn't work under trunk... I don't get a segfault with ixp4xx (as I did with the ar71xx), but it does not work properly unless I execute Asterisk with CLI (i.e. asterisk -c). It appears to work fine under Backfire (run as usual as a daemon, without CLI).

comment:43 in reply to: ↑ 32 ; follow-up: Changed 5 years ago by laufer

Replying to ledwards@…:

Which patch you used to build 1.8.1.1? Thanks.

I patched my asterisk-1.6.x directory to asterisk 1.8 with the "packaging.6.diff" patch (then renamed the directory to asterisk-1.8.x). To build 1.8.1.1, I modified the Makefile to download the 1.8.1.1 tarball (instead of the 1.8.0) from the asterisk downloads repository. You'll have to update the md5 accordingly (or delete it). Also, the 1.8.1.1 release already contains the Google Talk fix, so you'll have to delete the "patches/101-fix-google-voice-out.patch" patch.

PKG_NAME:=asterisk 
PKG_VERSION:=1.8.1.1
PKG_RELEASE:=1 
 
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/ 
PKG_MD5SUM:=

1.8.1.1 is running great with Google Talk/Voice on my ixp4xx... but not my ar71xx (segfault).

1.8.1.1 (with gtalk) works great for me on my ixp4xx (NSLU2/slug) as well. To get it to compile, I also followed the three steps from this message (apply packaging.6.diff, delete GV patch, and change version number).

In addition, I had to modify the resulting Makefile by changing all occurrences of $(1)/var/lib back to $(1)/usr/lib to avoid the "cp: cannot overwrite non-directory" error. I don't think one wants /var/lib anyway because /var is in volatile memory by default.

Thanks!

comment:44 in reply to: ↑ 43 Changed 5 years ago by anonymous

Replying to laufer:

1.8.1.1 (with gtalk) works great for me on my ixp4xx (NSLU2/slug) as well. To get it to compile, I also followed the three steps from this message (apply packaging.6.diff, delete GV patch, and change version number).

In addition, I had to modify the resulting Makefile by changing all occurrences of $(1)/var/lib back to $(1)/usr/lib to avoid the "cp: cannot overwrite non-directory" error. I don't think one wants /var/lib anyway because /var is in volatile memory by default.

Thanks!

To clarify, this works for me on Backfire 10.03. (I have not tried trunk because I need this setup to work reliably.)

comment:45 Changed 5 years ago by clash

I manage to get TLS running on OpenWRT. Now I'm trying to also setup SRTP. But when I make a call I get :
ERROR[5325]: chan_sip.c:27876 setup_srtp: No SRTP module loaded, can't setup SRTP session.
and of course I don't hear anything.

This is probably because I don't have the res_srtp module. Could you please add it to your Asterisk 1.8 packages?

comment:46 follow-up: Changed 5 years ago by anonymous

In regards to the error:

ERROR[2843] rtp_engine.c: No RTP engine was found. Do you have one loaded?
ERROR[2843] chan_sip.c: Got SDP but have no RTP session allocated.

Compiled Asterisk 1.8.1.1 on a SheevaPlug (Kirkwood).

res_rtp_asterisk.so is installed.

On the SIP device (SJPhone running on a PDA), the error "488 Not acceptable here" was returned. Looking sip debug, same report in a message with CSeq INVITE.

Resolved the issue by adding canreinvite=no to the device configuration in sip.conf.

So this "No RTP engine" message appears to be misleading.

BTW, Same password issue here, must be null.

(Now, to see if the * will continue to work after the next reboot.)

comment:47 in reply to: ↑ 46 ; follow-up: Changed 5 years ago by twinclouds <twinclouds2004@…>

Replying to anonymous:
This has been observed by a number people on Kirkwood based devices. Mainly two issues: RTP engine not found and cannot verify password. Sheevaplug and Dockstar have the same problem. The same issues also happen on Sheevaplug and Dockstar natively compiled Asterisk 1.8 on Debian Linux. The strange thing is it occasionally works but then won't. I always set canreinvite=no but still does not work.
The only bright spot is that Asterisk 1.8 will work on optware/Dockstar with standard installation. I am interested in finding out why it does not work with Debian and Openwrt but don't have experience of debugging Asterisk in real time. If someone can point me to some references, I could spend some time on it.

In regards to the error:

ERROR[2843] rtp_engine.c: No RTP engine was found. Do you have one loaded?
ERROR[2843] chan_sip.c: Got SDP but have no RTP session allocated.

Compiled Asterisk 1.8.1.1 on a SheevaPlug (Kirkwood).

res_rtp_asterisk.so is installed.

On the SIP device (SJPhone running on a PDA), the error "488 Not acceptable here" was returned. Looking sip debug, same report in a message with CSeq INVITE.

Resolved the issue by adding canreinvite=no to the device configuration in sip.conf.

So this "No RTP engine" message appears to be misleading.

BTW, Same password issue here, must be null.

(Now, to see if the * will continue to work after the next reboot.)

comment:48 Changed 5 years ago by twinclouds <twinclouds2004@…>

I did the following experiment: I installed the optware on a Dockstar with Debian installed and then installed Asterisk 1.8 Optware package. This same package would work if I install optware over Dockstar stock firmware. However, it had the exactly the same problems as described previously when installed on top of optware over Debian. Thus, it appears to me that the problem is not really the Asterisk package, Debian/Openwrt or Dockstar. My conjuncture is that it is more likely related to the uImage/kernel. Does this make sense?

comment:49 in reply to: ↑ 42 Changed 5 years ago by Manoj

The issue you mentioned (CLI works, but without -c doesnt) for trunk build is caused by uClibc-0.9.29. If you revert back to uClibc-0.9.28.2, it should work fine under trunk as well.

Replying to ledwards@…:

I can confirm the same results as twincloud on my ipx4xx... Asterisk 1.8.0 and 1.8.1.1 compile fine with both the latest trunk and Backfire SVN builds. However, it only works properly under Backfire. It doesn't work under trunk... I don't get a segfault with ixp4xx (as I did with the ar71xx), but it does not work properly unless I execute Asterisk with CLI (i.e. asterisk -c). It appears to work fine under Backfire (run as usual as a daemon, without CLI).

comment:50 in reply to: ↑ 47 Changed 5 years ago by anonymous

Replying to twinclouds <twinclouds2004@…>:

Yeah, sorry. The "RTP engine" message is misleading, but I posted too early (as anonymous 6 days ago) and that "fix" was bogus -- the problem only seemed fixed temporarily. So, it came back. . . along with others, in SIP, IAX, and elsewhere.

Fortunately, the other problems gave me a lead to the cause, and I was finally able to, (no kidding, really this time) track it down to a conflict between the ARM's WORD alignment and Asterisk's dynamic string allocation. (Which might be new to 1.8, I don't know.)
On average, [only] about half of the time, setting the value for one dynamic string will mangle another dynamic string. (Depends on whether the string happens to start on a WORD-aligned byte.)

That's why things seem to sometimes work, and sometimes not -- because the string that [might or might not] get trampled upon depends upon which one is being set. And that depends upon the sequence of actions which occur. So, if you test with one sequence of actions, a certain error will occur. If you follow another sequence, a different error might show up.

Anyway, if you are compiling your own (not installing from packages) a fix turns out to be pretty easy -- minor edits in a couple files before re-making.

Once I took care of the issue, the "No RTP engine" problem, the password problem, and about a half-dozen others just disappeared. Now, I've got a Asterisk running on a SheevaPlug (Kirkwood ARM) with no known errors. (SIP and IAX softphones, RSA-authenticated registry to an IAX provider.)

I posted the details (including the fix) on the digium forums:

http://forums.digium.com/viewtopic.php?f=1&t=76909&sid=59baa909f1fff9b9e109113d3a364f37

Or, from the forum index, in the "Asterisk Support" forum, the topic is "Solution to 1.8 problems on Kirkwood [other?] ARMs".

(I just knew this 1.8 code had to be better quality than it seemed to be.)

Cheers my friends,
May tomorrow be a better day.

~Radael

Replying to anonymous:
This has been observed by a number people on Kirkwood based devices. Mainly two issues: RTP engine not found and cannot verify password. Sheevaplug and Dockstar have the same problem. The same issues also happen on Sheevaplug and Dockstar natively compiled Asterisk 1.8 on Debian Linux. The strange thing is it occasionally works but then won't. I always set canreinvite=no but still does not work.
The only bright spot is that Asterisk 1.8 will work on optware/Dockstar with standard installation. I am interested in finding out why it does not work with Debian and Openwrt but don't have experience of debugging Asterisk in real time. If someone can point me to some references, I could spend some time on it.

In regards to the error:

ERROR[2843] rtp_engine.c: No RTP engine was found. Do you have one loaded?
ERROR[2843] chan_sip.c: Got SDP but have no RTP session allocated.

Compiled Asterisk 1.8.1.1 on a SheevaPlug (Kirkwood).

res_rtp_asterisk.so is installed.

On the SIP device (SJPhone running on a PDA), the error "488 Not acceptable here" was returned. Looking sip debug, same report in a message with CSeq INVITE.

Resolved the issue by adding canreinvite=no to the device configuration in sip.conf.

So this "No RTP engine" message appears to be misleading.

BTW, Same password issue here, must be null.

(Now, to see if the * will continue to work after the next reboot.)

comment:51 follow-up: Changed 5 years ago by twinclouds <twinclouds2004@…>

Preliminary testing showing the suggested remedy working on Dockstar/Debian.

comment:52 in reply to: ↑ 51 ; follow-up: Changed 5 years ago by twinclouds <twinclouds2004@…>

Replying to twinclouds <twinclouds2004@…>:

Preliminary testing showing the suggested remedy working on Dockstar/Debian.

It is working on Dockstar/Debian. This is great! Now I try to make it work on the Openwrt installation. However, since the asterisk1.8.x directory only contains Makefile and patches without source files and the source tarball is download during installation. As a result, I cannot manually access the source files and don't know how to make patch in this case either. Can somebody who is more experience to let me know how to dealing with such a case? Thanks.

comment:53 in reply to: ↑ 52 Changed 5 years ago by loswillios

Replying to twinclouds <twinclouds2004@…>:

Replying to twinclouds <twinclouds2004@…>:

Preliminary testing showing the suggested remedy working on Dockstar/Debian.

It is working on Dockstar/Debian. This is great! Now I try to make it work on the Openwrt installation. However, since the asterisk1.8.x directory only contains Makefile and patches without source files and the source tarball is download during installation. As a result, I cannot manually access the source files and don't know how to make patch in this case either. Can somebody who is more experience to let me know how to dealing with such a case? Thanks.

Check the quilt guide here: http://wiki.openwrt.org/doc/devel/patches

comment:54 follow-up: Changed 5 years ago by twinclouds <twinclouds2004@…>

Thanks.
I also followed mazilo's directions and made it working now.
I have compiled openwrt with the patched files and asterisk 1.8.2.3 is working on Dockstar/Openwrt. I can publish the patched files after some more verification.
Thanks to everybody for your help.

comment:55 in reply to: ↑ 54 Changed 5 years ago by doddel

Have successfully compiled Asterisk-1.8.2.3 (latest release) for my ar71xx platform (ubnt RouterStation).
I need only a very basic setup with sip and isdn interfaces.
But the asterisk binary cannot be started. 'segmentation fault' is all I get.
Any news yet on this issue that apparently more people have seen with ar71xx ?
Have used trunk OpenWrt of Jan 30 2011, so also very recent.

comment:56 in reply to: ↑ 30 ; follow-up: Changed 5 years ago by candrews@…

Replying to jow:

The startup segfault issue might be an uclibc ldso crash we're investigating currently.

Do you have any idea what that issue is? Is there a ticket for that I can take a gander at?

comment:57 in reply to: ↑ 56 Changed 5 years ago by doddel

observations regarding non-starting seg faulting asterisk 1.8 on ar71xx mips platform with OpenWrt trunk:
1)
uclibc is not present; when I tried to download it from ar71xx trunk snapshots it is not present there either (only uclibcxx). Kamikaze 8.09.2 does list it for ar71xx. Should it be present or not and have been used in compilation for Asterisk ? If not the segmentation fault has another origin.
Present c libs in my build are only: libc - 0.9.32-65, libgcc - 4.3.3+cs-65 .
2)
just to experiment made the word alignment patch also for mips but no effect on seg fault problem at start-up.

comment:58 follow-up: Changed 5 years ago by candrews@…

root@OpenWrt:~# strace asterisk
execve("/usr/sbin/asterisk", ["asterisk"], [/* 8 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaaf000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

That's from a WNDR3700v2 running trunk r25268, default toolchain.

comment:59 in reply to: ↑ 58 ; follow-up: Changed 5 years ago by doddel

on my ar71xx exactly same strace result, except for /* 10 vars */ and not /* 8 vars */:
# strace asterisk
execve("/usr/sbin/asterisk", asterisk?, 10 vars */) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaaf000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

comment:60 in reply to: ↑ 59 ; follow-up: Changed 5 years ago by anonymous

sorry, should have previewed. Now with code formatting:

# strace asterisk
execve("/usr/sbin/asterisk", ["asterisk"], [/* 10 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaaf000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

comment:61 in reply to: ↑ 60 Changed 5 years ago by doddel

and this is result with
strace -c -f -F -v -o tmp/strace asterisk

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
   nan    0.000000           0         1           execve
   nan    0.000000           0         1           old_mmap
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000                     2           total

comment:62 Changed 5 years ago by twinclouds <twinclouds2004@…>

After making a patch using the memory alignment fix, I am able to successfully compile asterisk18 (1.8.2.3) packages for Dockstar, except for the sounds and voicemail packages. The compilation error shown are:

cp: cannot overwrite non-directory `/home/fling/openwrt/trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/root-kirkwood/./var' with directory `/home/fling/openwrt/trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/root-kirkwood/tmp-asterisk18-voicemail/./var'

make[2]: *** [/home/fling/openwrt/trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/root-kirkwood/stamp/.asterisk18-voicemail_installed] Error 1

make[2]: Leaving directory `/home/fling/openwrt/trunk/feeds/packages/net/asterisk-1.8.x'

make[1]: *** [package/feeds/packages/asterisk-1.8.x/compile] Error 2

make[1]: Leaving directory `/home/fling/openwrt/trunk'

make: *** [package/asterisk-1.8.x/compile] Error 2

Anybody have any suggestions to fix this problem? Thanks.

comment:63 follow-up: Changed 5 years ago by loswillios

maybe your Makefile has obsolete directories in 'define Package/.../install' section? eg $(INSTALL_DIR) $(1)/usr/local/not/used/anymore

comment:64 in reply to: ↑ 63 Changed 5 years ago by doddel

what is the line, using V=99, that precedes the error message? That should give a clue which step causes this.

comment:65 follow-up: Changed 5 years ago by twinclouds <twinclouds2004@…>

to: doddel,
I had already shown the V=99 output when error happened. Will lines before that helpful?

to: loswillios:
From the V=99 print out, any suggestions about which directory need to be removed?

Thanks in advance for your help.

comment:66 in reply to: ↑ 65 Changed 5 years ago by anonymous

the error is preceded by the course of commands that have caused it. So, yes it can be useful to show what lead up to the error. Actually, with things being compiled in parallel the actual command may be a bit back in the output. So look through it till the first time 'error' occurs and then look what precedes that.

comment:67 Changed 5 years ago by doddel

just have compiled asterisk 1.8.2.3 for ar71xx and have been able to start it.
The seg fault is indeed caused by uClibc. I have used Feb.2 snapshot of uClibc and adapted the OpenWrt makefile for it but the patch is 5 days old so may already be covered by what Trunk now downloads.
See http://git.uclibc.org/uClibc/commit/?id=9657b26d293370032604891a361d944b8bf0b234
and check for that patch being present in
trunk/build_dir/toolchain-mips...0.9.32/uClib-0.9.32/ldso/ldso/mips

comment:68 follow-ups: Changed 5 years ago by doddel

trunk/build_dir/toolchain-mips...0.9.32/uClib-0.9.32/ldso/ldso/mips/dl-sysdep.h

comment:69 in reply to: ↑ 68 ; follow-up: Changed 5 years ago by anonymous

Patch is in openwrt svn , however when compile still get same segfault. Probably more patches need to be applied to uClibc.

comment:70 in reply to: ↑ 69 Changed 5 years ago by doddel

strange; only change I made as described above makes asterisk start here on a RouterStation board. Has your toolchain be remade to incorporate the patches ?

comment:71 Changed 5 years ago by doddel

as experiment I flashed a snapshot OpenWrt factory.bin for ar71xx onto the board from the OpenWrt downloads site (version Feb. 3), added the bunch of library packages that asterisk needs also from that site, and then added the asterisk 1.8.2.3 package from my OpenWrt build environment. Result: segmentation fault, confirming your observation. As the only change I have made has been the introduction of a new uClibc, that seems to be where to look for the problem.

What I did in detail is download uClibc-snapshot.tar.bz2 (done on Feb. 3) from the uClibc site, repackaged it as tar.gz, renamed it with its md5sum to conform to the type of filename that toolchain/uClibc/Makefile looks for, put it in /dl, and adapted the Makefile with that md5sum. Then 'make clean' etc.

comment:72 in reply to: ↑ 68 Changed 5 years ago by anonymous

thanks for the update - i tried the snapshot and still got segfault on wndr3700. What i did was the following:

got the uClibc snapshot and recreated the archive renaming the basedir to: uClibc-0.9.32-rc2-git

and renamed the file into uClibc-0.9.32-rc2-git.tar.bz2 , copied to dl/

changed .config:
CONFIG_UCLIBC_VERSION="0.9.32-rc2-git"
CONFIG_LIBC_VERSION="0.9.32-rc2-git"

in toolchain/uClibc : cp -a config-0.9.32 config-0.9.32-rc2-git
and (optional, tried with and without ) cp -a patches-0.9.32 patches-0.9.32-rc2-git

make...

It was a clean image from openWRT svn.
1 thing, .config needs to be changed every time after running make menuconfig.

any thoughts?

comment:73 follow-up: Changed 5 years ago by doddel

this may be a quick check by copying my uClibc situation.
You can download the corresponding file here:
http://www.dorpstraat.com/OpenWrt/uClibc-0.9.32-5d324cab99044fb29f3426802bec9aea.tar.gz
and put it in the dl folder.
make clean ; make

edit in 'trunk/toolchain/uClibc/Makefile' the line PKG_SOURCE_VERSION to
the md5sum in the above filename.
(note that this change will be overwritten on a next trunk svn check-out)

comment:74 in reply to: ↑ 73 Changed 5 years ago by anonymous

of course first edit Makefile, then make etc.

comment:75 Changed 5 years ago by doddel

svn r25415 (Feb. 7) without changes to libraries also starts asterisk on my ar71xx RouterStation.

comment:76 Changed 5 years ago by anonymous

Tried the attached shanpshot and the latest svn , still issues with ast 1.8.2.3. Possible to publish the packages on a public site?
Thanks.

comment:77 Changed 5 years ago by florian

zandbelt, I will happily apply your patch if you create a new asterisk18 package.

comment:78 Changed 5 years ago by anonymous

florian, please do so; I have requested this on the mailing list, and from two other developers directly without any luck so far (see my comment in this ticket 2 months ago); the patch that I provided in this ticket replaces asterisk 1.4&1.6 with version 1.8.1; if I can have commit rights on this new directory, we'll go from there

comment:79 Changed 5 years ago by zandbelt

lorian, please do so; I have requested this on the mailing list, and from two other developers directly without any luck so far (see my comment in this ticket 2 months ago); the patch that I provided in this ticket replaces asterisk 1.4&1.6 with version 1.8.1; if I can have commit rights on this new directory, we'll go from there

comment:80 Changed 5 years ago by anonymous

Some progress here. It is indeed uClibc. I was compiling asterisk with new uClibc, while trying to install it on 10.03-rc4 with unpatched runtime uClibc. Once the entire system flashed to the latest svn - the binary works fine.

comment:81 follow-up: Changed 5 years ago by zandbelt

  • Resolution set to fixed
  • Status changed from accepted to closed

yay, Asterisk 1.8 was added in r25545; this ticket (about its inclusion) is closed now; any remaining problems with 1.8 should be reported in new/individual tickets

Changed 5 years ago by twinclouds <twinclouds2004@…>

comment:82 in reply to: ↑ 81 Changed 5 years ago by twinclouds <twinclouds2004@…>

Replying to zandbelt:

yay, Asterisk 1.8 was added in r25545; this ticket (about its inclusion) is closed now; any remaining problems with 1.8 should be reported in new/individual tickets

I compiled Asterisk18 for Kirkwood/Dockstar. All of the files are compiled without problem. Thanks for the job well done.
However, the problem of word field alignment still exists. I used the patch file that I generated previously for 1.8.2.3 and the packages needed for gtalk worked. I didn't test all of the packages, though.

I have attached the patch file, in case somebody is interested.

comment:83 Changed 5 years ago by zandbelt

twinclouds: does r25560 work for you? if it doesn't then a new ticket with an appropriate description is the right way to proceed; please test and report back

comment:84 Changed 5 years ago by twinclouds <twinclouds2004@…>

I installed it yesterday, so it is a very recent version. I am not sure about the exact version number, though. In any case, the issue is more with Asterisk 1.8 rather than Openwrt. (Debian has the same problem and need to apply the same patch.) If Openwrt can decide if to apply the patch or not based on which platform it is compiled for, it is easy to fix the problem just in Openwrt environment without ask Asterisk community.

comment:85 Changed 5 years ago by zandbelt

I just committed this fix in the trunk (taking into account the target platform), in r25560; I meant to ask wether you could test this version...

comment:86 Changed 5 years ago by twinclouds <twinclouds2004@…>

I will try it tonight. Thanks.

comment:87 Changed 5 years ago by twinclouds <twinclouds2004@…>

The asterisk18-res-rtp-asterisk is missing from menuconfig.

comment:88 Changed 5 years ago by zandbelt

it is included in the core asterisk 1.8 package now since chan_sip.so, which is part of the core, apparently depends on it

comment:89 Changed 5 years ago by twinclouds <twinclouds2004@…>

O.K. I will check tonight. It was there yesterday, though.

comment:90 Changed 5 years ago by twinclouds <twinclouds2004@…>

Which core asterisk 1.8 package you are talking about? The asterisk18_1.8.2.3-1.ipk file sizes are exactly the same as yesterday's and today's.

comment:91 Changed 5 years ago by twinclouds <twinclouds2004@…>

I compiled Asterisk18 in r25561. It was found that the package asterisk18-res-rtp-asterisk was missing. I installed all of the other packages. Gtalk call was not successful and the following errors are given:
[Feb 17 05:04:49] ERROR[3239]: rtp_engine.c:325 ast_rtp_instance_new: No RTP engine was found. Do you have one loaded?
[Feb 17 05:04:49] ERROR[3239]: chan_sip.c:8127 process_sdp: Got SDP but have no RTP session allocated.
Looks like it is necessary for asterisk18-res-rtp-asterisk to be installed.

comment:92 Changed 5 years ago by zandbelt

sorry, typo fixed in r25563: res_rtp* is included in the core package together with chan_sip

comment:93 Changed 5 years ago by twinclouds <twinclouds2004@…>

Yes. Now res-rtp-asterisk.so is loaded now. Gtalk works without problem. Thank you for your responsiveness.
One question if you can answer to same me some try and error effort. Can you let me know which package loads the res-rtp-asterisk.so module? Is it in asterisk18.ipk or another package? Right now I loaded all of the asterisk18 packages. However, just gtalk, I don't need to load all of them. Appreciate your help.

comment:94 Changed 5 years ago by anonymous

it is in the asterisk18 package itself as part of the core

comment:95 in reply to: ↑ 40 Changed 5 years ago by Craig <candrews@…>

Replying to ledwards@…:

Replying to candrews@…:

None of these Asterisk packages include asterisk18-func-uri which includes the URIENCODE/URIDECODE functions (which are quite important when using curl, which is included in the packaging).

Add the following to the bottom of your Makefile to get func_uri:

$(eval $(call Buildasterisk18ModuleTemplate,func_uri,URI encoding and decoding,Encodes and decodes URI-safe strings))

Can we we please get this (very small, but important) Makefile change into SVN?

comment:96 Changed 5 years ago by belfiore7@…

could someone please add support for chan_skinny?

comment:97 Changed 4 years ago by anonymous

ho can compile a asterisk-gui for bcm63xx,iv try n times,failed.tx verymuch.

comment:98 Changed 4 years ago by anonymous

and pls send me by mail:
popjimmy@…

tx a lot.

comment:99 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.