Help me please. I want Asterisk answer call, play some record to caller, dial to some destination and when destination answers, connect it to caller. “Early media” is unwanted here.
Hi, please elaborate the line early media is unanswered
I don’t understand the difficulty. This appears to be a trivial combination of Playback and Dial. With default options, Playback will answer, so there will be no early media. You can also explicitly answer.
[from_user]
exten=>_X.,1,Playback(hello)
exten=>_X.,n,Dial(SIP/isp/98887776611)
exten=>_X.,n,Hangup
The problem is “hello” is played to the very end and only after this Asterisk dials destination. But I want it simultaneously - playback stops and user connects to destination when destination answers.
“m” option on Dial. You will need to answer explicitly to avoid early media.
(You don’t need Hangup in any modern version of Asterisk, unless you have explicitly set autofallthrough to no.)
exten=>_X.,n,Dial(SIP/isp/98887776611,m)
or
exten=>_X.,n,Dial(SIP/isp/98887776611,m)
don’t work. I don’t see any outbound SIP calls in wireshark while “hello” plays.
Please run “core show application Dial” and find out what the m option actually does, rather than blindly adding it.
I was giving you a hint, not a complete solution. You will almost certainly need to set the optional parameter on the m option.
musiconhold.conf:
[hello]
mode=files
directory=hello
extensions.conf:
exten=>_X.,1,Dial(SIP/isp/98887776611,m(hello))
or
exten=>_X.,1,Dial(SIP/isp/98887776611,m([hello]))
Now it dials number, generates RINGING and then connects. Where’s my “hello”?
exten=>_X.,1,Dial(SIP/isp/98887776611[color=#FF0000],[/color],m(hello))
Thanks!