[Home]

Summary:ASTERISK-14168: [patch] Message: "Unable to handle indication 3"
Reporter:Marc M. Adkins (madkins)Labels:
Date Opened:2009-05-19 13:29:05Date Closed:2009-06-12 14:08:58
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 15158.patch
( 1) extensions.conf
( 2) sip.conf
( 3) sip-debug.log
Description:I get this when I connect to a Cisco 7905g.  I have a core asterisk server, then an asterisk dev pbx, then the phone.  So the phone is not directly connected to the asterisk that is throwing the error.


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

I dug down into the code and used a bunch of trace statements to figure out what is happening.

The internal state for the connection is going from AST_STATE_RING to AST_STATE_UP fairly quickly, in the normal sequence of events. Then, later by a bit, the phone sends a "ringing" message. At that point the ringing message makes no sense to Asterisk because it's already opened the connection (the state is AST_STATE_UP) so the message gets thrown.

It seems like the error is actually occurring in sip_indicate() in chan_sip.c.  Here is where the indication is marked as incorrect.  It seems like the code:

case AST_CONTROL_RINGING:
if (ast->_state == AST_STATE_RING) {

should be modified to also allow AST_STATE_UP to allow for late ring indications.
Comments:By: Mark Michelson (mmichelson) 2009-06-12 11:01:56

A few things. First off, is this actually causing any noticeable faulty behavior, or is the problem just that you are seeing that warning message? You say that the problem occurs when you attempt to "connect to" a Cisco phone. Are you trying to call the Cisco from a second phone?

Can you post the extensions.conf entry for the extension you are dialing from your core Asterisk PBX? Also, I think a sip debug would be helpful for this situation too.

While I can't say anything definitive, if I had to make a guess as to what is happening here, I'd say that the core Asterisk PBX has an Answer() statement in the dialplan before dialing out. As a result when a 180 Ringing message comes in over the outbound SIP channel, we can't indicate this to the calling SIP phone because we already answered it.

By: Mark Michelson (mmichelson) 2009-06-12 11:04:41

Oh, and sorry for not saying this before. I think you're on the right track. If we are trying to indicate ringing to a channel which is already up, we should probably not return an error (-1) in sip_indicate. We should probably just return 0.

By: Marc M. Adkins (madkins) 2009-06-12 11:18:08

There is no noticeable faulty behavior.  I'm just seeing the warning message.  I filed the bug on general principles, but I do not anticipate any negative issues with our system, especially since we'll normally be handling normal SIP calls from the outside world and not using the Cisco phones at all.  Mostly I figured it would save someone else confusion in the long run.

The message seems to pop up when Asterisk calls out to a second phone.  During testing I call from one SIP phone to our Asterisk / (Perl) AGI application and the AGI daemon calls to a second phone.  At that point I see one or two such messages.

And yes, I believe that I'm invoking Answer() prior to dialing out.  That may be inappropriate, but I figured I was answering the incoming call.  Belt and suspenders?

By: Marc M. Adkins (madkins) 2009-06-12 11:23:58

Our configuration files may not be really useful.  The action is all occurring in the AGI daemon.  I should note that the phone connects to an Asterisk instance configured as a PBX which is used to route test calls between various development and qa environments.  Each of those is an instance of the main Asterisk / AGI setup specified above.

The behavior in question can occur on either the PBX or a core instance.  I was just fooling around and it looks like I don't see it on the PBX when I let the core Asterisk make the outbound call, but I do see it on the PBX when I use it to call from one SIP phone to another (not invoking the core Asterisk / AGI instance at all).  I'll post the PBX configuration.

By: Marc M. Adkins (madkins) 2009-06-12 11:36:44

OK, I attached some files that should provide the simplest possible example.  One phone calling the other via the PBX, not leaving the PBX at all, no messing with the core Asterisk / AGI application at all.  The message is in the SIP debug log.

I probably glorked the configuration files.  I spend a lot of time in configuration hell.  That's why my extensions.conf file invokes satan.  ;-)

By: Mark Michelson (mmichelson) 2009-06-12 11:40:25

Thanks for the quick feedback. Yeah, having an Answer() prior to dialing out is sort of a "belt and suspenders" thing. It actually can be a bit counterproductive, too, since the phone will think the call has been answered whereas the person actually using the phone will not. I'm at a bit of a loss as to what real implications this might have, though.

I will give you a test patch that implements the idea in sip_indicate idea that it is not an "error" if ringing is trying to be sent to a phone which has already been answered. Before uploading it, I'll need to be sure that ringing is still indicated inband with such a change.

By: Marc M. Adkins (madkins) 2009-06-12 11:56:22

Removing the Answer() steps from the two extensions in the PBX configuration gets rid of the error message.  But you already knew that.  Still looking at the more complex Asterisk / AGI instance, perhaps the same change is applicable there as well.

By: Mark Michelson (mmichelson) 2009-06-12 12:10:05

Try giving the 15158.patch a try with your initial config and see if the message is still present. Thanks!

By: Marc M. Adkins (madkins) 2009-06-12 12:34:23

Fixes both the PBX (used stand-alone between two phones) and the Asterisk / AGI component.

By: Digium Subversion (svnbot) 2009-06-12 14:06:41

Repository: asterisk
Revision: 200360

U   branches/1.4/main/channel.c

------------------------------------------------------------------------
r200360 | mmichelson | 2009-06-12 14:06:41 -0500 (Fri, 12 Jun 2009) | 10 lines

Suppress a warning message and give a better return code when generating
inband ringing after a call is answered.

(closes issue ASTERISK-14168)
Reported by: madkins
Patches:
     15158.patch uploaded by mmichelson (license 60)
Tested by: madkins


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=200360

By: Digium Subversion (svnbot) 2009-06-12 14:07:51

Repository: asterisk
Revision: 200361

_U  trunk/
U   trunk/main/channel.c

------------------------------------------------------------------------
r200361 | mmichelson | 2009-06-12 14:07:51 -0500 (Fri, 12 Jun 2009) | 16 lines

Merged revisions 200360 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r200360 | mmichelson | 2009-06-12 14:06:41 -0500 (Fri, 12 Jun 2009) | 10 lines
 
 Suppress a warning message and give a better return code when generating
 inband ringing after a call is answered.
 
 (closes issue ASTERISK-14168)
 Reported by: madkins
 Patches:
       15158.patch uploaded by mmichelson (license 60)
 Tested by: madkins
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=200361

By: Digium Subversion (svnbot) 2009-06-12 14:08:15

Repository: asterisk
Revision: 200362

_U  branches/1.6.0/
U   branches/1.6.0/main/channel.c

------------------------------------------------------------------------
r200362 | mmichelson | 2009-06-12 14:08:15 -0500 (Fri, 12 Jun 2009) | 23 lines

Merged revisions 200361 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r200361 | mmichelson | 2009-06-12 14:07:51 -0500 (Fri, 12 Jun 2009) | 16 lines
 
 Merged revisions 200360 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r200360 | mmichelson | 2009-06-12 14:06:41 -0500 (Fri, 12 Jun 2009) | 10 lines
   
   Suppress a warning message and give a better return code when generating
   inband ringing after a call is answered.
   
   (closes issue ASTERISK-14168)
   Reported by: madkins
   Patches:
         15158.patch uploaded by mmichelson (license 60)
   Tested by: madkins
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=200362

By: Digium Subversion (svnbot) 2009-06-12 14:08:35

Repository: asterisk
Revision: 200363

_U  branches/1.6.1/
U   branches/1.6.1/main/channel.c

------------------------------------------------------------------------
r200363 | mmichelson | 2009-06-12 14:08:35 -0500 (Fri, 12 Jun 2009) | 23 lines

Merged revisions 200361 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r200361 | mmichelson | 2009-06-12 14:07:51 -0500 (Fri, 12 Jun 2009) | 16 lines
 
 Merged revisions 200360 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r200360 | mmichelson | 2009-06-12 14:06:41 -0500 (Fri, 12 Jun 2009) | 10 lines
   
   Suppress a warning message and give a better return code when generating
   inband ringing after a call is answered.
   
   (closes issue ASTERISK-14168)
   Reported by: madkins
   Patches:
         15158.patch uploaded by mmichelson (license 60)
   Tested by: madkins
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=200363

By: Digium Subversion (svnbot) 2009-06-12 14:08:58

Repository: asterisk
Revision: 200364

_U  branches/1.6.2/
U   branches/1.6.2/main/channel.c

------------------------------------------------------------------------
r200364 | mmichelson | 2009-06-12 14:08:57 -0500 (Fri, 12 Jun 2009) | 23 lines

Merged revisions 200361 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r200361 | mmichelson | 2009-06-12 14:07:51 -0500 (Fri, 12 Jun 2009) | 16 lines
 
 Merged revisions 200360 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r200360 | mmichelson | 2009-06-12 14:06:41 -0500 (Fri, 12 Jun 2009) | 10 lines
   
   Suppress a warning message and give a better return code when generating
   inband ringing after a call is answered.
   
   (closes issue ASTERISK-14168)
   Reported by: madkins
   Patches:
         15158.patch uploaded by mmichelson (license 60)
   Tested by: madkins
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=200364