On Wed, Jul 7, 2010 at 1:58 PM, Evgeny Miloslavsky <emiloslav...@juniper.net
> wrote:
> Hi All!
>
> As my SIPp-UAC receives 200 OK with SDP answer, I have to take media port
> and a connection address for future uses: for example sending some TCP
> traffic using HPing/Netcat which will be called from the scenario within
> <nop> block.
>
> So my question is how do I get port number from Media Description field (m)
> and IP address from Connection information (C) field of received SDP answer?
>
Something like this should work:
<action>
<ereg regexp="c=IN +(IP4|IP6) +([0-9.]+)" search_in="msg"
assign_to="whole_thing,ip_type,rtp_ip_address" check_it="true" />
<log message="whole_thing='[$whole_thing]' ip_type='[$ip_type]'
rtp_ip_address='[$rtp_ip_address]'"/>
<ereg regexp="m=audio +([0-9]+)" search_in="msg"
assign_to="whole_thing,rtp_port" check_it="true" />
<log message="whole_thing='[$whole_thing]' rtp_port='[$rtp_port]'"/>
</action>
But you might need to adjust it, depending if you will use video instead of
audio or if you have more than one media stream etc, etc.
br,
takeshi
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users