<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I think that it would be better to have a generic function in the
configuration file like:<br>
<br>
sdp_get_attr(line, attr, result)<br>
<br>
Where line can be: m, c, o, etc ...<br>
<br>
The attr can be: ip, port, ...<br>
<br>
For the moment, this function will be a wrapper around the two
functions, so it supports:<br>
- sdp_get_attr("m", "port", result)<br>
- sdp_get_attr("c", "ip", result)<br>
<br>
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.<br>
<br>
What do you think?<br>
<br>
Also, at some point I should add a PV class for sdp access (if
nobody will do it meanwhile).<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<div class="moz-cite-prefix">On 9/11/12 11:51 AM, Vicente Hernando
wrote:<br>
</div>
<blockquote cite="mid:504F099B.8080303@systemonenoc.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Konstantin,<br>
<br>
attached patch provides a function that gets ports and stores
them in an AVP variable.<br>
<br>
<br>
However, there are other approaches to create these functions:<br>
<br>
- A function to return each parameter (sdp_get_ip_c,
sdp_get_port, etc)<br>
<br>
- An only function sdp_get_address which return two AVP
variables, IP and port for each stream.<br>
<br>
- A generic function sdp_get_stream_info which receives an enum
indicating what variable do you like and return it.<br>
<br>
- Two functions: sdp_get_stream_count,
sdp_get_stream_info(stream_num, enum_variable, pseudo_variable)<br>
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.<br>
<br>
<br>
Daniel, as sdpops maintainer which approach would you rather?<br>
<br>
<br>
Kind regards,<br>
Vicente. <br>
<br>
On 09/07/2012 04:37 PM, Konstantin M. wrote:<br>
</div>
<blockquote
cite="mid:CAEYtTzdFSo-cO4isE=bC_+HpNx4Jr_JAJoP2PEv6GJjN9OVT=w@mail.gmail.com"
type="cite">Hi Vicente,<br>
<br>
It's my personal but I think would be good to also have another
one function to extract a port of media stream.<br>
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...<br>
<br>
<br>
<div class="gmail_quote">2012/9/7 Vicente Hernando <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:vhernando@systemonenoc.com" target="_blank">vhernando@systemonenoc.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"> Hello,<br>
<br>
attached patch shows a new function in sdpops module:
sdp_get_ip_c<br>
<br>
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.<br>
<br>
<br>
Any opinion or criticism?<br>
<br>
<br>
Kind regards,<br>
Vicente.<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a></pre>
</body>
</html>