[asterisk-bugs] [Asterisk 0016218]: Asterisk does not connect the call to internal extension

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Nov 11 18:06:15 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16218 
====================================================================== 
Reported By:                mrmrmrmr
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16218
Category:                   Channels/chan_sip/General
Reproducibility:            sometimes
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           Older 1.6.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-11-10 13:47 CST
Last Modified:              2009-11-11 18:06 CST
====================================================================== 
Summary:                    Asterisk does not connect the call to internal
extension
Description: 
The following issue occurs in most of my calls received from an external
SIP proxy. So it is highly reproducable.
Very rarely, the call reaches the internal extension. 

Let me first describe the structure of my Asterisk Proxy:

It is running on a CentOS server with 2.6.30.4 kernel.
The server has 2 interfaces ; ppp0 accesses the external SIP proxy over
internet and has real IP address. br0 is the LAN interface which my SIP
clients are connected. Internal SIP clients are Linksys SPA3000 and Linksys
PAP2.
There is Shorewall firewall running on the server, but there is no NAT
either for the external call legs or internal call legs.

In the problematic call scenario, call is coming from an external SIP
proxy to my Asterisk server. The incoming rule sends the call to a ring
group (600) which should forward the call to 2 internal extensions (995 and
990).

Sometimes, the call is not connected to the internal clients. They don't
receive any SIP INVITE.
When I check the logs on Asterisk console I see "AGI Script
dialparties.agi completed, returning -1"
But I don't have any clue why dialparties.agi script returns "-1"
I am attaching the agi debug output to this issue.
I will also attach my existing sip configuration.

====================================================================== 

---------------------------------------------------------------------- 
 (0113696) mmichelson (administrator) - 2009-11-11 18:06
 https://issues.asterisk.org/view.php?id=16218#c113696 
---------------------------------------------------------------------- 
Most of the situations which would result in a -1 return for AGI operation
are obvious things, like the calling channel hanging up, or a command's
execution returning an error.

I have a hypothesis about the problem. I'm thinking that the problem is
that in ast_agi_send, there is a call to ast_carefulwrite. It may be that
ast_carefulwrite is encountering an error for some reason. It's not
mentioned specifically what version of 1.6.0 is being used here. I just
know it's an older version of 1.6.0. If you are using a version before
1.6.0.6, I would recommend as a diagnostic test to upgrade to a version >=
1.6.0.6. The reason is that ast_carefulwrite was rewritten in that version.
If nothing else, you may see a big red error message appear on the screen
explaining why ast_carefulwrite failed. You may even find that the rewrite
of ast_carefulwrite actually prevents the error you were seeing.

If you are using a version beyond 1.6.0.6 and you didn't see any error
messages during operation, then it is likely something else causing the
problem. As a followup, is the script actually reaching the end in the
example debug you provided, or is there still more to go in the script?
When the AGI fails, is it always at the end of the script, or does it
happen at other places during the script's operation? Does your AGI process
handle SIGHUP signals? If Asterisk detected an error when executing a
command, it would send a SIGHUP to your script. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-11 18:06 mmichelson     Note Added: 0113696                          
======================================================================




More information about the asterisk-bugs mailing list