[asterisk-bugs] [JIRA] (ASTERISK-24624) Transfer to invalid extension results in hung channel.

Mark Michelson (JIRA) noreply at issues.asterisk.org
Wed Jan 14 13:55:34 CST 2015


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

Mark Michelson commented on ASTERISK-24624:
-------------------------------------------

The reason I could not reproduce this was because it requires specific phone behavior in order to happen. As part of a transfer operation, Asterisk sends NOTIFY requests to the transferring party to let them know how the outbound call of the blind transfer is proceeding. When the blind transfer goes to an extension where things go badly, Asterisk sends a NOTIFY request that says things went badly. When a Digium phone receives this NOTIFY, it sends a BYE and is done.

When a Bria phone (and potentially others) receives this NOTIFY, it tries to reinvite itself back into the call. This reinvite is a bit confusing to Asterisk, because at the time the transfer was performed, we killed the channel of the transferring party. So when the reinvite arrives into chan_pjsip, chan_pjsip sees that there is no channel on the session and creates one. However, later code that is responsible for routing incoming channels sees that this is a reinvite and just takes no action. The result is a channel that gets created but then just sits there doing nothing.

Interestingly, sending a BYE on the dialog does not end up clearing the hung channel. This is likely because the channel reference that was created during the reinvite is leaked since the reference was never given to a channel thread. The resulting reference leak means that on session destruction, the corresponding channel is not freed.

I will work on a sensible solution to this and get back to you when I have a patch.

> Transfer to invalid extension results in hung channel.
> ------------------------------------------------------
>
>                 Key: ASTERISK-24624
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24624
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.0.0, 13.0.1, 13.0.2, 13.1.0
>            Reporter: Zane Conkle
>            Assignee: Mark Michelson
>
> When attempting to blind transfer a call to an invalid extension or resource the channel will hang in the "Ring" state.
> I was able to duplicate this by blind transferring a call to a mailbox that does not exist. Below is the CLI output along with the stuck channel.
> {code}    -- Executing [s200-DEFAULT at default:1] Dial("SIP/carrier1-00000002", "PJSIP/200_default,10")
>     -- Called PJSIP/200_default
>     -- PJSIP/200_default-00000002 is ringing
>     -- PJSIP/200_default-00000002 answered SIP/carrier1-00000002
>     -- Channel SIP/carrier1-00000002 joined 'simple_bridge' basic-bridge <44f9110a-2508-4e62-acb4-75beca76ce31>
>     -- Channel PJSIP/200_default-00000002 joined 'simple_bridge' basic-bridge <44f9110a-2508-4e62-acb4-75beca76ce31>
>     -- Started music on hold, class 'default', on channel 'SIP/carrier1-00000002'
>     -- Stopped music on hold on SIP/carrier1-00000002
>     -- Channel SIP/carrier1-00000002 left 'simple_bridge' basic-bridge <44f9110a-2508-4e62-acb4-75beca76ce31>
>     -- Channel PJSIP/200_default-00000002 left 'simple_bridge' basic-bridge <44f9110a-2508-4e62-acb4-75beca76ce31>
>     -- Executing [1234 at default:1] VoiceMail("SIP/carrier1-00000002", "5678 at default") in new stack
> [Dec 16 10:29:58] WARNING[3204][C-00000002]: app_voicemail.c:6467 leave_voicemail: No entry in voicemail config file for '5678'
>     -- Auto fallthrough, channel 'SIP/carrier1-00000002' status is 'ANSWER'
> [root at pbx ~]# asterisk -rx "core show channels verbose" 
> Channel              Context              Extension        Prio State   Application  Data                      CallerID        Duration Accountcode PeerAccount BridgeID            
> PJSIP/200_default    default              s                   1 Ring    (None)       (Empty)                   200             00:27:57 default 
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list