Search in sources :

Example 11 with SdpInfo

use of com.sun.voip.SdpInfo in project Openfire by igniterealtime.

the class SipUtil method getConferenceIdFromSdp.

/*
     * We add an attribute to the sdp data when we send a request
     * to a sip phone number
     */
public static String getConferenceIdFromSdp(Request request) {
    byte[] rawContent = request.getRawContent();
    if (rawContent == null) {
        return null;
    }
    String sdpBody = new String(rawContent);
    SdpInfo sdpInfo;
    try {
        sdpInfo = SdpManager.parseSdp(sdpBody);
    } catch (ParseException e) {
        return null;
    }
    return sdpInfo.getConferenceId();
}
Also used : SdpInfo(com.sun.voip.SdpInfo) ParseException(java.text.ParseException)

Aggregations

SdpInfo (com.sun.voip.SdpInfo)11 ParseException (java.text.ParseException)10 InetSocketAddress (java.net.InetSocketAddress)6 MediaInfo (com.sun.voip.MediaInfo)4 CallParticipant (com.sun.voip.CallParticipant)1 IOException (java.io.IOException)1 InvalidArgumentException (javax.sip.InvalidArgumentException)1