DESCRIPTION When running "dialplan show" from the CLI, asterisk segfaults when it attempts to display the dialplan of res_features. I am able to reproduce this with asterisk versions 1.4.10.1/1.4.11/SVN trunk. I have not tried an earlier version. I am attempting to build this on Solaris 10 Update 3 (11/06) x86: -------------------------------------------------------------------------------- uname -a SunOS golum 5.10 Generic_125101-10 i86pc i386 i86pc Solaris -------------------------------------------------------------------------------- I have installed the following packages that were used to include the additional features we required from asterisk: -------------------------------------------------------------------------------- SFWcurl (Curl package from the S10U3 companion cd) CSWcommon (Common links and path setups for Blastwave packages) CSWreadline (Readline package from Blastwave) CSWiconv (Iconv package from Blastwave) CSWunixodbc (unixODBC package from Blastwave) CSWlibogg (OGG package from Blastwave) CSWspeex (SPEEX package from Blastwave) -------------------------------------------------------------------------------- The build tools are the standard gnu build tools that come with Solaris 10 Update 3, with the addition of the following packages that are on the Companion CD: -------------------------------------------------------------------------------- SFWltool (Libtool package on Solaris Companion CD) SFWcoreu (Core utils package on Solaris Companion CD) SFWncur (NCurses package on Solaris Companion CD required by gdb) SFWgdb (GNU debugger package on Solaris Companion CD) -------------------------------------------------------------------------------- I made a few changes to the Makefile before building, mainly to do with the installation path and the header/library search paths. The line numbers below are what I changed in the main Makefile. changed 103 #DESTDIR?=/tmp/asterisk to 103 DESTDIR=/var/tmp/asterisk changed 107 ifeq ($(OSARCH),SunOS) 108 ASTETCDIR=/var/etc/asterisk 109 ASTLIBDIR=/opt/asterisk/lib 110 ASTVARLIBDIR=/var/opt/asterisk 111 ASTSPOOLDIR=/var/spool/asterisk 112 ASTLOGDIR=/var/log/asterisk 113 ASTHEADERDIR=/opt/asterisk/include 114 ASTBINDIR=/opt/asterisk/bin 115 ASTSBINDIR=/opt/asterisk/sbin 116 ASTVARRUNDIR=/var/run/asterisk 117 ASTMANDIR=/opt/asterisk/man 118 else to 107 ifeq ($(OSARCH),SunOS) 108 ASTETCDIR=/opt/asterisk/etc 109 ASTLIBDIR=/opt/asterisk/lib 110 ASTVARLIBDIR=/opt/asterisk/var/lib 111 ASTSPOOLDIR=/opt/asterisk/var/spool 112 ASTLOGDIR=/opt/asterisk/var/log 113 ASTHEADERDIR=/opt/asterisk/include 114 ASTBINDIR=/opt/asterisk/bin 115 ASTSBINDIR=/opt/asterisk/sbin 116 ASTVARRUNDIR=/opt/asterisk/var/run 117 ASTMANDIR=/opt/asterisk/man 118 else changed 234 ifeq ($(OSARCH),SunOS) 235 ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include 236 endif to 234 ifeq ($(OSARCH),SunOS) 235 ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/usr/sfw/include -I/opt/sfw/include -I/opt/csw/include 236 endif changed 275 ifeq ($(OSARCH),SunOS) 276 SOLINK=-shared -fpic -L/usr/local/ssl/lib 277 endif to 275 ifeq ($(OSARCH),SunOS) 276 SOLINK=-shared -fpic -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -R/opt/sfw/lib -L/opt/csw/lib -R/opt/csw/lib 277 endif changed 445 $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR) 446 $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(includedir) 447 $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) to 445 $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR) 446 $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)/asterisk 447 $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(ASTHEADERDIR) 448 $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)/asterisk I then do the standard: gmake menuselect gmake gmake install gmake samples Once that completes, I then create a symbolic link in /opt to point to /var/tmp/asterisk/opt/asterisk. I then startup asterisk as follows: cd /opt/asterisk/sbin ./asterisk -vvvdddgcp I've tried several combinations of starting asterisk up, they all produce a core dump/segfault. After the startup routine completes, I then run "dialplan show" from the CLI, and asterisk segfaults. Here is the entire output after the "dialplan show" command completes. *CLI> dialplan show [ Context 'app_queue_gosub_virtual_context' created by 'app_queue' ] 's' => 1. KeepAlive() [app_queue] [ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ] 's' => 1. KeepAlive() [app_dial] [ Context 'default' created by 'pbx_config' ] Include => 'demo' [pbx_config] [ Context 'page' created by 'pbx_config' ] '_X.' => 1. Macro(page,SIP/${EXTEN}) [pbx_config] [ Context 'demo' created by 'pbx_config' ] '#' => 1. Playback(demo-thanks) [pbx_config] 2. Hangup() [pbx_config] '1000' => 1. Goto(default,s,1) [pbx_config] '1234' => 1. Playback(transfer,skip) [pbx_config] 2. Macro(stdexten,1234,${GLOBAL(CONSOLE)}) [pbx_config] '1235' => 1. Voicemail(1234,u) [pbx_config] '1236' => 1. Dial(Console/dsp) [pbx_config] 2. Voicemail(1234,b) [pbx_config] '2' => 1. BackGround(demo-moreinfo) [pbx_config] 2. Goto(s,instruct) [pbx_config] '3' => 1. Set(LANGUAGE()=fr) [pbx_config] 2. Goto(s,restart) [pbx_config] '500' => 1. Playback(demo-abouttotry) [pbx_config] 2. Dial(IAX2/guest@misery.digium.com/s@default) [pbx_config] 3. Playback(demo-nogo) [pbx_config] 4. Goto(s,6) [pbx_config] '600' => 1. Playback(demo-echotest) [pbx_config] 2. Echo() [pbx_config] 3. Playback(demo-echodone) [pbx_config] 4. Goto(s,6) [pbx_config] '76245' => 1. Macro(page,SIP/Grandstream1) [pbx_config] '7999' => 1. Set(TIMEOUT(absolute)=60) [pbx_config] 2. Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d) [pbx_config] '8500' => 1. VoicemailMain() [pbx_config] 2. Goto(s,6) [pbx_config] 'i' => 1. Playback(invalid) [pbx_config] 's' => 1. Wait(1) [pbx_config] 2. Answer() [pbx_config] 3. Set(TIMEOUT(digit)=5) [pbx_config] 4. Set(TIMEOUT(response)=10) [pbx_config] [restart] 5. BackGround(demo-congrats) [pbx_config] [instruct] 6. BackGround(demo-instruct) [pbx_config] 7. WaitExten() [pbx_config] 't' => 1. Goto(#,1) [pbx_config] '_7XXX' => 1. Macro(page,SIP/${EXTEN}) [pbx_config] [ Context 'macro-page' created by 'pbx_config' ] 's' => 1. ChanIsAvail(${ARG1}|js) [pbx_config] 2. GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail) [pbx_config] [autoanswer] 3. Set(_ALERT_INFO="RA") [pbx_config] 4. SIPAddHeader(Call-Info: Answer-After=0) [pbx_config] 5. NoOp() [pbx_config] 6. Dial(${ARG1}||) [pbx_config] [fail] 7. Hangup() [pbx_config] [ Context 'macro-stdPrivacyexten' created by 'pbx_config' ] 'a' => 1. VoicemailMain(${ARG1}) [pbx_config] 's' => 1. Dial(${ARG2},20|p) [pbx_config] 2. Goto(s-${DIALSTATUS},1) [pbx_config] 's-BUSY' => 1. Voicemail(${ARG1},b) [pbx_config] 2. Goto(default,s,1) [pbx_config] 's-DONTCALL' => 1. Goto(${ARG3},s,1) [pbx_config] 's-NOANSWER' => 1. Voicemail(${ARG1},u) [pbx_config] 2. Goto(default,s,1) [pbx_config] 's-TORTURE' => 1. Goto(${ARG4},s,1) [pbx_config] '_s-.' => 1. Goto(s-NOANSWER,1) [pbx_config] [ Context 'macro-stdexten' created by 'pbx_config' ] 'a' => 1. VoicemailMain(${ARG1}) [pbx_config] 's' => 1. Dial(${ARG2},20) [pbx_config] 2. Goto(s-${DIALSTATUS},1) [pbx_config] 's-BUSY' => 1. Voicemail(${ARG1},b) [pbx_config] 2. Goto(default,s,1) [pbx_config] 's-NOANSWER' => 1. Voicemail(${ARG1},u) [pbx_config] 2. Goto(default,s,1) [pbx_config] '_s-.' => 1. Goto(s-NOANSWER,1) [pbx_config] [ Context 'macro-trunkdial' created by 'pbx_config' ] 's' => 1. Dial(${ARG1}) [pbx_config] 2. Goto(s-${DIALSTATUS},1) [pbx_config] 's-BUSY' => 1. Hangup() [pbx_config] 's-NOANSWER' => 1. Hangup() [pbx_config] '_s-.' => 1. NoOp() [pbx_config] [ Context 'local' created by 'pbx_config' ] Include => 'default' [pbx_config] Include => 'trunklocal' [pbx_config] Include => 'iaxtel700' [pbx_config] Include => 'trunktollfree' [pbx_config] Include => 'iaxprovider' [pbx_config] Include => 'parkedcalls' [pbx_config] Ignore pattern => '9' [pbx_config] [ Context 'longdistance' created by 'pbx_config' ] Include => 'local' [pbx_config] Include => 'trunkld' [pbx_config] Ignore pattern => '9' [pbx_config] [ Context 'international' created by 'pbx_config' ] Include => 'longdistance' [pbx_config] Include => 'trunkint' [pbx_config] Ignore pattern => '9' [pbx_config] [ Context 'trunktollfree' created by 'pbx_config' ] '_91800NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config] '_91866NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config] '_91877NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config] '_91888NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config] [ Context 'trunklocal' created by 'pbx_config' ] '_9NXXXXXX' => 1. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config] [ Context 'trunkld' created by 'pbx_config' ] '_91NXXNXXXXXX' => 1. Macro(dundi-e164,${EXTEN:1}) [pbx_config] 2. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config] [ Context 'trunkint' created by 'pbx_config' ] '_9011.' => 1. Macro(dundi-e164,${EXTEN:4}) [pbx_config] 2. Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) [pbx_config] [ Context 'iaxprovider' created by 'pbx_config' ] [ Context 'iaxtel700' created by 'pbx_config' ] '_91700XXXXXXX' => 1. Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel) [pbx_config] [ Context 'macro-dundi-e164' created by 'pbx_config' ] 's' => 1. Goto(${ARG1},1) [pbx_config] Include => 'dundi-e164-lookup' [pbx_config] [ Context 'dundi-e164-lookup' created by 'pbx_config' ] Include => 'dundi-e164-local' [pbx_config] Include => 'dundi-e164-switch' [pbx_config] [ Context 'dundi-e164-switch' created by 'pbx_config' ] Alt. Switch => 'DUNDi/e164' [pbx_config] [ Context 'dundi-e164-local' created by 'pbx_config' ] Include => 'dundi-e164-canonical' [pbx_config] Include => 'dundi-e164-customers' [pbx_config] Include => 'dundi-e164-via-pstn' [pbx_config] [ Context 'dundi-e164-via-pstn' created by 'pbx_config' ] [ Context 'dundi-e164-customers' created by 'pbx_config' ] [ Context 'dundi-e164-canonical' created by 'pbx_config' ] [ Context 'ael-default' created by 'pbx_ael' ] Include => 'ael-demo' [pbx_ael] [ Context 'ael-demo' created by 'pbx_ael' ] '#' => 1. Playback(demo-thanks) [pbx_ael] 2. Hangup() [pbx_ael] '1000' => 1. Goto(ael-default,s,1) [pbx_ael] '2' => 1. Background(demo-moreinfo) [pbx_ael] 2. Goto(s,instructions) [pbx_ael] '3' => 1. Set(LANGUAGE()=fr) [pbx_ael] 2. Goto(s,restart) [pbx_ael] '500' => 1. Playback(demo-abouttotry) [pbx_ael] 2. Dial(IAX2/guest@misery.digium.com/s@default) [pbx_ael] 3. Playback(demo-nogo) [pbx_ael] 4. Goto(s,instructions) [pbx_ael] '600' => 1. Playback(demo-echotest) [pbx_ael] 2. Echo() [pbx_ael] 3. Playback(demo-echodone) [pbx_ael] 4. Goto(s,instructions) [pbx_ael] '8500' => 1. VoicemailMain() [pbx_ael] 2. Goto(s,instructions) [pbx_ael] 'i' => 1. Playback(invalid) [pbx_ael] 's' => 1. Wait(1) [pbx_ael] 2. Answer() [pbx_ael] 3. Set(TIMEOUT(digit)=5) [pbx_ael] 4. Set(TIMEOUT(response)=10) [pbx_ael] [restart] 5. Background(demo-congrats) [pbx_ael] [instructions] 6. Set(x=$[0]) [pbx_ael] 7. GotoIf($[ ${x} < 3]?8:12) [pbx_ael] 8. Background(demo-instruct) [pbx_ael] 9. WaitExten() [pbx_ael] 10. Set(x=$[${x} + 1]) [pbx_ael] 11. Goto(7) [pbx_ael] 12. NoOp(Finish for-ael-demo-3) [pbx_ael] 't' => 1. Goto(#,1) [pbx_ael] '_1234' => 1. Gosub(ael-std-exten-ael,s,1(${EXTEN}, "IAX2")) [pbx_ael] [ Context 'ael-std-exten-ael' created by 'pbx_ael' ] 'a' => 1. VoiceMailMain(${ext}) [pbx_ael] 2. Return() [pbx_ael] 's' => 1. Set(LOCAL(ext)=${ARG1}) [pbx_ael] 2. Set(LOCAL(dev)=${ARG2}) [pbx_ael] 3. Dial(${dev}/${ext},20) [pbx_ael] 4. Goto(sw-1-${DIALSTATUS},10) [pbx_ael] 5. NoOp(Finish switch-ael-std-exten-ael-1) [pbx_ael] 6. Return() [pbx_ael] 'sw-1-BUSY' => 10. Voicemail(${ext},b) [pbx_ael] 11. Goto(s,5) [pbx_ael] '_sw-1-.' => 10. Voicemail(${ext},u) [pbx_ael] 11. Goto(s,5) [pbx_ael] [ Context 'ael-local' created by 'pbx_ael' ] Include => 'ael-default' [pbx_ael] Include => 'ael-parkedcalls' [pbx_ael] Include => 'ael-trunklocal' [pbx_ael] Include => 'ael-iaxtel700' [pbx_ael] Include => 'ael-trunktollfree' [pbx_ael] Include => 'ael-iaxprovider' [pbx_ael] Ignore pattern => '9' [pbx_ael] [ Context 'ael-longdistance' created by 'pbx_ael' ] Include => 'ael-local' [pbx_ael] Include => 'ael-trunkld' [pbx_ael] Ignore pattern => '9' [pbx_ael] [ Context 'ael-international' created by 'pbx_ael' ] Include => 'ael-longdistance' [pbx_ael] Include => 'ael-trunkint' [pbx_ael] Ignore pattern => '9' [pbx_ael] [ Context 'ael-trunktollfree' created by 'pbx_ael' ] '_91800NXXXXXX' => 1. Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) [pbx_ael] '_91866NXXXXXX' => 1. Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) [pbx_ael] '_91877NXXXXXX' => 1. Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) [pbx_ael] '_91888NXXXXXX' => 1. Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) [pbx_ael] [ Context 'ael-trunklocal' created by 'pbx_ael' ] '_9NXXXXXX' => 1. Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) [pbx_ael] [ Context 'ael-trunkld' created by 'pbx_ael' ] '_91NXXNXXXXXX' => 1. Gosub(ael-dundi-e164,s,1(${EXTEN:1})) [pbx_ael] 2. Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) [pbx_ael] Include => 'ael-dundi-e164-lookup' [pbx_ael] [ Context 'ael-trunkint' created by 'pbx_ael' ] '_9011.' => 1. Gosub(ael-dundi-e164,s,1(${EXTEN:4})) [pbx_ael] 2. Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) [pbx_ael] Include => 'ael-dundi-e164-lookup' [pbx_ael] [ Context 'ael-iaxprovider' created by 'pbx_ael' ] [ Context 'ael-iaxtel700' created by 'pbx_ael' ] '_91700XXXXXXX' => 1. Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel) [pbx_ael] [ Context 'ael-dundi-e164' created by 'pbx_ael' ] 's' => 1. Set(LOCAL(exten)=${ARG1}) [pbx_ael] 2. Goto(${exten},1) [pbx_ael] 3. Return() [pbx_ael] [ Context 'ael-dundi-e164-lookup' created by 'pbx_ael' ] Include => 'ael-dundi-e164-local' [pbx_ael] Include => 'ael-dundi-e164-switch' [pbx_ael] [ Context 'ael-dundi-e164-switch' created by 'pbx_ael' ] Alt. Switch => 'DUNDi/e164' [pbx_ael] [ Context 'ael-dundi-e164-local' created by 'pbx_ael' ] Include => 'ael-dundi-e164-canonical' [pbx_ael] Include => 'ael-dundi-e164-customers' [pbx_ael] Include => 'ael-dundi-e164-via-pstn' [pbx_ael] [ Context 'parkedcalls' created by 'res_features' ] Segmentation Fault - core dumped