Metaswitch/sdp — pull request #7 by mirw (2013-12-10 12:39:11+00:00)
Title: [Reviewer: Andy] Add host realm

Andy,

Please can you review this fix? Basically, it pulls the previous Message.createAnswer method into the Stack class and adds the Origin-Host and Origin-Realm AVPs (which are mandatory). Previously, there were situations in which we didn't add these AVPs and this caused interop issues.

I've also added an optional parameter to set the Return-Code AVP on an answer. This AVP is (I believe) mandatory but I've made it optional because there are occasions where you build the answer before knowing what return code you're going to use.

I've UT-ed that this doesn't break anything (as part of the crest changes that are to follow). I've also live-tested that the answers that didn't have Origin-Host or Origin-Realm AVPs on before now do.

Matt