<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
tt
        {font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I am doing something like this. Not
actually detecting the switch, but detecting vmail/answering machine. Take a
look at this <a
href="http://www.voip-info.org/wiki/view/Asterisk+cmd+BackGroundDetect">http://www.voip-info.org/wiki/view/Asterisk+cmd+BackGroundDetect</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hope this helps.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Michel Verbraak<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, May 20, 2009
10:39 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Asterisk
 Users Mailing List - Non-Commercial Discussion</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> [asterisk-users] How to
detect switch to voicemail when calling tomobile phone</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Hello,<br>
<br>
First of all I have an Asterisk setup of Asterisk 1.6.0.9 + DAHDI 2.0 + E1 card
with ISDN-15 line (KPN Netherlands).<br>
<br>
I have two questions/situations:<br>
A. I would like to be able to interrupt the dial command when I try to call to
a mobile phone and this phone is never answered by a person but after a certain
time switches to the voicemail of the mobile phone.<br>
<br>
B. I have a setup where someone calls one extension in my asterisk which in
turn will call about 6 mobile phones at the same time and the first person that
picks up his mobile phone will get the caller. The 6 mobile phones need to get
called until a real person answers one of the phones. We run into the problem
when one of the called mobile phones switches to voicemail before any one of
the 6 persons answers his phone. Is there a way that the call to the group
ignores the mobile phones which switch to voicemail but keeps calling the
others.<br>
<br>
When I turn on logging for dahdi or sip I can see that when the connection is
switched to the voicemail a &quot; progress&quot; message is created (twice).
This only happens when a switch to voicemail is made. Following is an
extraction of the dahdi log when voicemail kicks in, see bold lines:<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><tt><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial'>&gt;
Message type: SETUP (5)</span></font></tt><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><br>
<tt><font face=Arial><span style='font-family:Arial'>&lt; Message type: STATUS
(125)</span></font></tt><br>
<tt><font face=Arial><span style='font-family:Arial'>&lt; Message type: CALL
PROCEEDING (2)</span></font></tt><br>
<tt><font face=Arial><span style='font-family:Arial'>&lt; Message type:
ALERTING (1)</span></font></tt><br>
<tt><b><font face=Arial><span style='font-family:Arial;font-weight:bold'>&lt;
Message type: PROGRESS (3)</span></font></b></tt><b><span style='font-weight:
bold'><br>
<tt><font face=Arial><span style='font-family:Arial'>&lt; Message type:
PROGRESS (3)</span></font></tt></span></b><br>
<tt><font face=Arial><span style='font-family:Arial'>&lt; Message type: CONNECT
(7)</span></font></tt><br>
<tt><font face=Arial><span style='font-family:Arial'>&gt; Message type: CONNECT
ACKNOWLEDGE (15)</span></font></tt><br>
<tt><font face=Arial><span style='font-family:Arial'>&gt; Message type:
DISCONNECT (69)</span></font></tt><br>
<tt><font face=Arial><span style='font-family:Arial'>&lt; Message type: RELEASE
(77)</span></font></tt><br>
<tt><font face=Arial><span style='font-family:Arial'>&gt; Message type: RELEASE
COMPLETE (90)</span></font></tt></span></font><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3 color=black face="Times New Roman"><span style='font-size:12.0pt'>Next
is an extraction of the dahdi log when the mobile phone is answered by a
person:<o:p></o:p></span></font></p>

<p><font size=2 color=black face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&gt; Message type: SETUP (5)<br>
&lt; Message type: STATUS (125)<br>
&lt; Message type: CALL PROCEEDING (2)<br>
&lt; Message type: ALERTING (1)<br>
&lt; Message type: CONNECT (7)<br>
&gt; Message type: CONNECT ACKNOWLEDGE (15)<br>
&lt; Message type: DISCONNECT (69)<br>
&gt; Message type: RELEASE (77)</span></font><br>
&lt; Message type: RELEASE COMPLETE (90)<o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3 color=black face="Times New Roman"><span style='font-size:12.0pt'>Is
there an option for the dial command to stop the call when the switch is
detected and tell the caller that voicemail is active and if he would like to
leave a message or not? Can I create/detect this with an AGI script and act on
it? (what to look for). <o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3 color=black face="Times New Roman"><span style='font-size:12.0pt'>Any
help is appreciated.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3 color=black face="Times New Roman"><span style='font-size:12.0pt'>Regards,<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3 color=black face="Times New Roman"><span style='font-size:12.0pt'>Michel.<o:p></o:p></span></font></p>

</div>

</body>

</html>