[sr-dev] sdpops: new function sdp_get_ip_c

Konstantin M. evilzluk at gmail.com
Tue Sep 11 19:58:52 CEST 2012


Hello Daniel,

2012/9/11 Daniel-Constantin Mierla <miconda at gmail.com>

>  Hello,
>
>
> On 9/11/12 5:59 PM, Konstantin M. wrote:
>
> Hello Daniel
>
> 2012/9/11 Daniel-Constantin Mierla <miconda at gmail.com>
>
>>  Hello,
>>
>> I think that it would be better to have a generic function in the
>> configuration file like:
>>
>> sdp_get_attr(line, attr, result)
>>
>> Where line can be: m, c, o, etc ...
>>
>>  I'm agree with that
>
>
>>  The attr can be: ip, port, ...
>>
>> For the moment, this function will be a wrapper around the two functions,
>> so it supports:
>> - sdp_get_attr("m", "port", result)
>> - sdp_get_attr("c", "ip", result)
>>
>>
> But how to specify a line if a multiple 'a' or 'm' will be in sdp body ?
>
>
> it's the current behaviour, as I can see in the patches, it takes all the
> values and adds them to an avp list.
>
> So my proposal was not make a single function that can be controlled via
> parameters, than lot of new functions.
>
>
When there will be a PV for it, there should be some indexes to access
> specific lines.
>

Yes I think it's a good idea...


>
> Cheers,
> Daniel
>
>
>  For example this one:
> -------
> a=recvonly
> m=audio 49170 RTP/AVP 0
> m=video 51372 RTP/AVP 31
> m=application 32416 udp wb
> a=orient:portrait
> -------
> or:
> -------
> m=audio 19000 RTP/AVP 0 101
> a=recvonly
> a=rtpmap:0 pcmu/8000
> a=rtpmap:101 telephone-event/8000
> -------
>
>   There are many attributes that can be returned, thus it can results in
>> dozens of the configuration file functions if we go for one per attribute.
>>
>> What do you think?
>>
>> Also, at some point I should add a PV class for sdp access (if nobody
>> will do it meanwhile).
>>
>> Cheers,
>> Daniel
>>
>>
>>
>> On 9/11/12 11:51 AM, Vicente Hernando wrote:
>>
>> 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>
>>
>>> 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
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>>
>>>
>>
>>
>> _______________________________________________
>> sr-dev mailing listsr-dev at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>>
>>
>>
>> _______________________________________________
>> sr-dev mailing listsr-dev at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>>
>>   --
>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>> Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
>> Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
>>
>>
>> _______________________________________________
>> sr-dev mailing list
>> sr-dev at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>>
>
>
> _______________________________________________
> sr-dev mailing listsr-dev at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
> Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120911/2525107d/attachment.htm>


More information about the sr-dev mailing list