[Home]

Summary:ASTERISK-07682: SIP transfer by an Agent fails and causes a segfault if show channels is issued
Reporter:Leonardo Gomes Figueira (sabbathbh)Labels:
Date Opened:2006-09-06 07:29:57Date Closed:2006-12-28 08:54:09.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Transfers
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) debug_agent_transfer_segfault_1.2-r42014_gdb.txt
( 1) debug_agent_transfer_segfault_1.2-r42014_logdebug.txt
( 2) debug_agent_transfer_segfault_1.2-r43552_gdb.txt
Description:After transfering a call answered by an agent from a queue using SIP transfer the caller is hangup and the transferee stays on (with no audio). If I issue a "show channels" on cli Asterisk segfault:

A- SIP/3050 (Soyo) calls queue
B- Agent/3054 - SIP/3054 (Grandstream) answer call
C- SIP/3054 (Grandstream) makes a SIP attended transfer to SIP/3053 (Polycom)
D- SIP/3050 (Soyo) gets a hangup after the transfer
E- Call stay up on SIP/3053 (Polycom)
F- Issuing a "show channels" on cli segfault Asterisk:

pfdesenv*CLI> show channels
Channel Location State Application(Data)
SIP/3053-89ad (None) Up Bridged Call(Agent/3054)
Agent/3054 s@macro-atende:900 Up Dial(SIP/3053|30|tT)
pfdesenv*CLI>
Disconnected from Asterisk server
Executing last minute cleanups

Backtrace of the core dumped attached.


****** ADDITIONAL INFORMATION ******

Tested on 1.2.11 and SVN-branch-1.2-r42014M, both with chan_agent_noapplock_on_cb.diff from 7458 applied (happens without the patch too).

This issue was first reported on bug 7458.
Comments:By: Serge Vecher (serge-v) 2006-09-06 09:05:49

Leonardo: let's see if you can produce a SIP debug trace illustrating the problem too. Please do the following:
1) Prepare test environment (reduce the ammount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
  console => notice,warning,error,debug
3) restart Asterik.
4) Enable SIP transaction logging with the following CLI commands:
set debug 4
set verbose 4
sip debug
5) Save complete console log to file and _attach_ said file to the bug.

By: Serge Vecher (serge-v) 2006-09-06 09:06:20

I think you wanted to look into this

By: Leonardo Gomes Figueira (sabbathbh) 2006-09-06 14:48:19

Uploaded:

debug_agent_transfer_segfault_1.2-r42014_logdebug.txt

with:

full => notice,warning,error,debug,verbose
set debug 4
set verbose 4
sip debug

Summary of this log:

SIP/3050 joins "myqueue"
myqueue calls Agent/3052 on SIP/3052
SIP/3052 answers SIP/3050
SIP/3052 make attended transfer to SIP/3053
SIP/3050 is hungup when transfer completed.
SIP/3053 stays on (no audio obviously).
"show channels" on cli segfault Asterisk.



By: Serge Vecher (serge-v) 2006-09-06 14:58:04

hmm, not sure why 3052 "stays on"; we send them "bye" and they reply with an "ok". Also, looks like the log ends at the most interesting moment; can you please rerun up to the point where you issue the "show channels" command and Asterisk will seg fault?

By: Leonardo Gomes Figueira (sabbathbh) 2006-09-06 16:04:51

It's SIP/3053 (transferee) that "stays on", sorry about that mistake.

The log ends when I issue the "show channels" and Asterisk segfault. In this moment we have 3 channels, from status:

Event: Status
Privilege: Call
Channel: SIP/3053-09a0b2c0
CallerID: 3053
CallerIDName: <unknown>
Account: 3052
State: Up
Link: Agent/3052
Uniqueid: 1157576251.6

Event: Status
Privilege: Call
Channel: Agent/3052
CallerID: 3050
CallerIDName: Ramal Teste
Account: 3052
State: Up
Context: sip_to_anywhere
Extension: 3053
Priority: 7
Seconds: 13
Link: SIP/3053-09a0b2c0
Uniqueid: 1157576251.5

Event: Status
Privilege: Call
Channel: SIP/3052-099fe6e8
CallerID: 3052
CallerIDName: <unknown>
Account:
State: Up
Link: ?5        X?
Uniqueid: 1157576247.1

The channel ids above will not match the ones from the log cause I got this "status" later repeating the crash procedure but the SIP peers are exactly the same.

Note the "Link:" from the last channel... On "status" I got this "garbage" and  probably this is the cause of "show channels" crash.

By: Serge Vecher (serge-v) 2006-09-06 16:15:29

ok, can you please try the patch in 7784 by tgrman to see if that solves the issue?

By: Olle Johansson (oej) 2006-09-08 11:17:00

This is not related to 7784 - that bug is in svn trunk and the code that causes that problem is not in 1.2.

By: Martin Vit (festr) 2006-09-25 16:39:52

i can confirm exactly the same scenario with latest revision 1.2-r43634 and also with r42110. I've also uploaded debug_agent_transfer_segfault_1.2-r43552_gdb.txt

By: jmls (jmls) 2006-11-01 06:22:11.000-0600

is this still a bug with 1.2.13 or 1.2-svn ?

By: Leonardo Gomes Figueira (sabbathbh) 2006-11-01 14:53:10.000-0600

jmls,

just tested and confirmed on 1.2.13 and SVN-branch-1.2-r46803

Leonardo

By: jmls (jmls) 2006-11-01 16:02:20.000-0600

sabbathbh, sorry but have you confirmed it is fixed or are you confirming it's broken :)

By: sabbath (sabbath) 2006-11-02 09:21:30.000-0600

Still broken.

By: Leonardo Gomes Figueira (sabbathbh) 2006-12-28 06:31:08.000-0600

To anyone following this issue:

It seems to be fixed by reverting revision change 35120 from channel.c. The details and discussion about it are on issue 8064:

http://bugs.digium.com/view.php?id=8064

By: Serge Vecher (serge-v) 2006-12-28 08:54:07.000-0600

alright, let's close this issue then and track the problem to an expeditious resolution, hopefully, in 8064.