Thanks for the idea.
At the end, i've written the output to a file.
Could't get the /d to work so I did a workaround with [0-9].
Here is the code part:
<recv response="200" rtd="true">
<action>
<ereg regexp="m=video ([0-9]*)"
search_in="body"
assign_to="dummy,hoy"/>
<exec command="echo [$hoy] > portnum"/>
</action>
</recv>
<Reference variables="dummy" />
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Rob Day
Sent: Friday, February 21, 2014 9:08 AM
To: Alan Martinovic
Cc: [email protected]
Subject: Re: [Sipp-users] Print the media port number on stdout
I've never tried it, but it should be possible by combining a regexp action to
extract the port and the exec action to log it to stdout:
<ereg regexp="m=audio (\d+)"
search_in="body"
check_it="true"
assign_to="dummy, remote_audio_port"/>
<exec command="echo [$remote_audio_port]"/>
On 21 February 2014 07:27, Alan Martinovic <[email protected]> wrote:
> Hi,
>
> I'm doing a simple call simulation with sip
>
> sipp <destination_ip> -d 30000 -m 1 -i <caller_ip> -sf uac.xml
>
> Before the RTP streaming starts, the destination sends the 200 OK sip
> message. This message contains the port number for the streaming. I
> would like to make that port number accessible in a bash script.
>
> Is there a way to have sipp print out the port number on standard output?
>
>
> DISCLAIMER:
> This e-mail may contain confidential and privileged material for the
> sole use of the intended recipient. Any review, use, distribution or
> disclosure by others is strictly prohibited. If you are not the
> intended recipient (or authorized to receive for the recipient),
> please contact the sender by reply e-mail and delete all copies of this
> message.
>
> ----------------------------------------------------------------------
> -------- Managing the Performance of Cloud-Based Applications Take
> advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.
> clktrk _______________________________________________
> Sipp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sipp-users
>
DISCLAIMER:
This e-mail may contain confidential and privileged material for the sole use
of the intended recipient. Any review, use, distribution or disclosure by
others is strictly prohibited. If you are not the intended recipient (or
authorized to receive for the recipient), please contact the sender by reply
e-mail and delete all copies of this message.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users