I have a trunk, inbound route and extension configured we are using freepbx 16.
how i can implement the announcement to the agent when they get inbound call either its from ivr, direct route to agent, there is one option in Dial application i.e. A(sound file:), but how to implement this i am not sure, please suggest and guide me.
What is the purpose of the announcement; the answer may influence the best approach? Is the agent being called via a queue?
In terms of Asterisk, the A option on Dial can take announcements for both caller and callee.
Also, both Dial and Queue can take a subroutine that runs on the callee channel.
It sounds like you know how to access A() under FreePBX. I’m not sure how much support FreePBX has for callee subroutines, other than using custom dialplan. Googling “freepbx callee subroutine” will provide some information on that, for Dial. There is a variable that can be set to point to a subroutine to use for Queues, from FreePBX, but a request to make that variable settable with the GUI seems to have been lost when the issue tracker was moved to github. The only wayback machine reference to it is:
Thanks for the reply, david55.
My requirement is to play an announcement like “This call is being recorded” to the agent immediately after the agent answers the call. This should apply to all call flows—whether the call comes from an IVR, a queue, or a direct inbound route to the agent.
I have successfully implemented this for outbound calls (external numbers) by using
TA(custom/your_call_be_recorded:custom/your_call_be_recorded) on the trunk.
For internal/local calls, I configured
HhTtrA(custom/your_call_be_recorded:custom/your_call_be_recorded) at the extension level, and it is working as expected.
However, this approach is not working for external inbound calls(DID), trunk is same for outbound and inbound calls,
asterisk call log for outbound(external number)
Executing [s@macro-dialout-trunk:29] Set(“PJSIP/121-00000081”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
– Executing [s@macro-dialout-trunk:30] NoOp(“PJSIP/121-00000081”, “CRM Finished”) in new stack
– Executing [s@macro-dialout-trunk:31] GotoIf(“PJSIP/121-00000081”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:32] ExecIf(“PJSIP/121-00000081”, “1?Set(CONNECTEDLINE(num,i)=9999999999)”) in new stack
– Executing [s@macro-dialout-trunk:33] GotoIf(“PJSIP/121-00000081”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:34] ExecIf(“PJSIP/121-00000081”, “0?Set(DIAL_TRUNK_OPTIONS=A(custom/your_call_be_recorded:custom/your_call_be_recorded))”) in new stack
– Executing [s@macro-dialout-trunk:35] Set(“PJSIP/121-00000081”, “HASH(__SIPHEADERS,Alert-Info)=unset”) in new stack
– Executing [s@macro-dialout-trunk:36] Dial(“PJSIP/121-00000081”, “PJSIP/9999999999@Secondary_Origination_Server,300,TA(custom/your_call_be_recorded:custom/your_call_be_recorded)b(func-apply-sipheaders^s^1,(8))U(sub-send-obroute-email^9999999999^9999999999^8^1768478114^^12146148979)”) in new stack
asterisk call log for incoming(on DID)
Executing [s@macro-dial-one:53] Macro(“PJSIP/Secondary_Origination_Server-00000089”, “dialout-one-predial-hook,”) in new stack
– Executing [s@macro-dialout-one-predial-hook:1] MacroExit(“PJSIP/Secondary_Origination_Server-00000089”, “”) in new stack
– Executing [s@macro-dial-one:54] ExecIf(“PJSIP/Secondary_Origination_Server-00000089”, “1?Set(D_OPTIONS=HhtrI)”) in new stack
– Executing [s@macro-dial-one:55] ExecIf(“PJSIP/Secondary_Origination_Server-00000089”, “0?Set(CWRING=r(callwaiting)):Set(CWRING=)”) in new stack
– Executing [s@macro-dial-one:56] NoOp(“PJSIP/Secondary_Origination_Server-00000089”, “”) in new stack
– Executing [s@macro-dial-one:57] ExecIf(“PJSIP/Secondary_Origination_Server-00000089”, “0?Set(D_OPTIONS=HhtrI)”) in new stack
– Executing [s@macro-dial-one:58] ExecIf(“PJSIP/Secondary_Origination_Server-00000089”, “0?Set(D_OPTIONS=HhtrIg)”) in new stack
– Executing [s@macro-dial-one:59] Dial(“PJSIP/Secondary_Origination_Server-00000089”, “PJSIP/121/sip:[email protected]:53124;rinstance=14092ae38bedd7f2,25,HhtrIb(func-apply-sipheaders^s^1)”) in new stack
– PJSIP/121-0000008a Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [s@func-apply-sipheaders:1] ExecIf(“PJSIP/121-0000008a”, “1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [s@func-apply-sipheaders:2] NoOp(“PJSIP/121-0000008a”, “Applying SIP Headers to channel PJSIP/121-0000008a”) in new stack
– Executing [s@func-apply-sipheaders:3] Set(“PJSIP/121-0000008a”, “localchan=121-0000008a”) in new stack
– Executing [s@func-apply-sipheaders:4] Set(“PJSIP/121-0000008a”, “DialMCEXT=121”) in new stack
– Executing [s@func-apply-sipheaders:5] Set(“PJSIP/121-0000008a”, “CHANNEL(hangup_handler_push)=app-missedcall-hangup,121,1”) in new stack
– Executing [s@func-apply-sipheaders:6] Set(“PJSIP/121-0000008a”, “TECH=PJSIP”) in new stack
Its working now, in advance setting Asterisk Dial Options setting was there ,
A(x:y) option available in asterisk 16 but not available in asterisk 13, A(x) only in asterisk 13, so we are able to use announce at callee level only, how can we implement for caller level , is it possible ? please help me
You need to upgrade.
ok thankyou
