Just found out about the A option. Which does exactly what i need. One thing i don’t understand.
Not working
same => n,Dial(PJSIP/+${ctbEmployeeOutboundNumber}@${ctbSipProviderEndpoint}&PJSIP/${ctbEndPointEndpoint},${ctbDialTimeOut},b(ctbOutboundCallStartHeaders^addheader^1),A(/etc/asterisk/dialplans/chattabai/prompts/nl/welcome))
Working
same => n,Dial(PJSIP/+${ctbEmployeeOutboundNumber}@${ctbSipProviderEndpoint}&PJSIP/${ctbEndPointEndpoint},${ctbDialTimeOut},A(/etc/asterisk/dialplans/chattabai/prompts/nl/welcome),b(ctbOutboundCallStartHeaders^addheader^1))
The difference is the b option, in the first example its placed after the b option and in the second example its placed before the b option.
A( x:y ) - Play an announcement to the called and/or calling parties, where x is the prompt to be played to the called party and y is the prompt to be played to the caller. The files may be different and will be played to each party simultaneously.
And option b
b( context^exten^priority ) - Before initiating an outgoing call, 'Gosub' to the specified location using the newly created channel. The 'Gosub' will be executed for each destination channel.
I want both option A and b to be executued.
Play an announcement
And a ‘GoSub’
How does the syntax look like like in this situation, cause you are right. The first one is executed, the second one is not
same => n,Dial(PJSIP/+${ctbEmployeeOutboundNumber}@${ctbSipProviderEndpoint}&PJSIP/${ctbEndPointEndpoint},${ctbDialTimeOut},A(${ctbPromptEmployeeAnnouncement}),b(ctbVariableOutboundCallStartHeaders^addheader^1))
Console output
-- Executing [1@ctbVariableOutboundCallStartSuccess:14] Dial("PJSIP/twilio-00000017", "PJSIP/+xxx@twilio&PJSIP/B92411F6-D7C1-4F0A-830D-32BCA1380B9B,30,A(/etc/asterisk/dialplans/chattabai/prompts/en/employeeAnnouncement),b(ctbVariableOutboundCallStartHeaders^addheader^1)") in new stack
Found the correct syntax. By just removing the ‘,’ its working
same => n,Dial(PJSIP/+${ctbEmployeeOutboundNumber}@${ctbSipProviderEndpoint}&PJSIP/${ctbEndPointEndpoint},${ctbDialTimeOut},b(ctbVariableOutboundCallStartHeaders^addheader^1)A(${ctbPromptEmployeeAnnouncement}))