[sr-dev] sdpops: new function sdp_get_ip_c

Vicente Hernando vhernando at systemonenoc.com
Tue Sep 11 11:51:23 CEST 2012


Hello Konstantin,

attached patch provides a function that gets ports and stores them in an 
AVP variable.


However, there are other approaches to create these functions:

- A function to return each parameter (sdp_get_ip_c, sdp_get_port, etc)

- An only function sdp_get_address which return two AVP variables, IP 
and port for each stream.

- A generic function sdp_get_stream_info which receives an enum 
indicating what variable do you like and return it.

- Two functions: sdp_get_stream_count, sdp_get_stream_info(stream_num, 
enum_variable, pseudo_variable)
First would get total number of streams (asuming one session in 
offer/answer way), and second function would return that variable value 
for a stream.


Daniel, as sdpops maintainer which approach would you rather?


Kind regards,
Vicente.

On 09/07/2012 04:37 PM, Konstantin M. wrote:
> Hi Vicente,
>
> It's my personal but I think would be good to also have another one 
> function to extract a port of media stream.
> Because of no 'sdp_get_ip_c' and no something like 'sdp_get_port_c' - 
> I have to parse sdb body by python script just to fetch IP/PORT of 
> media stream...
>
>
> 2012/9/7 Vicente Hernando <vhernando at systemonenoc.com 
> <mailto:vhernando at systemonenoc.com>>
>
>     Hello,
>
>     attached patch shows a new function in sdpops module: sdp_get_ip_c
>
>     It receives as parameter an avp variable, and stores there every
>     connection IP for each stream. If a stream has not c IP, then it
>     returns session default one.
>
>
>     Any opinion or criticism?
>
>
>     Kind regards,
>     Vicente.
>
>     _______________________________________________
>     sr-dev mailing list
>     sr-dev at lists.sip-router.org <mailto:sr-dev at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120911/248f767f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdpops_sdp_get_port.patch
Type: text/x-diff
Size: 2904 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120911/248f767f/attachment.patch>


More information about the sr-dev mailing list