Summary:ASTERISK-14284: [regression] Received invalid event that had no device IE
Reporter:Kaoe Coito (kaoe)Labels:
Date Opened:2009-06-08 18:52:14Date Closed:2011-07-26 15:18:23
Versions:Frequency of
Description: I use Asterisk whith TE410P and 3 weeks ago a upgrade my driver to DAHDI, but now I receive error in my E1 dials:

ERROR[26709]: pbx.c:8330 device_state_cb: Received invalid event that had no device IE
ERROR[26709]: app_queue.c:856 device_state_cb: Received invalid event that had no device IE

This errors ocurrer after 20 or more simultaneos calls, i use 4 PTSN connected in this card and the errors ocurer in all. In the other point of E1 (PSTN) the information is error in E1 frame.

I test to downgrade de version of dahdi or upgrade dahdi to RCx versions but the error persist in all version tested.


My Asterisk is Asterisk

Before the upgrade of 3 weeks ago the use all E1 channels whith 120 simultaneos calls whith no problems.
Comments:By: David Woolley (davidw) 2009-08-20 13:07:28

For, at least, this will happen if the first side of an AMI Originate, or, presumably the channel side of a call file call, fails.

ast_pbx_outgoing_exten calls ast_pbx_outgoing_cdr_failed to create a call detail record, after destroying the original channel.  This creates a temporary channel structure in order to issue the CDR, but never gives it a name.  It then calls ast_channel_free, which tries to report a device state change to INVALID, which has no associated device name.  The error isn't detected until two process switches later.

Either ast_pbx_outgoing_cdr_failed should provide a dummy name, or ast_channel_free should recognize a special case and not try to report a device state change.

I discovered this whilst debugging ASTERISK-14304 against Asterisk, although it was unrelated to the real problem there.

By: David Woolley (davidw) 2009-08-20 13:08:56

PS this is not a dahdi issue!

By: Leif Madsen (lmadsen) 2009-09-21 10:15:33

What version did this work in, and what version did this *first* break in? I'd like to know where the regression happened.

I have set this to CDR/General category based on what davidw stated, but if anyone can think of a better category, I can change it.

By: dread (dread) 2009-10-12 03:35:23

Error occurs in versions, 1.6.0 cvn
Occurs when a large number of calls (more than 20 per minute) I use sip trunks.

[Oct 12 13:11:18] ERROR[11367]: pbx.c:8350 device_state_cb: Received invalid event that had no device IE
[Oct 12 13:11:18] ERROR[11367]: app_queue.c:856 device_state_cb: Received invalid event that had no device IE

By: Whit Thiele (sirwhit) 2009-11-17 17:46:12.000-0600

I also have been experiencing this error during the Manager Originate action with high volume sip trunks:

[Nov 17 14:56:03] ERROR[29591]: pbx.c:8350 device_state_cb: Received invalid event that had no device IE
[Nov 17 14:56:03] ERROR[29591]: app_queue.c:856 device_state_cb: Received invalid event that had no device IE

debug on with level does not show anything related to this error.. I get an OutgoingSpoolFailed message with reason 0

By: Whit Thiele (sirwhit) 2009-11-17 17:46:35.000-0600

Sorry I forgot to add that is on as well

By: David Woolley (davidw) 2009-11-18 07:59:14.000-0600

This symptom happens for any outgoing spool failure.  You need to determine if the OutgoingSpoolFailed message is correct.  If not, you need to raise that as a separate issue.

Most people who get the invalid event failure have underlying problems that are outside Asterisk's control.

Incidentally, I would downgrade this to minor, as the major was based on a mis-diagnosis.

By: Leif Madsen (lmadsen) 2009-11-18 08:13:22.000-0600

Thanks for the triage davidw. I'm not sure where to take this issue, and your comments are very helpful.

By: Whit Thiele (sirwhit) 2009-12-09 13:21:18.000-0600

davidw: could you please elaborate on what the "first side of an AMI originate" means?

I've tried using AMI to originate calls to a known valid number, and it seems to fail about 5-10% of the time. I've used 8 different SIP termination providers so I'm pretty sure it isn't carrier specific. The originated call seems to fail almost immediately and doesn't time out. I'm not sure how else to debug whats going on and open to suggestions.

By: David Woolley (davidw) 2009-12-10 06:13:14.000-0600

The Channel: side.  AMI Originate establishes a call to the channel before running the application or calling the extension.  It is a failure to establish that channel that takes it down the path that eventually produces this message.  Failures on the application or extension are handled normally.

The failure to establish the channel is either a support issue, or requires a new bug report.  The current issue is only about how that failure gets reported.  In our cases the actual failure is not Asterisk's fault.

To be clear, there is a problem with Asterisk, but that problem is not causing the Originate to fail.  All it is doing is producing an inappropriate, and confusing, error message when it does fail.

By: Atis Lezdins (atis) 2010-03-04 09:16:24.000-0600

Please try patch 'fake_newchannel_event_2.patch' from issue ASTERISK-15740 - it removes the error for me.

By: Vadim Mikhnevych (vmikhnevych) 2010-11-18 08:40:53.000-0600

I've got something similar on

 == Using SIP RTP CoS mark 5
 == Using UDPTL CoS mark 5
[Nov 18 15:35:11] NOTICE[14663]: channel.c:4064 __ast_request_and_dial: Unable to request channel SIP/2540
[Nov 18 15:35:11] ERROR[7940]: pbx.c:9296 device_state_cb: Received invalid event that had no device IE
[Nov 18 15:35:11] ERROR[7940]: app_queue.c:1109 device_state_cb: Received invalid event that had no device IE

Peer 2540 status was UNKNOWN.

By: leearcher (leearcher) 2010-12-06 05:04:57.000-0600

I had this issue using Asterisk.Net and sending an originate event.  I eventually realised that I wasn't setting the timeout.  Once set in the app error went away and calls worked fine.

The 'fake_newchannel_event_2.patch' removed the error but I still had the issue with a missing timeout.

By: Russell Bryant (russell) 2011-07-26 15:18:17.564-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks!