Regarding this I've read the specs linked to in detail, but I can find no 
mention anywhere of any change that implies or states that no ring time will be 
recorded anymore in Asterisk 13 and that all times in start and answer columns 
will now be equal for all calls.

Can this be because I nowhere use the Answer() application in my dialplan when 
dialing out?

-----Original Message-----
From: Stefan Viljoen <viljo...@verishare.co.za> 
Sent: Tuesday, 08 January 2019 08:49
To: 'asterisk-users@lists.digium.com' <asterisk-users@lists.digium.com>
Subject: RE: Re: Switched from Asterisk 1.8 to 13 - CDR ringtime now always 
zero (Joshua C. Colp)

Message: 2
Date: Mon, 07 Jan 2019 06:07:54 -0500
From: "Joshua C. Colp" <jc...@digium.com>

>> On Mon, Jan 7, 2019, at 3:04 AM, Stefan Viljoen wrote:
>> Hi guys
.
.
.
>> E. g. on 13, I see this (zero ringtime) for a call that I make to my 
>> cellphone to test, with my cellphone ringing for at least 10 seconds 
>> and ringing heard on the Yealink connected to the asterisk - e. g.
>> completely wrong:

>This is the way it is supposed to work[1], but it ultimately depends on your 
>dialplan. Are you using Local channels? Are you doing Answer in the dialplan? 
>What is the complete flow?

Hi Joshua

Thank you for the reply. I'll go read the spec in detail (which is probably 
what I should have done in the first place anyway.)

Yes, I am using local channels and generating the calls via AJAM by calling the 
Originate AMI / AJAM application. The "local" extension that is calling out is 
defined as 

local/xxxx@local 

where xxxx is the extension number, e. g. 3509, 3175, or whatever.

So my AJAM Originate command is

ActionID=201901080814t4qn82v
Action=Originate
Channel=local/3916@local
Exten=0825588996
Context=local
Priority=1
CallerID=3916_ctd
Account=201901080814t4qn82v
ChannelID=201901080814t4qn82v
OtherChannelID=201901080814t4qn82vB
Variable=__CallLimit=3600
Async=true

I'm not calling the Answer application in the dialplan when dialing out.

Effectively the flow is the user clicks dial in our external application. This 
sends the above AJAM command to Asterisk, with parameters as specified. 
Asterisk originates the call on his extension as passed in the AJAM command, he 
picks up and the call then goes into the local context and gets routed. The 
STDOUT macro is called which does some prep (lots of 1.8 legacy stuff still in 
here) and this then calls VCCALLOUT, which contains the call to the dial() 
application.

VCCALLOUT calls

exten=>s,n(dialNoLimit),Dial(${chantouse}/${numtodial},60,TL(3900000:60000:30000))

${chantouse} will be something like SIP/sip-trunk-name ${numtodial} will be the 
target number, e. g. 27825588996

to dial out.

---

Detail:

My local context (simplified):

[local]

exten=>_082xxxxxxx,1,Macro(STDOUT,SIP/centra-out,27${EXTEN:1})

and the STDOUT macro, edited for brevity:

[macro-STDOUT]
;${ARG1} = channel
;${ARG2} = number
exten=>s,1,Macro(WAITCHANNEL)
exten=>s,n,Macro(WAITCDR)
exten=>s,n,Macro(VCRECORD,${MACRO_CONTEXT}X${CALLERID(num)}ACC${CHANNEL(accountcode)},${ARG2})
exten=>s,n(dodial),Macro(VCCALLOUT,${ARG1},${ARG2},${ARG3},${ARG4})
exten=>s,n,NoOp(Setting Userfield after call completion)
exten=>s,n,Set(CDR(userfield)=${MIXMONITOR_FILENAME})
exten=>s,dodial+101,Busy()
exten=>s,n,Hangup()
exten=>s,n,MacroExit

exten=>h,1,NoOp(Call hangup MACROSTDOUT)
exten=>h,n,UserEvent(RecordingToFile,Uniqueid: ${UNIQUEID},Channel: 
${Channel},Filename: ${MIXMONITOR_FILENAME}) exten=>h,n,NoOp(Recorded to 
${MIXMONITOR_FILENAME})
exten=>h,n,Set(CDR(userfield)=${MIXMONITOR_FILENAME})
exten=>h,n,NoOp(Account code is ${CHANNEL(accountcode)}) exten=>h,n,NoOp(call 
link var is ${call_Link}) exten=>h,n,GotoIf($["${CHANNEL(accountcode)}" != 
""]?done)
exten=>h,n(setacc),Set(CHANNEL(accountcode)=${call_Link})
exten=>h,n(done),noOp(Call Completed)

and the VCCALLOUT macro:

[macro-VCCALLOUT] ;macro to dial numbers ; ${ARG1} Channel To Use ; ${ARG2} 
Number To Dial ; ${ARG3} FailOver Channel ; ${ARG4} FailOverNumber
exten=>s,n(setchan),Set(chantouse=${ARG1})
exten=>s,n,Set(numtodial=${ARG2})
exten=>s,n(makecall),GotoIf($["${timeLimit}" = ""]?dialNoLimit:dialLimit)
exten=>s,n(dialNoLimit),Dial(${chantouse}/${numtodial},60,TL(3900000:60000:30000))
exten=>s,n,NoOp(Dial Status: ${DIALSTATUS})
exten=>s,n,GoTo(s-${DIALSTATUS},1)
exten=>s,n(dialLimit),Dial(${chantouse}/${numtodial},60,TL(3900000:60000:30000))
exten=>s,n,NoOp(Dial Status: ${DIALSTATUS})
exten=>s,n,GoTo(s-${DIALSTATUS},1)
exten=>s,dialNoLimit+101,Goto(s-${DIALSTATUS},1)
exten=>s,dialLimit+101,Goto(s-${DIALSTATUS},1)
exten=>s,n(endcall),busy()
exten=>s,n,NoOp(Call Completed - setting userfield to recording)
exten=>s,n,Set(CDR(userfield)=${MIXMONITOR_FILENAME})
exten=>s,n,Hangup()
exten=>s,n,MacroExit

exten=>s-NOANSWER,1,goto(s,endcall)
exten=>s-CANCEL,1,goto(s,endcall)
exten=>s-BUSY,1,goto(s,endcall)

exten=>h,1,NoOp(Call Hungup)
exten=>h,n,UserEvent(RecordingToFile,Uniqueid: ${UNIQUEID},Channel: 
${Channel},Filename: ${MIXMONITOR_FILENAME}) exten=>h,n,NoOp(Recorded to 
${MIXMONITOR_FILENAME})
exten=>h,n,Set(CDR(userfield)=${MIXMONITOR_FILENAME})
exten=>h,n,NoOp(Account code is ${CHANNEL(accountcode)}) exten=>h,n,NoOp(call 
link var is ${call_Link}) exten=>h,n,GotoIf($["${CHANNEL(accountcode)}" != 
""]?done)
exten=>h,n(setacc),Set(CHANNEL(accountcode)=${call_Link})
exten=>h,n(done),noOp(Call Completed)

---

Thank you very much for the reply!

Regards

Stefan


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

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

Reply via email to