<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      On 09/11/2012 07:41 PM, Daniel-Constantin Mierla wrote:<br>
    </div>
    <blockquote cite="mid:504F77E0.7010600@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hello,<br>
      <br>
      <div class="moz-cite-prefix">On 9/11/12 5:59 PM, Konstantin M.
        wrote:<br>
      </div>
      <blockquote
cite="mid:CAEYtTzegEWyGrrjOLNBGqK_RzKdi2CoRoR-qbPO7zcJ1YA-0QA@mail.gmail.com"
        type="cite">Hello Daniel<br>
        <br>
        <div class="gmail_quote">2012/9/11 Daniel-Constantin Mierla <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div 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>
            </div>
          </blockquote>
          <div>I'm agree with that<br>
            &nbsp;<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> 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>
            </div>
          </blockquote>
          <div><br>
            But how to specify a line if a multiple 'a' or 'm' will be
            in sdp body ?<br>
          </div>
        </div>
      </blockquote>
      <br>
      it's the current behaviour, as I can see in the patches, it takes
      all the values and adds them to an avp list.<br>
      <br>
      So my proposal was not make a single function that can be
      controlled via parameters, than lot of new functions.<br>
      <br>
      When there will be a PV for it, there should be some indexes to
      access specific lines.<br>
    </blockquote>
    <br>
    Both ways sdp_get_attr function and PV class seem good to me.<br>
    <br>
    <br>
    I can create a class variable like $redis in redis module, but I
    find several issues:<br>
    <br>
    If we return several results then they are referred by an index:&nbsp;
    $sdl(c=&gt;IP[0])&nbsp;&nbsp;&nbsp; $sdl(c=&gt;IP[1]), &nbsp; then we could need a size
    function here.<br>
    <br>
    <br>
    If joining every result together makes no sense and we would rather
    to show them within each stream, (e.g: showing a:fmtp) then having
    two indexes is the way to go?&nbsp; (first one for the stream and second
    one for the specific a:fmtp)<br>
    <br>
    That assuming we only have one session (offer/answer model), if not
    three indexes would be needed.<br>
    <br>
    <br>
    Another idea could be having two PV: $sdl_session&nbsp;&nbsp; $sdl_stream<br>
    <br>
    Kind regards,<br>
    Vicente.<br>
    <blockquote cite="mid:504F77E0.7010600@gmail.com" type="cite"> <br>
      Cheers,<br>
      Daniel<br>
      <br>
      <blockquote
cite="mid:CAEYtTzegEWyGrrjOLNBGqK_RzKdi2CoRoR-qbPO7zcJ1YA-0QA@mail.gmail.com"
        type="cite">
        <div class="gmail_quote">
          <div>For example this one:<br>
            -------<br>
            a=recvonly<br>
            m=audio 49170 RTP/AVP 0<br>
            m=video 51372 RTP/AVP 31<br>
            m=application 32416 udp wb<br>
            a=orient:portrait<br>
            -------<br>
            or:<br>
            -------<br>
            m=audio 19000 RTP/AVP 0 101<br>
            a=recvonly<br>
            a=rtpmap:0 pcmu/8000<br>
            a=rtpmap:101 telephone-event/8000<br>
            -------<br>
            <br>
          </div>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> 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
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <div>On 9/11/12 11:51 AM, Vicente Hernando wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div>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 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">&lt;<a moz-do-not-send="true"
                            href="mailto:vhernando@systemonenoc.com"
                            target="_blank">vhernando@systemonenoc.com</a>&gt;</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"
                            target="_blank">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></fieldset>
                      <br>
                      <pre>_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<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>
</pre>
                    </blockquote>
                    <br>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<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>
</pre>
                  </blockquote>
                  <br>
                </div>
              </div>
              <span class="HOEnZb"><font color="#888888">
                  <pre cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a></pre>
                </font></span></div>
            <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>
      <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" 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 moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a></pre>
      <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>
  </body>
</html>