Skip to content

Commit

Permalink
EDGE-631 Optionally prepend XML header in WebRtcTransfer.generateBxml…
Browse files Browse the repository at this point in the history
…() (#15)

* EDGE-631 Optionally append XML header in WebRtcTransfer.generateBxml()

* EDGE-631 Change append flag name to prepend

* EDGE-631 Add method to generate BXML verb alone
  • Loading branch information
carrington-bw authored Dec 21, 2020
1 parent 112fb87 commit af504e9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/com/bandwidth/webrtc/utils/WebRtcTransfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ public static String generateBxml(String deviceToken) {

public static String generateBxml(String deviceToken, String sipUri) {
return "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
+ "<Response><Transfer>\n"
+ "\t<SipUri uui=\"" + deviceToken + ";encoding=jwt\">" + sipUri + "</SipUri>\n"
+ "</Transfer></Response>\n";
+ "<Response>"
+ generateTransferVerb(deviceToken, sipUri)
+ "</Response>\n";
}

public static String generateTransferVerb(String deviceToken, String sipUri) {
return "<Transfer>\n"
+ "\t<SipUri uui=\"" + deviceToken + ";encoding=jwt\">" + sipUri + "</SipUri>\n"
+ "</Transfer>";
}
}

0 comments on commit af504e9

Please sign in to comment.