How can i hear my audio files after calling connected?

please see my dial plan

current I can hear my voice such as background sound when call ringing.
I want hear the voice when call connected.
this is possible?
if possible, then how to do?

Please provide dialplan as text, not images. Mark it up as pre-formatted text.

The relevant part of your dialplan is off the right hand side of your image.

See the second option value in:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MixMonitor

Using _. can result in strange behaviour if a call hangs up.

[out1]
exten=>.,1,Set(CALLERID(num)=${cid})
exten=>
.,n,Gosub(monitor,${EXTEN},1)
same=>n,Dial(SIP/${EXTEN}@${trunk})
same=>n,Playback(/var/www/html/test)

[monitor]
exten=>.,1,set(path=/var/www/html/rec/)
same=>n,Mixmonitor(${path}${STRFTIME(${EPOCH},%Y-%m-%d
%H-%M-%S)}-${EXTEN}${type}${src}.wav)
same=>n,return()

[out2]
exten=>.,1,ResetCDR()
exten=>
.,n,Set(CALLERID(num)=${cid})
exten=>.,n,Set(CALLERID(name)=${cidname})
exten=>
.,n,Playback(/var/www/html/test)
same=>n,Dial(SIP/${EXTEN}@${trunk})
same=>n,Playback(/var/www/html/test)
same=>n,hangup()

and then I can hear voice service message continually.
I can not remove the voice service message too.
the voice service message is related with carrier?

  1. Please start and end a multi-line snippet with 3 back-ticks on a line of their own to retain special characters and preserve formatting.
  2. The dial() application will not return until the call is terminated. Execution will continue at ${CONTEXT},h,1 unless the g option is specified.

I’m having some difficulty understanding your English. The issue I addressed was that with you current configuration, recording starts immediately, not when the call is answered. As I said the second documented option addresses that, but you haven’t set any options. Connecting the two parties together is called bridging.

I’m not sure what the intent of the Playback calls is, although as Mr Edwards has pointed out, the second one will not be reached unless the call fails.

About this problem, I am really upset about this issue.
How can I play the audio file after the call is connected?

please check my dial plan.
and please help me.

[customer1]
exten=>.,1,Set(CALLERID(num)=${cid})
exten=>
.,n,Gosub(monitor,${EXTEN},1)
same=>n,Dial(SIP/${EXTEN}@${trunk})

[manage]
exten=>.,1,set(path=/var/www/html/rec/)
same=>n,Mixmonitor(${path}${STRFTIME(${EPOCH},%Y-%m-%d
%H-%M-%S)}-${EXTEN}${type}${src}.wav)
same=>n,return()

[customer2]
exten=>.,1,ResetCDR()
exten=>
.,n,Set(CALLERID(num)=${cid})
exten=>_.,n,Set(CALLERID(name)=${cidname})
same=>n,Dial(SIP/${EXTEN}@${trunk})
same=>n,hangup()

if dial plan is incorrect, please tell me the problem too.
thanks

hello everyone
please check this wav file.
http://russiancoms.cc/storage/uploads/sounds/included_voice_mail_call.wav

due to this problem, I am really upset.
how to remove voice mail service audio from my calling?
please check and help me

could you check my problem?
and plz guide me for solving problem.

you need to do an Answer() or Progress() and after that one do Playback(filename)
and this must be before you do Dial

also please do not use “_.” in your pattern match it just create more problems
and also please use preformatted text “</>” icon

exten => _X!,1,Answer()
same => n,Playback(filename)
same => n,Dial(PJSIP/${EXTEN})

By default, Playback answers the call, although it might take a short time for a valid media path to establish. An explicit Answer without a delay won’t help. It’s arguably better to start with silence than to do a delay, as some more complex environments need media in order to initialise the media pathways.

Whilst I did find this strange, (it will play to the caller, and only if the call fails), I’m pretty sure that the OP said that worked when he used a simple file, and he is also doing the playback before the Dial. Until there is a clear description of the intended behaviour, I can’t rule it out as incorrect.

I think the “I hear” and “after calling connected” are the key parts of the subject, and my interpretation is that they relate to the Monitor, and not to what either party hears in real time.

In any case, until they report back on my suggested solution, and/or provide a cleared specification, I’m probably not going to be able help any more.

I have to add this part into only customer 1?

[customer1]
exten=>.,1,Set(CALLERID(num)=${cid})
exten=>
.,n,Gosub(monitor,${EXTEN},1)
exten => _X!,1,Answer()
same => n,Playback(filename)
same => n,Dial(SIP/${EXTEN})

[monitor]
exten=>.,1,set(path=/var/www/html/rec/)
same=>n,Mixmonitor(${path}${STRFTIME(${EPOCH},%Y-%m-%d
%H-%M-%S)}-${EXTEN}${type}${src}.wav)
same=>n,return()

[customer2]
exten=>.,1,ResetCDR()
exten=>
.,n,Set(CALLERID(num)=${cid})
exten=>_.,n,Set(CALLERID(name)=${cidname})
same=>n,Dial(SIP/${EXTEN}@${trunk})
same=>n,Answer()
same=>n,Playback(/var/www/html/textvoice)
same=>n,hangup()

“In any case, until they report back on my suggested solution, and/or provide a cleared specification, I’m probably not going to be able help any more.”

what 's mean?
could you explain better?

Just I made some good process.
so I can hear play back for url.
but as call recording result, the playback of url doesnt start after call connected (so receiver received call)
from ringing part, I can hear.
and then if receiver click button, he can hear audio from middle location.

I think this is related with dial plan.

[out1]
exten=>.,1,Set(CALLERID(num)=${cid})
exten=>
.,n,Gosub(monitor,${EXTEN},1)
same => _X!,1,Answer()
same => n,Wait(1)
same=>n,Playback(sounds/textvoice.wav)
same => n,Dial(SIP/${EXTEN})

[monitor]
exten=>.,1,set(path=/var/www/html/rec/)
same=>n,Mixmonitor(${path}${STRFTIME(${EPOCH},%Y-%m-%d
%H-%M-%S)}-${EXTEN}${type}${src}.wav)
same=>n,return()

[out2]
exten=>.,1,ResetCDR()
exten=>
.,n,Set(CALLERID(num)=${cid})
exten=>_.,n,Set(CALLERID(name)=${cidname})
same=>n,Dial(SIP/${EXTEN}@${trunk})
same=>n,Answer()
same =>n,Wait(1)
same=>n,Playback(sounds/textvoice.wav)
same=>n,hangup()

hello everyone
please check this wav file.
http://russiancoms.cc/storage/uploads/sounds/included_voice_mail_call.wav’

due to this problem, I am really upset.
how to remove voice mail service audio from my calling?
please check and help me

Your post does not indicate any problem.

please check last my post.
you can hear voice mail message. right?
I want delete the voice mail from the calling.