if (audio_app!=null || video_app!=null)
{ printLog("DEBUG: media application is already running",LogLevel.HIGH);
return;
}
SessionDescriptor local_sdp=new SessionDescriptor(call.getLocalSessionDescriptor());
String local_media_address=(new Parser(local_sdp.getConnection().toString())).skipString().skipString().getString();
int local_audio_port=0;
int local_video_port=0;
// parse local sdp
for (Enumeration e=local_sdp.getMediaDescriptors().elements(); e.hasMoreElements(); )
{ MediaField media=((MediaDescriptor)e.nextElement()).getMedia();
if (media.getMedia().equals("audio"))
local_audio_port=media.getPort();
if (media.getMedia().equals("video"))
local_video_port=media.getPort();
}
// parse remote sdp
SessionDescriptor remote_sdp=new SessionDescriptor(call.getRemoteSessionDescriptor());
String remote_media_address=(new Parser(remote_sdp.getConnection().toString())).skipString().skipString().getString();
int remote_audio_port=0;
int remote_video_port=0;
for (Enumeration e=remote_sdp.getMediaDescriptors().elements(); e.hasMoreElements(); )
{ MediaField media=((MediaDescriptor)e.nextElement()).getMedia();
if (media.getMedia().equals("audio"))