<div dir="ltr">On Friday 14 Feb 2014, Tiago Geada wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Hi all,<br>
><br>
><br>
> How does one detect the 'divert' to voicemail?<br>
><br>
> Say we have PRI lines and as wel as SIP Trunks to connect to mobile phones.<br>
> How can asterisk know if the call is being diverted??<br>
<br>
It can't.<br>
<br>
But you know  (from the STD code)  whether the call is being made to a mobile<br>
or land line; and you can have a good guess how long the mobile telco's<br>
voicemail timeout is.  So as long as your Dial() to the mobile phone times out<br>
sooner than the mobile network rings out for before deciding that nobody is<br>
going to answer, *your* voicemail will win.<br>
<br>
This will break if somebody reduces their voicemail timeout from the default;<br>
but hardly anybody ever changes the default settings in practice.<br>
<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><div><br></div><div style>...or if the moble is turned off.... </div><div style><br></div><div style>-Barry</div><div style><br></div></div></div></div>