[asterisk-users] hangup the _called_ channel ?

sean darcy seandarcy2 at gmail.com
Wed Sep 12 12:57:29 CDT 2018


On 9/12/18 1:32 PM, Joshua Colp wrote:
> On Wed, Sep 12, 2018, at 2:25 PM, sean darcy wrote:
>> On 9/12/18 1:22 PM, Joshua Colp wrote:
>>> On Wed, Sep 12, 2018, at 2:19 PM, sean darcy wrote:
>>>> I understand that HangUp() hangs up the calling channel. I want to
>>>> hangup the called channel.
>>>>
>>>> SIP/mycall-xxxxx calls and bridges with DAHDI/1-1.
>>>>
>>>> I send SIP/....  to listen to a long, very long, file.
>>>
>>> Define "send". How are you doing it?
>>>
>> GoSub(play-long-file,s,1)
> 
> You can't have a channel both in dialplan directly and also bridged to another channel at the same time. There's not enough context or information to really be able to answer without understanding fully.
> 

Maybe this will help explain it. Here's the cli:

Executing [s at incoming:7] Dial("SIP/incall-00000001", 
"DAHDI/g0,55,tTD(:1)") in new stack
     -- Called DAHDI/g0
     -- DAHDI/1-1 answered SIP/incall-00000001
     -- Channel DAHDI/1-1 joined 'simple_bridge' basic-bridge 
<5312c0a8-7697-4a97-b3ff-ff0484fbaf3d>
     -- Channel SIP/incall-00000001 joined 'simple_bridge' basic-bridge 
<5312c0a8-7697-4a97-b3ff-ff0484fbaf3d>
     -- SIP/incall-00000001 Internal Gosub(long-file,s,1) start
     -- Executing [s at long-file:1] Playback("SIP/incall-00000001", 
"long-file") in new stack
     -- <SIP/callcentric20-00000001> Playing 'long-file.slin' (language 
'en')
     -- Executing [s at long-file:2] Verbose("SIP/incall-00000001", 
"bridgepeer is DAHDI/1-1") in new stack
Executing [s at long-file:3] Hangup("SIP/incall-00000001", "") in new stack
   == Spawn extension (long-file, s, 3) exited non-zero on 
'SIP/incall-00000001'
[Sep 12 13:06:06] NOTICE[2217][C-00000001]: app_stack.c:1082 gosub_run: 
SIP/callcentric20-00000001 Abnormal 'Gosub(long-file,s,1)' exit. 
Popping routine return locations.
     -- Channel SIP/incall left 'simple_bridge' basic-bridge 
<5312c0a8-7697-4a97-b3ff-ff0484fbaf3d>
     -- Channel DAHDI/1-1 left 'simple_bridge' basic-bridge 
<5312c0a8-7697-4a97-b3ff-ff0484fbaf3d>
     -- Hanging up on 'DAHDI/1-1'
     -- Hungup 'DAHDI/1-1'

As you can see DAHDI/1-1 is not hungup until after Playback. I want to 
hangup DAHDI/1-1 before the Playback.

Thanks,






More information about the asterisk-users mailing list