[Freeswitch-dev] mod_dingaling does not set crypto

Richard Screene richard.screene at netdev.co.uk
Wed Jul 11 13:47:02 MSD 2012


Hello,

Using mod_dingaling I am unable to get it to append the crypto details to the session-accept Jingle stanza.  The message is sent as:

<iq xmlns="jabber:client" from="freeswitch at macbooks-macbook.local/talk" to="fff at macbooks-macbook.local/talk" type="set" id="300">
  <jin:jingle xmlns:jin="urn:xmpp:jingle:1" action="session-accept" sid="233007325" initiator="fff at macbooks-macbook.local">
    <jin:content name="audio" creator="initiator">
      <rtp:description xmlns:rtp="urn:xmpp:jingle:apps:rtp:1" media="audio" ssrc="1351525407">
        <rtp:payload-type id="0" name="PCMU" clockrate="8000" ptime="8000" maxptime="8000">
          <rtp:parameter name="bitrate" value="64000"></rtp:parameter>
        </rtp:payload-type>
      </rtp:description>
      <p:transport xmlns:p="http://www.google.com/transport/p2p"></p:transport>
    </jin:content>
  </jin:jingle>
  <ses:session xmlns:ses="http://www.google.com/session" type="accept" id="233007325" initiator="fff at macbooks-macbook.local">
    <pho:description xmlns:pho="http://www.google.com/session/phone">
      <pho:payload-type id="0" name="PCMU" clockrate="8000" bitrate="64000" xmlns:pho="http://www.google.com/session/phone"></pho:payload-type>
    </pho:description>
  </ses:session>
</iq>

The full Wireshark trace can be found at http://filebin.ca/8JFB0hyFdHf

On investigation it would seem that the TFLAG_SECURE flag is not being set.  If I hack out the test on this flag in mdl_build_crypto() then the crypto is included in the message generated by Freeswitch:

<iq xmlns="jabber:client" from="freeswitch at macbooks-macbook.local/talk" to="fff at macbooks-macbook.local/talk" type="set" id="301">
  <jin:jingle xmlns:jin="urn:xmpp:jingle:1" action="session-accept" sid="7FnyqtQPPMNPn5h7nnJuRiv3GWg/bRAs" initiator="audio">
    <jin:content name="audio" creator="initiator">
      <rtp:description xmlns:rtp="urn:xmpp:jingle:apps:rtp:1" media="audio" ssrc="1351524387">
        <rtp:payload-type id="0" name="PCMU" clockrate="8000" ptime="8000" maxptime="8000">
          <rtp:parameter name="bitrate" value="64000"></rtp:parameter>
        </rtp:payload-type>
        <rtp:encryption>
          <rtp:crypto crypto-suite="AES_CM_128_HMAC_SHA1_80" key-params="inline:J8/3QjLtugHFof08KBIevXxUOBo3x8PdphPMx7J4" tag="1"></rtp:crypto>
        </rtp:encryption>
      </rtp:description>
      <p:transport xmlns:p="http://www.google.com/transport/p2p"></p:transport>
    </jin:content>
  </jin:jingle>
  <ses:session xmlns:ses="http://www.google.com/session" type="accept" id="7FnyqtQPPMNPn5h7nnJuRiv3GWg/bRAs" initiator="audio">
    <pho:description xmlns:pho="http://www.google.com/session/phone">
      <pho:payload-type id="0" name="PCMU" clockrate="8000" bitrate="64000" xmlns:pho="http://www.google.com/session/phone"></pho:payload-type>
    </pho:description>
  </ses:session>
</iq>

But, I can't see how this flag is ever set.  Is this a bug or am I missing something very simple??

This is using Freeswitch commit fa1276d9492fd39ea733f7af301faed3556c9544 (dated 8th July 2012)

The jingle profile is here http://filebin.ca/8JGG8ZhEUSh.


Regards,
  Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20120711/78c724ec/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list