Call Recording Issues from Inbound Route

I am new to Asterisk so I confess my understanding of this product may be at fault.
I installed elastix and upgraded FreePBX so now I am really just using the FreePBX to configure things now. (Seperate Issue)
Asterisk Info reports 1.8.12.0

My objective
I am setting up a demo test system for our company we need to route DIDs to a group of agents with call recording that agents can turn off or be turn off automatically by application.

My Setup
Each DID has an Inbound route which routes calls to a specific queue, each queue has static agents of ring groups.
Each Agent has a Ring Group of their own because they may have deskphone and/or softphone

My Issue
Call recording is not working the way I expect or consistant to what I have read.

I want to record the call immediately from Inbound Route (To capture annoucement and hold time) and also allowing the agent to halt recording by *1 for PCI-DSS reasons.

Setting Inbound Route to Record Immediately dosen’t seem to capture call recording although setting Inbound route to Record On answer or allow does.

In both case the call is not shown as recorded in the CDR reports but has a file in the spool directory.

The log file indicates that a file is generated and being recorded. (The call log generates 1000’s of entries)

When I change the source of recording to agent so it appears in the CDR Report I have observed that the call is not controlled by *1 although it is executing in the dialplan.

Also when the caller (Outside party) dials *1 it also appears to execute the dialplan command which I don’t want.
I would like to know how to correct
Call recording Inbound route Record Immediate
How to toogle call recording with recording automatically starting immediately
Stop outside party turning recording off
Making *1 Work on inbound route recording (if possible)

I know *1 internally on setup works as I have had it record part of call when source recording set to agent

Would it be possible to describe what you are doing in Asterisk, rather than FreePBX terms?

I assume that your reference to Trunk and answered refers to whether or not the b (only record when bridged) option is set.

In terms of the automon feature, you should be able to use the / clause to prevent the external caller controlling this. I think automon is in addition to other monitoring.

By agent, do you mean setting monitor type and format in queues.conf? I’m not sure what control is available for such monitoring. I half remember seeing something saying that AMI monitor pausing doesn’t work for this, which is an issue we may have to deal with in the future.

Recording a call does not generate anything special in the CDRs. If the CDRs are affected, that is being done purely by FreePBX, not by Asterisk itself.

You should note that ringback tone should not physically exist in Asterisk on a SIP connection, so don’t expect to be able to record it, although it is possible that FreePBX answers early. Also, Queue should send the announcements as early media, unless you have answered the incoming side; I am not sure if Monitor works on early media, but then early media often doesn’t reach the PSTN, anyway.

I’m afraid I’m not being all that helpful, as we haven’t yet pushed monitoring to these limits, but it is also difficult to compensate for FreePBX jargon.

Thanks for response.

I will look into /Activatedby and links to where to find I would be grateful.

Yes you are right I took the easy route being a newbie. FreePBX

By agents I mean users in what I want to do.

In Asterisk terms I mean Agents as extensions in the queues but these are actually ring group destinations

Example
Queue 1101
Has Static extensions 201, 211, 206, 209

201 is a Ring Group
Extensions 3101, 3201, 3301

211 is Ring Group
Extensions 3111, 3211, 3311

206 is RIng Group
Extensions 3106, 3206, 3306

209 is RIng Group
Extensions 3109, 3209, 3309

I am definately green when it comnes to Asterisk
I take your point missing recordings from CDR reports is a FreePBX issue rather an Asterisk.

You are indicating that call might not record because of SIP but it does not explain why in record immediate no recording is happening even if the call is answered.

AS yet no call received I have been able to capture annoucement but have call captured from answer stage.

I am green also when it comes to early media etc. I presume by this you mean call progress from point of entry to our system to point that some one lifts handset perhaps perhaps issue answer() in a dialplan but this is new to me.
Only 4 weeks so far and spent a lot of this time working out how to rout call with missing CallerID.

I am also new to forums being a bit of of loaner so thanks again for responding quick.

*1 is defined in /etc/asterisk/features.conf. It is off in the sample file distributed with Asterisk, but presumably on in FreePBX.

; The syntax for declaring a dynamic feature is the following: ; ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<AppArguments>[,MOH_Class]] ; ; FeatureName -> This is the name of the feature used in when setting the ; DYNAMIC_FEATURES variable to enable usage of this feature. ; DTMF_sequence -> This is the key sequence used to activate this feature. ; ActivateOn -> This is the channel of the call that the application will be executed ; on. Valid values are "self" and "peer". "self" means run the ; application on the same channel that activated the feature. "peer" ; means run the application on the opposite channel from the one that ; has activated the feature. ; ActivatedBy -> This is which channel is allowed to activate this feature. Valid ; values are "caller", "callee", and "both". "both" is the default. ; The "caller" is the channel that executed the Dial application, while ; the "callee" is the channel called by the Dial application. ; Application -> This is the application to execute. ; AppArguments -> These are the arguments to be passed into the application. ; MOH_Class -> This is the music on hold class to play while the idle ; channel waits for the feature to complete. If left blank, ; no music will be played.

Early media means audio (etc.) sent before the call is answered. If you use the Queue application directly, without doing something that causes an answer, it will try and send music on hold and announcements as early media. It tends to get blocked at the PSTN boundary because charging doesn’t normally start until answer.

Thanks for the pointer.
FreePBX has features Module which you enable disable the feature it is set to enable by defualt.

I guess you mean using caller callee option on feature but this won’t work for call recording.
Inbound call we are the callee outbound we are the caller in both cases we need call recording.

Your last comment was quiet an eye opener to me I have to admit.
I have worked in IT and Telcomes for a long time (not VOIP thou)

As the telco operator that terminates calls gets the revenue I assumed that they like to make scrapings from peoples systems with annoucments be heard and the phone hit the cradle again. You suggest this is not the case the SIP protocol hangs back until a answer signal is sent. If this is true I am impressed :smile:

The documenation also says there are Dial and Queue options that enable automon (W and w, depending on direction).

At the Asterisk level you could also enable different features, depending on who initiated the call, so you could have different codes for ingoing and outgoiong monitoring.

Early media has been possible on the PSTN for a long time. That is how freephone was implemented in the UK. The catch is that the facility isn’t generally extended to end users, so, although SIP can have early media, you will probably find that the PSTN either ignores it or infers an answer.

I have trx in Dial commands
and TX
in outbound dial commands
These appear to be global in FreePBX

Not sure what the difference is between xX wW options but I got the impression from various places W was Monitor and MixMon was X

The actual call recording function works so I don’t think this is the right area to be looking in.

If set the recording option to allow on Inbound Route
and allow on the ring group and don’t care on the extension
I can get a recording but not when I want to instigate the recording from the inbound route.

Apologies for my ignorence but I thought FreePBX was also within the scope here as well.

It is awkward to prove what recording have recorded as I have not got samba setup yet on the asterisk server and we are a windows site.

Here is a part of a log that indicates recording has has been started but there is no trace of this file in the spool directory

It shows call from point of entry to queue transfer

netsock2.c: == Using SIP RTP TOS bits 184
netsock2.c: == Using SIP RTP CoS mark 5
pbx.c: – Executing [s@DID-info-from-SIP:1] NoOp(“SIP/ukddi_XXXXXXX-00000013”, “Fixing DID using info from SIP TO header”) in new stack
pbx.c: – Executing [s@DID-info-from-SIP:2] Set(“SIP/ukddi_XXXXXXX-00000013”, “pseudodid=sip:+44151XXXXXXX@sip.ukddi.com”) in new stack
pbx.c: – Executing [s@DID-info-from-SIP:3] Set(“SIP/ukddi_XXXXXXX-00000013”, “pseudodid=<sip:+44151XXXXXXX”) in new stack
pbx.c: – Executing [s@DID-info-from-SIP:4] Set(“SIP/ukddi_XXXXXXX-00000013”, “pseudodid=+44151XXXXXXX”) in new stack
pbx.c: – Executing [s@DID-info-from-SIP:5] Goto(“SIP/ukddi_XXXXXXX-00000013”, “from-trunk,+44151XXXXXXX,1”) in new stack
pbx.c: – Goto (from-trunk,+44151XXXXXXX,1)
pbx.c: – Executing [+44151XXXXXXX@from-trunk:1] Set(“SIP/ukddi_XXXXXXX-00000013”, “__FROM_DID=+44151XXXXXXX”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:2] Gosub(“SIP/ukddi_XXXXXXX-00000013”, “sub-record-check,s,1(force,+44151XXXXXXX,always)”) in new stack
pbx.c: – Executing [s@sub-record-check:1] GotoIf(“SIP/ukddi_XXXXXXX-00000013”, “1?check”) in new stack
pbx.c: – Goto (sub-record-check,s,6)
pbx.c: – Executing [s@sub-record-check:6] Set(“SIP/ukddi_XXXXXXX-00000013”, “__MON_FMT=wav”) in new stack
pbx.c: – Executing [s@sub-record-check:7] GotoIf(“SIP/ukddi_XXXXXXX-00000013”, “1?next”) in new stack
pbx.c: – Goto (sub-record-check,s,10)
pbx.c: – Executing [s@sub-record-check:10] ExecIf(“SIP/ukddi_XXXXXXX-00000013”, “0?Return()”) in new stack
pbx.c: – Executing [s@sub-record-check:11] GotoIf(“SIP/ukddi_XXXXXXX-00000013”, “0?force,1”) in new stack
pbx.c: – Executing [s@sub-record-check:12] Set(“SIP/ukddi_XXXXXXX-00000013”, “__REC_STATUS=INITIALIZED”) in new stack
pbx.c: – Executing [s@sub-record-check:13] ExecIf(“SIP/ukddi_XXXXXXX-00000013”, “1?Set(__REC_POLICY_MODE=always)”) in new stack
pbx.c: – Executing [s@sub-record-check:14] Set(“SIP/ukddi_XXXXXXX-00000013”, “NOW=1343137992”) in new stack
pbx.c: – Executing [s@sub-record-check:15] Set(“SIP/ukddi_XXXXXXX-00000013”, “__DAY=24”) in new stack
pbx.c: – Executing [s@sub-record-check:16] Set(“SIP/ukddi_XXXXXXX-00000013”, “__MONTH=07”) in new stack
pbx.c: – Executing [s@sub-record-check:17] Set(“SIP/ukddi_XXXXXXX-00000013”, “__YEAR=2012”) in new stack
pbx.c: – Executing [s@sub-record-check:18] Set(“SIP/ukddi_XXXXXXX-00000013”, “__TIMESTR=20120724-145312”) in new stack
pbx.c: – Executing [s@sub-record-check:19] Set(“SIP/ukddi_XXXXXXX-00000013”, “__FROMEXTEN=unknown”) in new stack
pbx.c: – Executing [s@sub-record-check:20] Set(“SIP/ukddi_XXXXXXX-00000013”, [color=#FF0000]"__CALLFILENAME=force-+44151XXXXXXX-unknown-20120724-145312-1343137992.319"[/color]) in new stack
pbx.c: – Executing [s@sub-record-check:21] Goto(“SIP/ukddi_XXXXXXX-00000013”, “force,1”) in new stack
pbx.c: – Goto (sub-record-check,force,1)
pbx.c: – Executing [force@sub-record-check:1] GosubIf(“SIP/ukddi_XXXXXXX-00000013”, “1?record,1(force,always,unknown)”) in new stack
pbx.c: – Executing [record@sub-record-check:1] Set(“SIP/ukddi_XXXXXXX-00000013”, “AUDIOHOOK_INHERIT(MixMonitor)=yes”) in new stack
pbx.c: – Executing [record@sub-record-check:2] MixMonitor(“SIP/ukddi_XXXXXXX-00000013”, “2012/07/24/force-+44151XXXXXXX-unknown-20120724-145312-1343137992.319.wav,”) in new stack
pbx.c: – Executing [record@sub-record-check:3] Set(“SIP/ukddi_XXXXXXX-00000013”, [color=#FF0000]"__REC_STATUS=RECORDING"[/color]) in new stack
pbx.c: – Executing [record@sub-record-check:4] Set(“SIP/ukddi_XXXXXXX-00000013”, “CDR(recordingfile)=force-+44151XXXXXXX-unknown-20120724-145312-1343137992.319.wav”) in new stack
pbx.c: – Executing [record@sub-record-check:5] Return(“SIP/ukddi_XXXXXXX-00000013”, “”) in new stack
pbx.c: – Executing [force@sub-record-check:2] Return(“SIP/ukddi_XXXXXXX-00000013”, “”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:3] Gosub(“SIP/ukddi_XXXXXXX-00000013”, “app-blacklist-check,s,1()”) in new stack
pbx.c: – Executing [s@app-blacklist-check:1] GotoIf(“SIP/ukddi_XXXXXXX-00000013”, “0?blacklisted”) in new stack
pbx.c: – Executing [s@app-blacklist-check:2] Set(“SIP/ukddi_XXXXXXX-00000013”, “CALLED_BLACKLIST=1”) in new stack
pbx.c: – Executing [s@app-blacklist-check:3] Return(“SIP/ukddi_XXXXXXX-00000013”, “”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:4] Set(“SIP/ukddi_XXXXXXX-00000013”, “CDR(did)=+44151XXXXXXX”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:5] ExecIf(“SIP/ukddi_XXXXXXX-00000013”, “0 ?Set(CALLERID(name)=44151YYYYYYY)”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:6] Ringing(“SIP/ukddi_XXXXXXX-00000013”, “”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:7] Set(“SIP/ukddi_XXXXXXX-00000013”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:8] Set(“SIP/ukddi_XXXXXXX-00000013”, “CALLERPRES()=allowed_not_screened”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:9] Macro(“SIP/ukddi_XXXXXXX-00000013”, “prepend-cid,ISniff”) in new stack
pbx.c: – Executing [s@macro-prepend-cid:1] GotoIf(“SIP/ukddi_XXXXXXX-00000013”, “1?REPCID”) in new stack
pbx.c: – Goto (macro-prepend-cid,s,5)
pbx.c: – Executing [s@macro-prepend-cid:5] Set(“SIP/ukddi_XXXXXXX-00000013”, “_RGPREFIX=ISniff”) in new stack
pbx.c: – Executing [s@macro-prepend-cid:6] Set(“SIP/ukddi_XXXXXXX-00000013”, “CALLERID(name)=ISniff44151YYYYYYY”) in new stack
pbx.c: – Executing [+44151XXXXXXX@from-trunk:10] Goto(“SIP/ukddi_XXXXXXX-00000013”, “ext-queues,1112,1”) in new stack

I have highlighted 2 parts in red that in my limited knowledge indicate recording has been started

THe log also shows execution of *1 so the function is enabled and operating at some level in the system

The FreePBX forum is freepbx.org/forums/viewtopic.php. There is a forum on this board for FreePBX aspects as they affect AsteriskNow. FreePBX has a different terminonlogy from Asterisk proper and involves extensive dialplan code.

The items you have marked in red are values being set in channel variables. They don’t, in themselves, affect the recording state.

Thanks David

I will ask the other forum
I appreciate setting variables does not affect recording but the log is what dailplan is telling me not what I have told the dialplan todo other than through the interface.

I accept This might be posted to wrong forum so apologies for this and thanks again for your trouble.

BUt something somewhere does not seem right Asterisk/FreePBX

Keep up the good work I am impressed overall the last time I looked at Asterisk VOIP was expensive to implement but now ADSL is around the scales have tip a long way in favour of such a good project.