<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">hi,<br>
<br>
hard to understand, what your objective is... at least for me ;-)<br>
<br>
so you want to establish a call (triggered by ami) between two
partys, record the conversation<br>
and save the file to a(nother) server (afterwards), right?<br>
<br>
and another task is to establish (also ami triggered) a call to a
mobile and play, lets say a voicefile.<br>
this "conversation" should also be recorded and saved on a(nother)
server (afterwards), right?<br>
<br>
let me know, if i understood you right, the solution is not so
hard to implement.<br>
In what language do you preferrably write your AGIs? (although
there is no absolute need for using an<br>
agi... you can all write down in your dialplan...)<br>
is there a special protocol requirement for saving/transferring
the recorded voicefile (e.g. ftps)?<br>
One obstacle is, that the recorded file is not fully written
_immediately_ after stopmixmonitor or hangup...<br>
this has to be taken care of and depending on your agi... it might
be interrupted, if the call is hungup...<br>
but as you did not show your agi... these are just hints..<br>
<br>
regards,<br>
yves<br>
<br>
<br>
<br>
Am 07.03.2013 16:21, schrieb Henrik Westerberg:<br>
</div>
<blockquote
cite="mid:CD8853E93122E74B85034CCF2DB5C3735B262E@AURO-TIDAX-EX1.tidax.se"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div>
<div>Hi,</div>
<div><br>
</div>
<div>I am developing a call recording application on Asterisk
11.2 and have this configuration in my dialplan:</div>
<div><br>
</div>
<div>[macro-ccdev2-rec]</div>
<div>exten => s,1,MixMonitor(${ARG1},b)</div>
</div>
<div><br>
</div>
<div>
<div>[outgoing-originate]</div>
<div>exten => _X.,1,NoOp(Will send call to ${EXTEN})</div>
<div>exten => _X.,n,Dial(SIP/${<a class="moz-txt-link-abbreviated" href="mailto:EXTEN}@x.y.z">EXTEN}@x.y.z</a>)</div>
</div>
<div><br>
</div>
<div>
<div>[outgoing-originate-rec]</div>
<div>exten =>
h,1,Agi(agi://localhost/ajpbx.agi?path=uploadrec&callid=${CC_CALLID})</div>
<div><br>
</div>
<div>exten => _X,1,NoOp(Will send call to ${EXTEN}, CC_CALLID
is ${CC_CALLID}, CC_FILENAME is ${CC_FILENAME})</div>
<div>exten =>
_X,n,Dial(SIP/${<a class="moz-txt-link-abbreviated" href="mailto:EXTEN}@x.y.z,60,M">EXTEN}@x.y.z,60,M</a>(ccdev2-rec^${CC_FILENAME})e)</div>
</div>
<div><br>
</div>
<div>If I want to make a recorded server callout from 077777777
to 0888888888 I then originate a call via AMI to
Local/077777777@outgoing-originate with context set
to outgoing-originate-rec and extension to 0888888888.</div>
<div>The result will be something like this:</div>
<div><br>
</div>
<div>
<div> -- Executing [s@macro-ccdev2-rec:1]
MixMonitor("SIP/upps-ccm-tq01-0000003f", "cbrec-15605.wav,b")
in new stack</div>
<div> == Begin MixMonitor Recording SIP/upps-ccm-tq01-0000003f</div>
<div> -- Executing [h@outgoing-originate-rec:1]
AGI("SIP/upps-ccm-tq01-0000003e",
"agi://l4574/ajpbxtest.agi?path=uploadrec&callid=15605")
in new stack</div>
<div> -- <SIP/upps-ccm-tq01-0000003e>AGI Script
agi://localhost/ajpbxtest.agi?path=uploadrec&callid=15605
completed, returning 0</div>
<div> -- Executing [h@outgoing-originate-rec-dev2:1]
AGI("SIP/upps-ccm-tq01-0000003f",
"agi://4574/ajpbxtest.agi?path=uploadrec&callid=") in new
stack</div>
<div> -- <SIP/upps-ccm-tq01-0000003f>AGI Script
agi://localhost/ajpbxtest.agi?path=uploadrec&callid=
completed, returning 0</div>
<div> == MixMonitor close filestream (mixed)</div>
<div> == End MixMonitor Recording SIP/upps-ccm-tq01-0000003f</div>
</div>
<div><br>
</div>
<div>Unfortunately I get two different calls to the h extension,
but this I can cope with. The one without called is not
interesting.</div>
<div>The uploading will fail since the MixMonitor is still on when
I try to upload the file. The file will not have a duration. It
works when I schedule the uploading a while after from my agi
application but I would rather not rely on a timeout. </div>
<div><br>
</div>
<div>When I tried to run StopMixMonitor before the Agi call in the
h extension, the first call fail and I never get any uploading
with callid.</div>
<div><br>
</div>
<div>
<div> -- Executing [s@macro-ccdev2-rec:1]
MixMonitor("SIP/upps-ccm-tq01-00000043", "cbrec-15607.wav,b")
in new stack</div>
<div> == Begin MixMonitor Recording SIP/upps-ccm-tq01-00000043</div>
<div> -- Executing [h@outgoing-originate-rec-dev2:1]
StopMixMonitor("SIP/upps-ccm-tq01-00000042", "") in new stack</div>
<div> == Spawn extension (outgoing-originate-rec-dev2, h, 1)
exited non-zero on 'SIP/upps-ccm-tq01-00000042'</div>
<div> -- Executing [h@outgoing-originate-rec-dev2:1]
StopMixMonitor("SIP/upps-ccm-tq01-00000043", "") in new stack</div>
<div> == MixMonitor close filestream (mixed)</div>
<div> -- Executing [h@outgoing-originate-rec-dev2:2]
AGI("SIP/upps-ccm-tq01-00000043",
"agi://localhost/ajpbxtest.agi?path=uploadrec&callid=") in
new stack</div>
</div>
<div><br>
</div>
<div>Am I missing something here? I also looked at the possibility
to specify a command to execute when MixMonitor stops but I
would rather handle the file uploading in my agi application.</div>
<div><br>
</div>
<div>I also have another case: I want to dial out a call and
record it. It will be a "oneway-call" from the server to a
mobile. Do I need to get AGI-control of it and record with an
AGI command or how can I hack it directly in the dial plan using
MixMonitor?</div>
<div><br>
</div>
<div>
<div style="font-family: Consolas; font-size: medium; ">Best
Regards,</div>
<div style="font-family: Consolas; font-size: medium; ">Henrik</div>
<div style="font-family: Consolas; font-size: medium; ">
<div style="font-family: Calibri, sans-serif; font-size: 14px;
">
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a class="moz-txt-link-freetext" href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
</blockquote>
<br>
</body>
</html>