<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: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=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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:0cm;
        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:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:334845893;
        mso-list-type:hybrid;
        mso-list-template-ids:1737380480 67239951 67239961 67239963 67239951 67239961 67239963 67239951 67239961 67239963;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:722027181;
        mso-list-type:hybrid;
        mso-list-template-ids:31721566 517134710 67239939 67239941 67239937 67239939 67239941 67239937 67239939 67239941;}
@list l1:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:53.4pt;
        text-indent:-18.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</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 lang=BG link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>Hello Everybody!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
lang=EN-US><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=EN-US>Scenario.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I am writing an IVR in Python that gets a
destination from the calling party (party A) and then connects to the
destination (party B).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>When the call is CONNECTED, I want to:<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:53.4pt;text-indent:-18.0pt;
mso-list:l1 level1 lfo1'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=EN-US>Receive DTMFs<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:53.4pt;text-indent:-18.0pt;
mso-list:l1 level1 lfo1'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=EN-US>Have a timer that can call a
certain function in my script. The script will have to play a message to party
A.<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:53.4pt;text-indent:-18.0pt;
mso-list:l1 level1 lfo1'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=EN-US>Have a timer that can call a
certain function in my script. The script will have to drop the call.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Please notice that I want to do the things
after the two parties are connected, and not after I send the Invite to party
B.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
lang=EN-US><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=EN-US>Problem.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I will be happy to receive help on:<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:53.4pt;text-indent:-18.0pt;
mso-list:l1 level1 lfo1'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=EN-US>Which methods should I look for
to implement this.<o:p></o:p></span></p>

<p class=MsoListParagraph style='margin-left:53.4pt'><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
lang=EN-US><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span lang=EN-US>Details<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Here is how I connect the call currently:<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-US>session.execute(&quot;bridge&quot;,&#8221;sofia/internal/&quot;
+ destination_number + &quot;@domain.com&#8221;)<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I have tried to create a timer callback
function &#8220;my_method()&#8221; using:<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-US>ivr_timer =threading.Timer(30,my_method)<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>This never called the function &#8220;my_method()&#8221;.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Maybe I am wrong in using threading.Timer
and the &#8220;bridge&#8221; application? Maybe I need to create a new thread
and a new timer using the API of freeswitch, plus to use the &#8220;session.setInputCallback&#8221;,
plus use a conference rather than a bridge? Can you please provide any
suggestions or examples? <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Thank you!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Best Regards, Delian Tashev<o:p></o:p></span></p>

</div>

</body>

</html>