<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello Dev team, </p>
<p class="MsoNormal">I have been playing with asterisk dial function and I have the senarial below.
</p>
<p class="MsoNormal">I am generating a call from server 1 and receiving it on server 3, but I want server 1 to control how long this call should be.
</p>
<p class="MsoNormal">Though I placed server 2 in the middle which is able to modify my parameters of the dial function and control call duration.</p>
<p class="MsoNormal">How do I detect on server 1 that server 3 has hangup so that server 2 does not keep the call connected longer than I require.</p>
<p class="MsoNormal">This is of extreme importance to me all advise and help will be appreciated.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>On Server 1<o:p></o:p></b></p>
<p class="MsoNormal">[to_server2]</p>
<p class="MsoNormal">exten => 1234,1,Dial(SIP/server2/1234,3,S(3))</p>
<p class="MsoNormal">exten =>1234,2,Hangup() </p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>on Server 2<o:p></o:p></b></p>
<p class="MsoNormal">[from_server1]</p>
<p class="MsoNormal">exten => 1234,1,Dial(SIP/server3/1234,,gS(15))</p>
<p class="MsoNormal">exten =>1234,2,wait(15)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>on Server 3<o:p></o:p></b></p>
<p class="MsoNormal">[from_server2]</p>
<p class="MsoNormal">exten =>1234,1,answer()</p>
<p class="MsoNormal">exten =>1234,2,wait(3)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best regards,</p>
<p class="MsoNormal">Fred</p>
<p class="MsoNormal">VoIP Engineer</p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>