Catching a hangup
Posted: Sun Jul 11, 2010 11:13 am
Hello,
I am trying to catch a hangup.
There are two cases:
either I have a match, or I don't.
When there is a match, I want to post everything I need to process
that call (working with below)
When there is no match I want to post the hangup (not working per below.
I have this in the script (below) but while I do get matches, the
hangups are not posted:
<field name="word">
<!-- catch hangup without match -->
<catch event="connection.disconnect.hangup">
<if cond="word.keyword!=''">
<assign name="recording" expr="word$.recording"/>
<assign name="confidence" expr="word$.confidence"/>
<assign name="campaignid" expr="word.campaignid"/>
<assign name="keyword" expr="word.keyword"/>
<assign name="callerid" expr="session.telephone.ani"/>
<assign name="sessionid" expr="session.id"/>
<submit namelist="callerid sessionid recording keyword campaignid
confidence" next="http://2020.grovestreet.net/plumvoice/response.php"
method="post" enctype="multipart/form-data"/>
<else/>
<assign name="callerid" expr="session.telephone.ani"/>
<assign name="sessionid" expr="session.id"/>
<submit namelist="sessionid callerid" method="post"
enctype="multipart/form-data"
next="http://2020.grovestreet.net/plumvoice/hangup.php"/>
</if>
</catch>
I am trying to catch a hangup.
There are two cases:
either I have a match, or I don't.
When there is a match, I want to post everything I need to process
that call (working with below)
When there is no match I want to post the hangup (not working per below.
I have this in the script (below) but while I do get matches, the
hangups are not posted:
<field name="word">
<!-- catch hangup without match -->
<catch event="connection.disconnect.hangup">
<if cond="word.keyword!=''">
<assign name="recording" expr="word$.recording"/>
<assign name="confidence" expr="word$.confidence"/>
<assign name="campaignid" expr="word.campaignid"/>
<assign name="keyword" expr="word.keyword"/>
<assign name="callerid" expr="session.telephone.ani"/>
<assign name="sessionid" expr="session.id"/>
<submit namelist="callerid sessionid recording keyword campaignid
confidence" next="http://2020.grovestreet.net/plumvoice/response.php"
method="post" enctype="multipart/form-data"/>
<else/>
<assign name="callerid" expr="session.telephone.ani"/>
<assign name="sessionid" expr="session.id"/>
<submit namelist="sessionid callerid" method="post"
enctype="multipart/form-data"
next="http://2020.grovestreet.net/plumvoice/hangup.php"/>
</if>
</catch>