OP may be able to use System through Dial plan but I'm thinking that since tcpdump don't just give output within seconds or neither do it get daemonized? so this system() call will hold the call to that priority. This may even result in call failure. I think this system call should trigger a shell script that launches an instance of tcpdump and move forward in the dial plan. <div>
<br></div><div>Can anyone tell if we can extract a header value from SDP(for RTP Tx/RX ports) within the SIP packet using the SIP_HEADER function?</div><div><br></div><div>How about using sipgrep: The idea is launch a sipgrep based scripts in the background which just takes Call-ID and parse RTP port data and save it in memcached. This memchache Key/value register will just save [Call-ID:RTP port data] for each call entering into the Server. This script should start separate instances of tcpdump for each call with separate file names. </div>
<div><br></div><div>On each call hangup call the h extensions will use the SIP_HEADER(call-id) Key and trigger a stop command for the background tcpdump for this particular call.</div><div><br></div><div><br></div><div><div class="gmail_quote">
On Mon, Oct 24, 2011 at 4:36 AM, Bruce B <span dir="ltr"><<a href="mailto:bruceb444@gmail.com">bruceb444@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Then you may use system() in dial-plan to run that shell command along with what I suggested.<div><br></div><div><font color="#888888">-Bruce</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Oct 23, 2011 at 5:22 AM, ISABEL ORDAS ARNAL <span dir="ltr"><<a href="mailto:ioa@tid.es" target="_blank">ioa@tid.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Yes, I need to know to get in in dialplan because I want to capture traffic per call. I would like to launch $SHELL{tcpdump src port xxxx} in the dialplan or something like this. And I want RTP traffic only of a certain call.<br>
Thank you!<br>
<br>
=======================<br>
Date: Fri, 21 Oct 2011 09:41:39 -0400<br>
From: Bruce B <<a href="mailto:bruceb444@gmail.com" target="_blank">bruceb444@gmail.com</a>><br>
Subject: Re: [asterisk-users] how to know RTP por of a SIP client in<br>
the dialplan<br>
To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
<<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a>><br>
Message-ID:<br>
<CAJyE_uWLRXkhrWQ-6SvNW1ihN-nGA3HFwHt=<a href="mailto:PU-tfR6LYbi5mg@mail.gmail.com" target="_blank">PU-tfR6LYbi5mg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Do you need to know to get it in dialplan? If I not, from shell (not<br>
Asterisk CLI) I usually use:<br>
<br>
netstata -a | grep asterisk<br>
<br>
By default Asterisk settings it should be something between 10k-20k<br>
<br>
-Bruce<br>
<br>
On Fri, Oct 21, 2011 at 3:46 AM, ISABEL ORDAS ARNAL <<a href="mailto:ioa@tid.es" target="_blank">ioa@tid.es</a>> wrote:<br>
<br>
> Hi all, ****<br>
><br>
> How can I get the RTP port one SIP client is using for sending/receiving<br>
> RTP flow? Can I obtain it in from SIP_HEADER of something like that in the<br>
> dialplan?****<br>
><br>
> Thank you!****<br>
><br>
> ** **<br>
><br>
> Isabel****<br>
><br>
<br>
<br>
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.<br>
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at.<br>
<a href="http://www.tid.es/ES/PAGINAS/disclaimer.aspx" target="_blank">http://www.tid.es/ES/PAGINAS/disclaimer.aspx</a><br>
<font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></font></blockquote></div><br></div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>