Does anyone know how to use the ToneScan() app? I have searched and searched but I can’t find any examples.
The idea is to use it in the called channel before the answer to analyze the progress of the call, but I can’t find any option in the Dial that allows me to transfer the called channel to a routine at the beginning of a call and before the answer.
Any idea how to implement this?
HI @TheMark ,
The problem with doing this after the Answer is that the call progress tones occur before the answer.
A “INVITE” ==> B
A <== “183 Session Progress” B
A <== “Starts sending audio RINGTONE via RTP” B
A <== "200 Answer " B
if I make the call to ToneScan to detect ring, with the U() option of the Dial command, this detection will be after the Answer when the RTP ringback stream no longer exists.
what are you trying to detect
as 183 normaly is only used to indicating inband ringing
Early media can also be used for voice announcement, NU, engaged and equipment engaged tones, SIT, etc. It is also, sometimes used for free of charge information services.
E.g. (although I don’t know if it is still in use), “all lines to Manchester are busy, please try again later” would be delivered as early media. and the real SIT that Zapateller imitates, would be sent as early media.
Of course, any process that relies on detecting ringback tone is going to be unreliable, as it isn’t synchronised with actual ringing, can be signalled prematurely, and can be bypassed completely.
ToneScan is a blocking application. As well, you haven’t stated what you actually want to do with the information. What does “analyze the progress of the call” actually mean?
as described by @david551, my intention was to use the ToneScan app to detect voice announcements present in the early media, when I talked about ringback it was just an example. But the final purpose was to try to detect voicemail welcome messages present in the early media here in my country. But apparently asterisk does not provide any mechanism to run a routine between the beginning of the call and before the answer on the destination channel.
Anyway thanks for your help.
Detect and do what? Make that information available how/where?
For example, there is TONE_DETECT which passively examines the media and counts which can be set on a channel in a pre-dial handler, but I don’t know if that meets your needs as it hasn’t been described fully.
 Asterisk 20 Function_TONE_DETECT - Asterisk Project - Asterisk Project Wiki
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.