[asterisk-bugs] [JIRA] (ASTERISK-27446) No 'h' extension run when call transferred by caller completes

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Nov 27 12:17:07 CST 2017


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

Richard Mudgett commented on ASTERISK-27446:
--------------------------------------------

Your scenario where A calls B and then A calls C to transfer B to C winds up with neither of the remaining call legs ever having executed dialplan.  Thus the remaining channels cannot execute the 'h' extension.  The log does show the 'h' exten is executed by both A channels when they hang up after the transfer.  The 'h' exten used to get executed in this scenario as a side effect of masquerades where one of the A channels became B or C.  Since v12, transfers operate in a different manner because of the bridging framework \[1].  The actual B or C channel is pulled out of one bridge and pushed into the other bridge and the A channel kicked out of the bridge.

You will need to use hangup handlers \[2] \[3] \[4] set on each channel to do what you want.

\[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Bridging+Project
\[2] https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers
\[3] https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers+Specification
\[4] http://blogs.asterisk.org/2017/03/29/dialplan-handler-routines-allow-customization/


> No 'h' extension run when call transferred by caller completes
> --------------------------------------------------------------
>
>                 Key: ASTERISK-27446
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27446
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 13.17.2
>         Environment: CentOS 7.2 64 bit.
>            Reporter: David Cunningham
>         Attachments: extensions.conf, no-h-extension1.txt
>
>
> When a caller does a REFER transfer to connect two calls, the 'h' extension is run immediately, and no 'h' extension is run when the transferred call actually hangs up. For example:
> 1000105 calls 1000103
> 1000105 calls 1000102
> 1000105 transfers one call to the other, and drops out of the call
> 1000103 and 1000102 talk
> 1000103 or 1000102 hangs up and the call completes, but no 'h' extension is run
> This means that our code on the Asterisk server can't correctly bill for the transferred call. This issue didn't happen on Asterisk 11 and prior.
> I've attached the dial plan, and an Asterisk console trace in case it's useful. Important points are:
> Line 142: Dial plan logs start of call 1511749212.44
> Line 668: Dial plan logs start of call 1511749221.46
> Line 950: REFER happens
> Line 1010: Dial plan logs end of call 1511749212.44
> Line 1013: Dial plan logs end of call 1511749221.46
> Line 1240: Bridge torn down after transferred call ends, but no end of call is logged because 'h' extension is not run
> Please let us know if anything else would be useful.



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



More information about the asterisk-bugs mailing list