MGCP with more than two lines

Hi,

I recently downloaded and installed Asterisk 11.6.0. When I have only two PacketCable devices, Asterisk works but when I add a third PacketCable device Asterisk fails to start. Is this a licensed feature?

I get the following messages in /var/log/Asterisk/messages when attempting to start Asterisk:

[Dec 4 22:57:03] Asterisk 11.6.0 built by root @ localhost.localdomain on a i686 running Linux on 2013-11-19 02:52:57 UTC
[Dec 4 22:57:03] NOTICE[1719] cdr.c: CDR simple logging enabled.
[Dec 4 22:57:03] NOTICE[1719] loader.c: 196 modules will be loaded.
[Dec 4 22:57:03] NOTICE[1719] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Dec 4 22:57:03] NOTICE[1719] config.c: Registered Config Engine sqlite3
[Dec 4 22:57:03] WARNING[1719] chan_dahdi.c: Ignoring any changes to ‘userbase’ (on reload) at line 23.
[Dec 4 22:57:03] WARNING[1719] chan_dahdi.c: Ignoring any changes to ‘vmsecret’ (on reload) at line 31.
[Dec 4 22:57:03] WARNING[1719] chan_dahdi.c: Ignoring any changes to ‘hassip’ (on reload) at line 35.
[Dec 4 22:57:03] WARNING[1719] chan_dahdi.c: Ignoring any changes to ‘hasiax’ (on reload) at line 39.
[Dec 4 22:57:03] WARNING[1719] chan_dahdi.c: Ignoring any changes to ‘hasmanager’ (on reload) at line 47.
[Dec 4 22:57:03] NOTICE[1719] chan_skinny.c: Configuring skinny from skinny.conf
[Dec 4 22:57:03] NOTICE[1719] confbridge/conf_config_parser.c: Adding default_user profile to app_confbridge
[Dec 4 22:57:03] NOTICE[1719] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[Dec 4 22:57:03] NOTICE[1719] pbx_ael.c: Starting AEL load process.
[Dec 4 22:57:03] NOTICE[1719] pbx_ael.c: AEL load process: parsed config file name ‘/etc/asterisk/extensions.ael’.
[Dec 4 22:57:03] NOTICE[1719] pbx_ael.c: AEL load process: checked config file name ‘/etc/asterisk/extensions.ael’.
[Dec 4 22:57:03] NOTICE[1719] pbx_ael.c: AEL load process: compiled config file name ‘/etc/asterisk/extensions.ael’.
[Dec 4 22:57:03] NOTICE[1719] pbx_ael.c: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[Dec 4 22:57:03] NOTICE[1719] pbx_ael.c: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.

My PacketCable Devices setup as follows with 3 devices:

; PacketCable
[macaddress.domain.net]
host = 10.10.10.25 ; ip address
callwaiting = 0
canreinvite = 0
dtmfmode = rfc2833
ncs = yes ; Use NCS 1.0 signalling
pktcgatealloc = yes ; Allocate DQOS gate on CMTS
hangupongateremove = yes ; Hangup the channel if the CMTS close the gate
callerid = 7015
accountcode = test-3622622229
;line => aaln/1
callerid = 7016
accountcode = test-3622622230
line => aaln/2

The open source code can’t and doesn’t implement any licensing limits.

The log doesn’t show anything wrong.

You need to google “asterisk wiki backtrace”.

Thank you for your reply David,

I ran a backtrace as you recommended, not sure what it means…

#20 0x080737e0 in ast_strlen_zero (chan=0x8c65d98, data=0x1 <Address 0x1 out of bounds>) at /usr/src/asterisk-11.6.0/include/asterisk/strings.h:65
#21 ast_app_group_set_channel (chan=0x8c65d98, data=0x1 <Address 0x1 out of bounds>) at app.c:1497
#22 0x08076bfa in strip_quotes (a=0x8c65d30, b=0x0) at ast_expr2.y:604
#23 op_tildetilde (a=0x8c65d30, b=0x0) at ast_expr2.y:1662
#24 0x08073742 in ast_app_group_set_channel (chan=0x8c65d30, data=0x0) at app.c:1520
#25 0x080744e4 in __ast_play_and_record (chan=0x0, playfile=, recordfile=0x80fa4ba “%s”, maxtime=147217712, fmt=, duration=0xbf8d59d8, sound_duration=0x80950e5, beep=134827216, silencethreshold=134827136, maxsilence=, path=0x1 <Address 0x1 out of bounds>, prepend=255, acceptdtmf=0x3 <Address 0x3 out of bounds>, canceldtmf=0x0, skip_confirmation_sound=147217712) at app.c:1224
#26 0x08060797 in ?? ()
#27 0x0805fe19 in ?? ()
#28 0x00896ce6 in ?? ()
#29 0x0805e021 in ?? ()

You need to recompile with no-optimise, obtain a new backtrace, and submit a bug report to issues.asterisk.org/jira/

You need to attach the complete gdb output, including the bit that says segmentation violation…

The backtrace you have indicates that an invalid address has been passed to the string length function (probably offset 1 from a null pointer). I’m not familiar with ast_play_and_record or the functions above it, so I’m not sure what it was trying to do at the time, although it looks as though it was trying to parse a character string.

OK, finally got it resolved thats to some help from voiplinux.
When installing Asterisk I forgot to include pktcCOPS module. After enabling and recompiling the module, problem was resolved.

It still should not have crashed.

You are right,

After a reboot the problem came back again. Tried 11.6, 11.7, and 1.825 and they all crash when having more then 2 MGCP devices registered.