Displaying 16 results from an estimated 16 matches for "hangup_handler_push".
2020 Feb 04
1
Looking for sample hangup_handler_pop and _wipe using vars
Please point me to samples of popping and wiping hangup handlers. I don't
need to use the values returned; I just need to clear any handlers before I
push a new one.
It's not clear at
https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers+Specification how
to provide vars on the right-hand side.
Cheers,
David
-------------- next part --------------
An HTML attachment was scrubbed...
2018 Jun 05
2
How to execute priorities following a caller hangup in a successful Dial?
...s
(Although sometimes there is also: Retransmission timeout reached on
transmission)
same =>
n(callPeer),Set(GLOBAL(CB${IndexIntoPeers}CurrentCallsCount)=$[${PeerCurrentCallsCount}
+ 1])
; Ensure that hangup by caller/inbound-channel will invoke
handleHangupByCaller.
same => n,Set(CHANNEL(hangup_handler_push)=handleHangupByCaller,s,1(args))
same => n,Set(AddressToReachPeer=SIP/${EXTEN:0:4}@${PeerBeingConsidered})
; Ensure that the channel of the peer (i.e. outbound-channel) is
configured with hangup handler.
same =>
n,Dial(${AddressToReachPeer},,b(beforeDialingPeerConfigureItsChannelForPeerHan...
2018 Jun 05
2
How to execute priorities following a caller hangup in a successful Dial?
...just tried a hangup handler, but it's showing a similar
problem: When the peer hangs-up, the hangup handler is not invoked and the
caller channel remains open.
same =>
n(callPeer),Set(GLOBAL(Peer${IndexIntoPeers}CurrentCallsCount)=$[${PeerCurrentCallsCount}
+ 1])
same =>
n,Set(CHANNEL(hangup_handler_push)=handleHangupByCallerOrPeer,doesntMatter,1(args))
same => n,Set(DialForPeer=SIP/${EXTEN:0:4}@${PeerBeingConsidered})
same => n,Dial(${DialForPeer})
same => n,Hangup()
[handleHangupByCallerOrPeer]
exten => _.,1,NoOp(${PeerBeingConsidered}: Entered
handleHangupByCallerOrPeer Calls ${P...
2017 Dec 27
3
Answered time on channel
...ed example, but is
> inspired by dialplan code I use in production. Maybe it will help.
>
> [outbound] ; this is called on the incoming (caller) channel
> exten => _X.,1,Noop
> same => n,Set(MASTER_CHANNEL(start_timestamp)=${STRFTIME(,,%s.%3q)})
> same => n,Set(CHANNEL(hangup_handler_push)=hangup_handler,s,1)
> same => n,Set(MASTER_CHANNEL(callid_ingress)=${SIPCALLID})
> same => n, *** unrelated dialplan, AGIs, etc. ***
> same => n,Dial(SIP/${EXTEN}@1.1.1.1,,U(answer_handler)b(pre_dial_
> handler^s^1)g
> same => n, *** dialplan for the caller when the...
2015 Oct 06
2
PJSIP: how to retrieve underlying SIP Call-ID
...yz]
exten => 999,1,NoOp(Call-ID: ${PJSIP_HEADER(read,Call-ID)})
same => n,Dial(PJSIP/xyz011101/sip:xyz011101@<outbound_proxy>:5060,30,b(_pre_dial,s,1))
exten => h,1,NoOp()
[_pre_dial]
exten => s,1,NoOp(Call-ID: ${PJSIP_HEADER(read,Call-ID)})
same => n,Set(CHANNEL(hangup_handler_push)=_hangup,s,1())
same => n,Return
[_hangup]
exten => s,1,NoOp(Call-ID: ${PJSIP_HEADER(read,Call-ID)})
same => n,Return
Here's the result:
-- Executing [999 at xyz:1] NoOp("PJSIP/poly_650_2_01-0000006f", "Call-ID: e3e249e5-7e8941dd-da386565 at 19...
2018 Jul 28
3
Any way of "flattening out" 2 channels back into one?
...LER=yes)
same => n,Set(LIMIT_WARNING_FILE=/var/lib/asterisk/sounds/en_GB_TNS/time_limit_reached)
same => n,Dial(Local/s at root/n,3,L(3540000:60000))
same => n,Hangup()
[root]
exten => s,1,Verbose(1,Call to: ${CALLERID(name)} from: ${CALLERID(num)})
same => n,Set(CHANNEL(hangup_handler_push)=hdlr1,s,1)
etc etc
Works well, but the result is it looks like there are 2 active calls
in the console. Is there any way of forcing the drop of a call after x
minutes without doing this "double dialling" business?
Thanks
2015 Oct 07
2
Storing HANGUPCAUSE in CDR
Hi,
I have the following code that operates when a channel is hung-up:
[record-hangupcause]exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})exten => s,n,Return()
Before the dial a hangup handler is registered:
Set(CHANNEL(hangup_handler_push)=record-hangupcause,s,1)
The routine is called and the variables are being set, however not on the channel's CDR which made the call. I believe this is due to the CDR being closes as soon as the dial returns.
By changing the cdr option 'endbeforehexten=no' this should keep the CDR acce...
2013 Mar 26
0
Asterisk 11, hangup-handlers, Local channels and channel originate [SOLVED]
...in channel
> > ${CHANNEL} with EXTEN and CID set to ${EXTEN} and ${CALLERID(num)})
> >
> >
> > [to-foobar]
> > exten => _X.,1,Verbose(0,Entering context ${CONTEXT} with EXTEN and
> > CID set to ${EXTEN} and ${CALLERID(num)})
> > same => n, Set(CHANNEL(hangup_handler_push)=hangup-handler,s,1)
> > same => n, Dial(SIP/foobar/${EXTEN})
> > same => n, Hangup()
> >
> >
> > [from-foobar]
> > exten => _X.,1,Verbose(0,Entering context ${CONTEXT} with EXTEN and
> > CID set to ${EXTEN} and ${CALLERID(num)})
> > same =&g...
2018 Jun 09
2
getting real sip status after dial
I think HANGUPCAUSE is channel agnostic.
See: core show function HANGUPCAUSE
Some thing like this IIRC:
Set(my_cause=${HANGUPCAUSE(${CHANNEL(name)},tech)})
Remember the incoming leg of the call and the outgoing leg of the call
are different channels. Make sure you are giving HANGUPCAUSE the
correct channel.
On 06/09/2018 02:01 PM, Khalil Khamlichi wrote:
> It seems very weird to me
2019 Dec 27
1
Handling a non-responsive peer after it answers
...t; around the same time, and it seems that
if there is no following "Remote UNIX connection" within a short time, then
the peer can be considered non-responsive. Is there a way to configure a
handler for this state?
We use v14.7.6 and we dial the peer this way:
same =>
n,Set(CHANNEL(hangup_handler_push)=${CONTEXT},handleHangupByCaller,1(args))
same =>
n,Dial(${AddressToReachPeer},2,b(${CONTEXT}^afterDialingPeerLogIpOfCb^1(${UUID}^${StartEpoch})))
same => n,Goto(handle${DIALSTATUS},1)
Cheers,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://...
2015 Oct 09
2
Storing HANGUPCAUSE in CDR
...upcause]
exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})
exten => s,n,Return()
Before the dial a hangup handler is registered:
Set(CHANNEL(hangup_handler_push)=record-hangupcause,s,1)
The routine is called and the variables are being set,
however not on the channel's CDR which made the call. I
believe this is due to the CDR being closes as soon as the
dial returns....
2020 Feb 26
1
Hangup-handler on failed calls
...have filled in some extra fields we add to the CDRs
in the database.
We use cdr_adaptive_odbc with MySQL as backend.
To simplify the scenario:
[sub-hanguphandler]
exten => s,1,Set(CDR(foo)=${bar})
same => n,Return()
[default]
exten => _X.,1,NoOp(New test call)
same => n,Set(CHANNEL(hangup_handler_push)=sub-hanguphandler,s,1)
same => n,Dial(...)
same => n,Hangup()
With the above config:
1- An answered call: foo is filled in db
2- A cancelled call: foo is filled in db
3- A failed call: foo is NOT filled in db
In all 3 cases, with verbose logs enabled I can see
the sub-hanguphandler subro...
2019 Dec 30
1
Handling a non-responsive peer after it answers
...or a way of detecting in my dialplan when a peer becomes
> > non-responsive after answering. [deleted] Is there a way to configure
> > a handler for this state?
> >
> > We use v14.7.6 and we dial the peer this way:
> >
> > same =>
> >
> n,Set(CHANNEL(hangup_handler_push)=${CONTEXT},handleHangupByCaller,1(args))
> > same =>
> >
> n,Dial(${AddressToReachPeer},2,b(${CONTEXT}^afterDialingPeerLogIpOfCb^1(${UUID}^${StartEpoch})))
> > same => n,Goto(handle${DIALSTATUS},1)
> >
>
"Joshua C. Colp" <jcolp at sangoma.com>...
2020 Feb 05
1
Hangup hook to put back a call into a queue
...xtensions_custom.conf)
exten => s,n,GotoIf($["${DEXTEN}"=“2001”]?special)
exten => s,n,GotoIf($["${DEXTEN}"=“2002”]?special)
exten => s,n,MacroExit
exten => s,n(special),NoOp(--------------- Push Special Hangup Handler
------------------)
exten => s,n,Set(CHANNEL(hangup_handler_push)=back-to-1000-hangup,s,1)
exten => s,n,MacroExit
[back-to-1000-hangup]
exten => s,1,Noop(====== Entering user defined context
back-to-1000-hangup =======)
exten => s,n,Queue(1000)
exten => s,n,Return
it seems to be called and seem to enter into to call but immediately hangup.
first o...
2017 Dec 26
4
Answered time on channel
Hi,
I have a dial plan where I need to notify an external system when a call
was answered and when the call hung up. In both requests the start time
needs to be the same. My Dialplan looks something like this:
[outbound]
Exten => _X.,1,Dial(SIP/${EXTEN}@1.1.1.1,,U(call-answer-from-carrier))
Exten => h,1,NoOp(ANSWERED_TIME: ${ANSWEREDTIME} >>> DIAL_TIME:
${DIALEDTIME}
2018 Jun 05
2
How to execute priorities following a caller hangup in a successful Dial?
Thanks, Anthony.
I added both 'g' and 'F' options. Now, when the caller hangs-up, my cleanup
code is run by both the caller channel and the peer channel, but I only
want the caller channel to do that.
Also, when the peer hangs-up, there is no execution of the priorities
following the Dial.
Finally, is there a way to reset all globals, maybe as a variant of
"dialplan