Re: [asterisk-users] hangup the _called_ channel ?

2018-09-12 Thread sean darcy

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-x 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@incoming:7] Dial("SIP/incall-0001", 
"DAHDI/g0,55,tTD(:1)") in new stack

-- Called DAHDI/g0
-- DAHDI/1-1 answered SIP/incall-0001
-- Channel DAHDI/1-1 joined 'simple_bridge' basic-bridge 
<5312c0a8-7697-4a97-b3ff-ff0484fbaf3d>
-- Channel SIP/incall-0001 joined 'simple_bridge' basic-bridge 
<5312c0a8-7697-4a97-b3ff-ff0484fbaf3d>

-- SIP/incall-0001 Internal Gosub(long-file,s,1) start
-- Executing [s@long-file:1] Playback("SIP/incall-0001", 
"long-file") in new stack
--  Playing 'long-file.slin' (language 
'en')
-- Executing [s@long-file:2] Verbose("SIP/incall-0001", 
"bridgepeer is DAHDI/1-1") in new stack

Executing [s@long-file:3] Hangup("SIP/incall-0001", "") in new stack
  == Spawn extension (long-file, s, 3) exited non-zero on 
'SIP/incall-0001'
[Sep 12 13:06:06] NOTICE[2217][C-0001]: app_stack.c:1082 gosub_run: 
SIP/callcentric20-0001 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,




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] hangup the _called_ channel ?

2018-09-12 Thread Joshua Colp
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-x 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.

-- 
Joshua Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] hangup the _called_ channel ?

2018-09-12 Thread sean darcy

On 9/12/18 1: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-x 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)

[play-long-file]
exten=s,1,  ;;; Here I want to hangup DAHDI/1-1, the called channel
same=n,Playback(very-long-file)
same=n,Hangup()

Is there a better way ?



And I'm using dynamic features, applicationmap.

play-file=*8,peer,GoSub,"pay-long-file,s,1"




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] hangup the _called_ channel ?

2018-09-12 Thread sean darcy

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-x 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)

[play-long-file]
exten=s,1,  ;;; Here I want to hangup DAHDI/1-1, the called channel
same=n,Playback(very-long-file)
same=n,Hangup()

Is there a better way ?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] hangup the _called_ channel ?

2018-09-12 Thread sean darcy

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-x 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)

[play-long-file]
exten=s,1,  ;;; Here I want to hangup DAHDI/1-1, the called channel
same=n,Playback(very-long-file)
same=n,Hangup()

Is there a better way ?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] hangup the _called_ channel ?

2018-09-12 Thread Joshua Colp
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-x 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?

-- 
Joshua Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users