Asterisk ERROR astobj2.c: user_data is NULL

We have asterisk version 13.2.0, We getting this error message on my Asterisk CLI and log message, We don’t do anything 30 Sec asterisk restarts and all calls are disconnected.

[quote][Jun 18 15:50:10] NOTICE[5316][C-0001f0b7] core_local.c: No such extension/conte
xt 15302233@2ndline2 while calling Local channel
[Jun 18 15:50:10] NOTICE[5316][C-0001f0b7] app_queue.c: Forwarding failed to dia
l ‘Local/15302233@2ndline2’
[Jun 18 15:50:10] ERROR[5316][C-0001f0b7] astobj2.c: user_data is NULL
[Jun 18 15:50:10] ERROR[5316][C-0001f0b7] astobj2.c: user_data is NULL
[Jun 18 15:50:10] ERROR[5316][C-0001f0b7] astobj2.c: user_data is NULL
[Jun 18 15:50:10] ERROR[5316][C-0001f0b7] astobj2.c: user_data is NULL
[Jun 18 15:50:10] ERROR[5316][C-0001f0b7] astobj2.c: user_data is NULL



[Jun 18 15:50:39] ERROR[5316][C-0001f0b7] astobj2.c: user_data is NULL
[Jun 18 15:50:39] ERROR[5316][C-0001f0b7] astobj2.c: user_data is NULL
[Jun 18 15:55:46] Asterisk 13.2.0 built by root @ acer-a0767a1e95 on a x86_64 ru
nning Linux on 2015-02-19 07:59:22 UTC
[Jun 18 15:55:46] WARNING[7098] config.c: No ‘=’ (equal sign) in line 29 of /etc
/asterisk/http.conf
[Jun 18 15:55:46] NOTICE[7098] cdr.c: CDR simple logging enabled.
[Jun 18 15:55:47] NOTICE[7098] loader.c: 301 modules will be loaded.[/quote]

It error message, We don’t know what happened, if there is a fix for it. All info appreciated.

Thanks in advance

I’d suggest upgrading to Asterisk 13.4.0, there have been substantial changes done some of which would resolve problems like this. If after upgrading you still encounter the problem a complete console log, information about the environment, and a backtrace from the core (it looks like it crashed) would be useful.

Now we have asterisk 13.4 , But can’t solve this problem.

[quote][Oct 16 11:08:53] VERBOSE[20238][C-0010f5ec] chan_sip.c: Got SIP response 302 “Moved Temporarily” back from 10.65.165.5:51067
[Oct 16 11:08:53] VERBOSE[35992][C-0010f5ec] app_queue.c: Now forwarding SIP/3bbcc-outbound-002181ac to ‘Local/15302413@2ndline2’ (thanks to SIP/15302413-00218223)
[Oct 16 11:08:53] NOTICE[35992][C-0010f5ec] core_local.c: No such extension/context 15302413@2ndline2 while calling Local channel
[Oct 16 11:08:53] NOTICE[35992][C-0010f5ec] app_queue.c: Forwarding failed to dial ‘Local/15302413@2ndline2’
[Oct 16 11:08:53] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:08:53] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
.
.
.
[Oct 16 11:09:22] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:09:22] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:09:22] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:09:22] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:09:22] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:09:22] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:09:22] ERROR[35992][C-0010f5ec] astobj2.c: user_data is NULL
[Oct 16 11:12:54] Asterisk 13.4.0 built by root @ cc1-3bb.triplet.co.th on a x86_64 running Linux on 2015-07-01 02:19:59 UTC
[Oct 16 11:12:54] VERBOSE[37572] manager.c: Manager registered action DBGet
[Oct 16 11:12:54] VERBOSE[37572] manager.c: Manager registered action DBPut
[Oct 16 11:12:54] VERBOSE[37572] manager.c: Manager registered action DBDel
[Oct 16 11:12:54] VERBOSE[37572] manager.c: Manager registered action DBDelTree
[Oct 16 11:12:54] VERBOSE[37572] message.c: Message handler ‘dialplan’ registered.
[Oct 16 11:12:54] VERBOSE[37572] pbx.c: Registered custom function ‘MESSAGE’
[Oct 16 11:12:54] VERBOSE[37572] pbx.c: Registered custom function ‘MESSAGE_DATA’
[Oct 16 11:12:54] VERBOSE[37572] pbx.c: Registered application ‘MessageSend’
[/quote]

Information backtrace
Use Command : gdb -ex “thread apply all bt” --batch /usr/sbin/asterisk pidof asterisk > /tmp/backtrace-threads.txt
https://drive.google.com/file/d/0Bx90Ie9kTnEjZEhHeTZsdHlWeW8/view?usp=sharing

Thanks in advance

I’d suggest filing an issue on the issue tracker[1] with complete details, the backtrace, configuration, and flow information so it can be looked at further since it was not fixed with the upgrade.

[1] issues.asterisk.org/jira

The backtrace is essential. Unless you can provide it, or extremely detailed instructions on how to reliably repeat the fault, it is not going to be practical to debug this.

Hi
I found that the problem is caused by SoftPhone 3CX version 6.0, When press Auto-VM (Auto Voicemail) if call to agent that make the problem, Thank you everyone.

I have seen this error which is immediately preceded by something like this:

[Aug 10 12:45:42] NOTICE[9264][C-0000072f] core_local.c: No such extension/context FDMC_09_0000_0716@fdmc_users while calling Local channel
[Aug 10 12:45:42] NOTICE[9264][C-0000072f] app_queue.c: Forwarding failed to dial ‘Local/FDMC_09_0000_0716@fdmc_users’
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL
[Aug 10 12:45:42] ERROR[9264][C-0000072f] astobj2.c: user_data is NULL

etc etc etc.

on two different systems one using pjsip and the other using chan_sip (so as to hopefully get away from this issue because that’s what Digium support seemed to think was causing it). On the original system we started with Asterisk 13.1-cert2, tried cert8 then tried the latest bleeding edge, whatever that was at the time along with several versions of DPMA and several versions of pjproject (mainly because the upgraded dpma required it) and various D40 firmware versions.

The second system running 13.9.1 which went live today suffers apparently from the same issue. What is needed from the logs to help troubleshoot it? I have two different running systems that are showing this issue and short of moving back to asterisk 11 I’m not sure what to do with it. The above is from the second system on chan_sip.

It’s going to be a secondary error, so you really need to work out what is going wrong. I presume the no such extension error is genuine.

@david551 is right in that fixing the issue where the forward fails would prevent the error from occurring. That being said, I think the continual errors that occur after failing to forward the Local channel occur are due to an improperly handled off-nominal condition.

I took a look at the log statement just prior to the errors being reported from astobj2:

	if (ast_call(o->chan, stuff, 0)) {
		ast_log(LOG_NOTICE, "Forwarding failed to dial '%s/%s'\n",
			tech, stuff);
		do_hang(o);
		numnochan++;
	}
}

ast_channel_publish_dial(qe->chan, o->chan, stuff, NULL);
ast_channel_publish_dial_forward(qe->chan, original, o->chan, NULL,
	"CANCEL", ast_channel_call_forward(original));

You can see that if we log out Forwarding failed to dial ..., we immediately hangup the o channel:

static void do_hang(struct callattempt *o)
{
	o->stillgoing = 0;
	ast_hangup(o->chan);
	o->chan = NULL;
}

Note that o->chan is now NULL.

Immediately after this, we attempt to raise events about the now cancelled dial:

	ast_channel_publish_dial(qe->chan, o->chan, stuff, NULL);
	ast_channel_publish_dial_forward(qe->chan, original, o->chan, NULL,
		"CANCEL", ast_channel_call_forward(original));

Those function calls are going to try and interact with o->chan, which is now quite NULL.

Please file a bug report for this, as there should be enough information in your CLI snippet to figure out what is happening. Attaching a full log, along with your queues.conf and extensions.conf, however, would be appreciated, as it will make verifying that I’m right a lot easier :slight_smile:

I will submit all that right now.

Edit: Here is the issue https://issues.asterisk.org/jira/browse/ASTERISK-26286

Just to close the loop on this conversation, this issue occurs if you are using non-Local channel Queue members who perform a call forward to an invalid dialplan location. If you run into it, you can work around the problem by ensuring that there is always a valid dialplan location for your call forwards, or by adding an invalid (i) extension handler.

The fix for this has been merged into all the affected branches, and should make it out in the next non-RC release of Asterisk 13 (13.12.0).

1 Like