[asterisk-bugs] [JIRA] (ASTERISK-20462) [patch] Trunk not hungup if SLA Station hangs up before answer

Matt Jordan (JIRA) noreply at issues.asterisk.org
Mon Nov 19 09:13:45 CST 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=199850#comment-199850 ] 

Matt Jordan commented on ASTERISK-20462:
----------------------------------------

The code change does feel a bit concerning.  The SLA code was developed without the use of ao2 ref counted objects, so accessing the SLA station without any threading primitives runs the risk of derefencing a pointer to memory that has been freed.  This could occur in that loop if a reload occurred while a trunk was being dialed.  Its hard to verify whether or not this is possible - the reload code explicitly checks the count of the SLA stations/trunk ringing lists to make sure that it only performs a reload when things aren't in use - but you may want to double check that the ringing trunks list is not 0 when the trunk is being dialed.  I'd expect that the station ringing list could go to 0 if a station was ringing and hung up.

If any of the ringing lists can't go to 0 during that loop, then I think you're okay.

As for the sleep in the polling loop - that always feels like a bit of a hack.  This could have been written differently by using callbacks from the Dial API and the Device State core - but that would probably require changes to the Dial API and a restructuring of the SLA code, which is way beyond the scope of anything that would occur in a release branch (much less for this problem).

How much does the CPU peg when its in that loop without the sleep statement?
                
> [patch] Trunk not hungup if SLA Station hangs up before answer
> --------------------------------------------------------------
>
>                 Key: ASTERISK-20462
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20462
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_meetme, Applications/SLA
>    Affects Versions: 1.8.15.0
>         Environment: Astlinux
>            Reporter: dkerr
>         Attachments: asterisk-trunk-bugid20462v2.patch, extensions.conf, Hangup before answer.txt, sip.conf, sla.conf
>
>
> If an SLA station hangs up before the called party answers, then the channel to the sla station is terminated, but the channel to the called party remains open and continues to ring until timeout. Or if the party answers then they get unobtainable tone and asterisk fails all over trying to connect to a meetme conference that does not exist.
> See attached log file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list