Henrik Westerberg
2013-Sep-13 11:31 UTC
[asterisk-users] executing the h extension at the real hangup of the call
Hi, I am running Asterisk 11.3 with both SIP and ISDN. When dialing out (always over SIP) I want to keep track of who answered and of the length of the call. [outgoing-dev2] exten => h,1,Agi(agi://localhost/ajpbxtest.agi?status=finished) exten => _X.,1,NoOp(Will send call to ${CC_DIALSTRING}) exten => _X.,n,Dial(${CC_DIALSTRING}, 60, M(uploadpeer-dev2^${CC_CALLID})em) exten => _X.,n,Agi(agi://localhost/ajpbxtest.agi?status=failed&dialstatus=${DIALSTATUS}) The h extension is called correctly when the call comes in over IP and when I record the call. But when the call has come in over SIP the h extension is called directly after the call is answered so all the call gets length 0 in my own database. I guess that I could record the calls and throw away the recordings afterwards. In this way the RTP would stay on the server. But is there not a cleaner way to get Asterisk to execute the h extension (or another possibility to fix a callback somewhere) when the the Disconnect comes in over SIP? Regards, Henrik -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130913/c11de6e0/attachment.htm>
Gareth Blades
2013-Sep-13 11:53 UTC
[asterisk-users] executing the h extension at the real hangup of the call
On 13/09/13 12:31, Henrik Westerberg wrote:> Hi, > > I am running Asterisk 11.3 with both SIP and ISDN. When dialing out > (always over SIP) I want to keep track of who answered and of the > length of the call. > > [outgoing-dev2] > exten => h,1,Agi(agi://localhost/ajpbxtest.agi?status=finished) > > exten => _X.,1,NoOp(Will send call to ${CC_DIALSTRING}) > exten => _X.,n,Dial(${CC_DIALSTRING}, 60, > M(uploadpeer-dev2^${CC_CALLID})em) > exten => > _X.,n,Agi(agi://localhost/ajpbxtest.agi?status=failed&dialstatus=${DIALSTATUS}) > > The h extension is called correctly when the call comes in over IP and > when I record the call. But when the call has come in over SIP the h > extension is called directly after the call is answered so all the > call gets length 0 in my own database. > > I guess that I could record the calls and throw away the recordings > afterwards. In this way the RTP would stay on the server. But is there > not a cleaner way to get Asterisk to execute the h extension (or > another possibility to fix a callback somewhere) when the the > Disconnect comes in over SIP?I have no idea why you are seeing the h extension being run before the call ends. Its not something I have ever seen happen. Whether or not Asterisk stays in the RTP media path makes no difference as it will always stay in the SIP signalling path and its that which controls the call establishment and termination. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130913/dbac9914/attachment.htm>