├── .gitignore ├── Jenkinsfile-master-integration ├── Jenkinsfile-master-release ├── Jenkinsfile-snapshot ├── Jenkinsfile-stable-integration-release ├── LICENSE ├── README.md ├── architecture-diagrams ├── bootstrap │ └── bootstrap-classes.dia ├── media-core-modules.puml ├── mgcp │ ├── mgcp-asr-driver-google-sequence.puml │ ├── mgcp-asr-dtmf-state.puml │ ├── mgcp-asr-state.puml │ ├── mgcp-classes-endpoints.adoc │ ├── mgcp-classes-events.adoc │ ├── mgcp-classes-message-center.adoc │ ├── mgcp-classes-network.adoc │ ├── mgcp-classes-signals.adoc │ ├── mgcp-classes-transaction.adoc │ ├── mgcp-classes.adoc │ ├── mgcp-classes.dia │ ├── mgcp-connection-max-duration-timeout-no-event-sequence.adoc │ ├── mgcp-connection-max-duration-timeout-sequence.adoc │ ├── mgcp-connection-rtp-timeout-sequence.adoc │ ├── mgcp-controller-state.adoc │ ├── mgcp-playcollect-state.adoc │ ├── mgcp-playrecord-state.adoc │ ├── mgcp-transaction-class.adoc │ ├── mgcp-transaction-inbound-sequence.adoc │ ├── mgcp-transaction-outbound-sequence.adoc │ └── mgcp-transaction-outbound-sequence.dia ├── network │ └── network-channel-classes.adoc ├── pcap │ └── pcap-player-classes.puml ├── resource-pool-classes.dia └── rtp │ └── rtp-netty-handler-state.puml ├── asr ├── asr-api │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── asr │ │ ├── AsrEngine.java │ │ ├── AsrEngineListener.java │ │ ├── AsrEngineProvider.java │ │ └── AsrException.java ├── asr-engine │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── asr │ │ │ ├── AsrEngineImpl.java │ │ │ ├── AsrEngineProviderImpl.java │ │ │ ├── InputTimeoutDetector.java │ │ │ ├── InputTimeoutListener.java │ │ │ └── driver │ │ │ └── AsrDriverManagerImpl.java │ │ └── test │ │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── asr │ │ └── InputTimeoutDetectorTest.java └── pom.xml ├── assembly ├── pom.xml └── src │ └── assembly │ └── descriptor.xml ├── client ├── jsr-309 │ ├── driver │ │ ├── .gitignore │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── restcomm │ │ │ │ │ ├── fsm │ │ │ │ │ ├── FSM.java │ │ │ │ │ ├── Logger.java │ │ │ │ │ ├── State.java │ │ │ │ │ ├── StateEventHandler.java │ │ │ │ │ ├── Transition.java │ │ │ │ │ ├── TransitionHandler.java │ │ │ │ │ └── UnknownTransitionException.java │ │ │ │ │ ├── javax │ │ │ │ │ └── media │ │ │ │ │ │ └── mscontrol │ │ │ │ │ │ ├── AbstractJoinable.java │ │ │ │ │ │ ├── DefaultEventGeneratorFactory.java │ │ │ │ │ │ ├── EventDetectorFactory.java │ │ │ │ │ │ ├── EventExecutor.java │ │ │ │ │ │ ├── EventGeneratorFactory.java │ │ │ │ │ │ ├── MediaConfigImpl.java │ │ │ │ │ │ ├── MediaObjectImpl.java │ │ │ │ │ │ ├── MediaSessionImpl.java │ │ │ │ │ │ ├── MsControlFactoryImpl.java │ │ │ │ │ │ ├── ParameterImpl.java │ │ │ │ │ │ ├── ParametersImpl.java │ │ │ │ │ │ ├── SupportedFeaturesImpl.java │ │ │ │ │ │ ├── TagNames.java │ │ │ │ │ │ ├── XMLParser.java │ │ │ │ │ │ ├── container │ │ │ │ │ │ ├── ContainerImpl.java │ │ │ │ │ │ ├── Endpoint.java │ │ │ │ │ │ ├── InvocationLock.java │ │ │ │ │ │ ├── JoinEventImpl.java │ │ │ │ │ │ ├── Link.java │ │ │ │ │ │ ├── LinkListener.java │ │ │ │ │ │ └── MediaStreamImpl.java │ │ │ │ │ │ ├── mediagroup │ │ │ │ │ │ ├── Action.java │ │ │ │ │ │ ├── MediaGroupImpl.java │ │ │ │ │ │ ├── PlayerConfigImpl.java │ │ │ │ │ │ ├── PlayerEventImpl.java │ │ │ │ │ │ ├── PlayerImpl.java │ │ │ │ │ │ ├── PlayerRecorderSignalDetectorConfig.java │ │ │ │ │ │ ├── PlayerSignalDetectorConfig.java │ │ │ │ │ │ ├── RecorderConfigImpl.java │ │ │ │ │ │ ├── RecorderEventImpl.java │ │ │ │ │ │ ├── RecorderImpl.java │ │ │ │ │ │ ├── RecorderState.java │ │ │ │ │ │ ├── SignalDetectorConfig.java │ │ │ │ │ │ └── signals │ │ │ │ │ │ │ ├── Options.java │ │ │ │ │ │ │ ├── Pattern.java │ │ │ │ │ │ │ ├── Patterns.java │ │ │ │ │ │ │ ├── SignalDetectorEventImpl.java │ │ │ │ │ │ │ ├── SignalDetectorImpl.java │ │ │ │ │ │ │ └── buffer │ │ │ │ │ │ │ ├── BufferListener.java │ │ │ │ │ │ │ ├── DtmfEvent.java │ │ │ │ │ │ │ ├── Event.java │ │ │ │ │ │ │ └── EventBuffer.java │ │ │ │ │ │ ├── mixer │ │ │ │ │ │ ├── AdapterConfig.java │ │ │ │ │ │ ├── AllocationEventImpl.java │ │ │ │ │ │ ├── MediaMixerImpl.java │ │ │ │ │ │ ├── MixerAdapterImpl.java │ │ │ │ │ │ ├── MixerAudioConfig.java │ │ │ │ │ │ └── MixerEventImpl.java │ │ │ │ │ │ ├── networkconnection │ │ │ │ │ │ ├── BaseConfig.java │ │ │ │ │ │ ├── CreateConnectionRequest.java │ │ │ │ │ │ ├── CreateConnectionResponseHandler.java │ │ │ │ │ │ ├── DeleteConnectionRequest.java │ │ │ │ │ │ ├── DeleteConnectionResponseHandler.java │ │ │ │ │ │ ├── MediaParser.java │ │ │ │ │ │ ├── ModifyConnectionRequest.java │ │ │ │ │ │ ├── ModifyConnectionResponseHandler.java │ │ │ │ │ │ ├── NetworkConnectionImpl.java │ │ │ │ │ │ ├── SdpPortManagerEventImpl.java │ │ │ │ │ │ ├── SdpPortManagerImpl.java │ │ │ │ │ │ ├── SdpProcessor.java │ │ │ │ │ │ ├── TimeoutError.java │ │ │ │ │ │ └── fsm │ │ │ │ │ │ │ ├── ConnectionState.java │ │ │ │ │ │ │ └── ConnectionTransition.java │ │ │ │ │ │ ├── resource │ │ │ │ │ │ └── ExtendedParameter.java │ │ │ │ │ │ ├── spi │ │ │ │ │ │ └── DriverImpl.java │ │ │ │ │ │ └── vxml │ │ │ │ │ │ └── VxmlDialogImpl.java │ │ │ │ │ ├── jsr309 │ │ │ │ │ └── mgcp │ │ │ │ │ │ └── PackageAU.java │ │ │ │ │ ├── mscontrol │ │ │ │ │ └── sdp │ │ │ │ │ │ ├── AVProfile.java │ │ │ │ │ │ ├── AudioFormat.java │ │ │ │ │ │ ├── AudioFormatParser.java │ │ │ │ │ │ ├── Connection.java │ │ │ │ │ │ ├── Format.java │ │ │ │ │ │ ├── FormatParser.java │ │ │ │ │ │ ├── FormatUtils.java │ │ │ │ │ │ ├── MediaDescriptor.java │ │ │ │ │ │ ├── MediaType.java │ │ │ │ │ │ ├── Origin.java │ │ │ │ │ │ ├── SessionDescriptor.java │ │ │ │ │ │ ├── VideoFormat.java │ │ │ │ │ │ └── VideoFormatParser.java │ │ │ │ │ ├── sdp │ │ │ │ │ ├── AVProfile.java │ │ │ │ │ ├── AudioFormat.java │ │ │ │ │ ├── Format.java │ │ │ │ │ ├── FormatUtils.java │ │ │ │ │ ├── RTPAudioFormat.java │ │ │ │ │ ├── RTPFormat.java │ │ │ │ │ ├── RTPFormatParser.java │ │ │ │ │ ├── RTPVideoFormat.java │ │ │ │ │ ├── UnsupportedFormatException.java │ │ │ │ │ └── VideoFormat.java │ │ │ │ │ └── test │ │ │ │ │ └── Tester.java │ │ │ └── resources │ │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── javax.media.mscontrol.spi.Driver │ │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── restcomm │ │ │ ├── fsm │ │ │ ├── FSMTest.java │ │ │ └── MultipleFSMTest.java │ │ │ ├── javax │ │ │ └── media │ │ │ │ └── mscontrol │ │ │ │ ├── AbstractJoinableTest.java │ │ │ │ ├── BaseMediaConfigTest.java │ │ │ │ ├── MediaObjectImplTest.java │ │ │ │ ├── MediaSessionImplTest.java │ │ │ │ ├── SupportedFeaturesImplTest.java │ │ │ │ ├── load │ │ │ │ └── DTMFLoadTest.java │ │ │ │ ├── mediagroup │ │ │ │ ├── PlayerSignalDetectorConfigTest.java │ │ │ │ └── signals │ │ │ │ │ ├── OptionsTest.java │ │ │ │ │ ├── PatternsTest.java │ │ │ │ │ └── buffer │ │ │ │ │ └── EventBufferTest.java │ │ │ │ ├── networkconnection │ │ │ │ ├── BaseConfigTest.java │ │ │ │ ├── MediaParserTest.java │ │ │ │ └── SdpProcessorTest.java │ │ │ │ ├── resource │ │ │ │ └── ParametersImplTest.java │ │ │ │ └── test.xml │ │ │ └── mscontrol │ │ │ └── sdp │ │ │ └── SessionDescriptorTest.java │ ├── pom.xml │ └── tck │ │ ├── JSR_309_TCK_License.pdf │ │ ├── OC_jsr309_TCK_20091029.zip │ │ ├── TCK-version │ │ ├── TCK.properties │ │ ├── TCKUserGuide.html │ │ ├── build.xml │ │ ├── coverage │ │ ├── TCK-report-appserver.html │ │ ├── TCK-report-standalone.html │ │ ├── TCKAssertionsList.html │ │ ├── TCKCoverageDocument.html │ │ ├── fields-coverage │ │ ├── jsr309_api.sig │ │ ├── methods-coverage │ │ ├── sigtest-2.1-src.zip │ │ ├── sigtest-license.html │ │ └── sigtest.jar │ │ ├── deps │ │ ├── concurrent-3.0.0.CR2.jar │ │ ├── jain-mgcp-ri-1.0.jar │ │ ├── jain-sip-ri-1.2.146.jar │ │ ├── jsr-309-driver-3.0.0.CR2.jar │ │ ├── junit-4.7-src.jar │ │ ├── junit-license.html │ │ ├── junit.jar │ │ ├── log4j-1.2-api-2.10.0.jar │ │ ├── log4j-api-2.10.0.jar │ │ ├── log4j-core-2.10.0.jar │ │ ├── log4j-license.html │ │ ├── media_server_control-1_0-final-spec.zip │ │ ├── mgcp-driver-3.0.0.CR2.jar │ │ └── mscontrol.jar │ │ ├── exclude-list.properties │ │ ├── javadoc │ │ └── TCK │ │ │ ├── TCKSummary.html │ │ │ ├── allclasses-frame.html │ │ │ ├── allclasses-noframe.html │ │ │ ├── com │ │ │ └── hp │ │ │ │ └── opencall │ │ │ │ └── jmsc │ │ │ │ └── test │ │ │ │ ├── AllTests.html │ │ │ │ ├── AssertionIds.html │ │ │ │ ├── ContinuityChecker.DTMFReceiver.html │ │ │ │ ├── ContinuityChecker.html │ │ │ │ ├── CustomCactusTestMethod.html │ │ │ │ ├── CustomTestMethod.html │ │ │ │ ├── LoopbackMediaGroup.html │ │ │ │ ├── MediaSessionBase.html │ │ │ │ ├── PatternChecker.html │ │ │ │ ├── SimplePlayTest.html │ │ │ │ ├── SipPhoneEmulator.html │ │ │ │ ├── TestBase.CompletionStatus.html │ │ │ │ ├── TestBase.EventHolder.html │ │ │ │ ├── TestBase.EventWaiter.html │ │ │ │ ├── TestBase.html │ │ │ │ ├── class-use │ │ │ │ ├── AllTests.html │ │ │ │ ├── AssertionIds.html │ │ │ │ ├── ContinuityChecker.DTMFReceiver.html │ │ │ │ ├── ContinuityChecker.html │ │ │ │ ├── CustomCactusTestMethod.html │ │ │ │ ├── CustomTestMethod.html │ │ │ │ ├── LoopbackMediaGroup.html │ │ │ │ ├── MediaSessionBase.html │ │ │ │ ├── PatternChecker.html │ │ │ │ ├── SimplePlayTest.html │ │ │ │ ├── SipPhoneEmulator.html │ │ │ │ ├── TestBase.CompletionStatus.html │ │ │ │ ├── TestBase.EventHolder.html │ │ │ │ ├── TestBase.EventWaiter.html │ │ │ │ └── TestBase.html │ │ │ │ ├── mandatory │ │ │ │ ├── AllCactusTests.html │ │ │ │ ├── AllTests.html │ │ │ │ ├── class-use │ │ │ │ │ ├── AllCactusTests.html │ │ │ │ │ └── AllTests.html │ │ │ │ ├── functional │ │ │ │ │ ├── AllTests.html │ │ │ │ │ ├── MediaConfigTest.html │ │ │ │ │ ├── MediaObjectIdTest.html │ │ │ │ │ ├── MediaSessionTest.html │ │ │ │ │ ├── SupportedFeaturesTest.html │ │ │ │ │ ├── class-use │ │ │ │ │ │ ├── AllTests.html │ │ │ │ │ │ ├── MediaConfigTest.html │ │ │ │ │ │ ├── MediaObjectIdTest.html │ │ │ │ │ │ ├── MediaSessionTest.html │ │ │ │ │ │ └── SupportedFeaturesTest.html │ │ │ │ │ ├── join │ │ │ │ │ │ ├── InitJoinTest.JoinManager.html │ │ │ │ │ │ ├── InitJoinTest.html │ │ │ │ │ │ ├── class-use │ │ │ │ │ │ │ ├── InitJoinTest.JoinManager.html │ │ │ │ │ │ │ └── InitJoinTest.html │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ ├── package-tree.html │ │ │ │ │ │ └── package-use.html │ │ │ │ │ ├── mediagroup │ │ │ │ │ │ ├── PlayerTest.html │ │ │ │ │ │ ├── PromptAndCollectTest.html │ │ │ │ │ │ ├── PromptAndRecordTest.html │ │ │ │ │ │ ├── RecorderTest.html │ │ │ │ │ │ ├── class-use │ │ │ │ │ │ │ ├── PlayerTest.html │ │ │ │ │ │ │ ├── PromptAndCollectTest.html │ │ │ │ │ │ │ ├── PromptAndRecordTest.html │ │ │ │ │ │ │ └── RecorderTest.html │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ ├── package-tree.html │ │ │ │ │ │ ├── package-use.html │ │ │ │ │ │ └── signals │ │ │ │ │ │ │ ├── DTMFBufferingTest.html │ │ │ │ │ │ │ ├── SignalDetectorTest.html │ │ │ │ │ │ │ ├── class-use │ │ │ │ │ │ │ ├── DTMFBufferingTest.html │ │ │ │ │ │ │ └── SignalDetectorTest.html │ │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ │ ├── package-tree.html │ │ │ │ │ │ │ └── package-use.html │ │ │ │ │ ├── mixer │ │ │ │ │ │ ├── MixerAdapterTest.html │ │ │ │ │ │ ├── MixerJoinTest.html │ │ │ │ │ │ ├── MixerMediaGroupTest.html │ │ │ │ │ │ ├── MixerTest.html │ │ │ │ │ │ ├── ParticipantDTMFTest.html │ │ │ │ │ │ ├── ParticipantJoinTest.html │ │ │ │ │ │ ├── class-use │ │ │ │ │ │ │ ├── MixerAdapterTest.html │ │ │ │ │ │ │ ├── MixerJoinTest.html │ │ │ │ │ │ │ ├── MixerMediaGroupTest.html │ │ │ │ │ │ │ ├── MixerTest.html │ │ │ │ │ │ │ ├── ParticipantDTMFTest.html │ │ │ │ │ │ │ └── ParticipantJoinTest.html │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ ├── package-tree.html │ │ │ │ │ │ └── package-use.html │ │ │ │ │ ├── networkconnection │ │ │ │ │ │ ├── CodecPolicyTest.html │ │ │ │ │ │ ├── NetworkConnectionTest.html │ │ │ │ │ │ ├── class-use │ │ │ │ │ │ │ ├── CodecPolicyTest.html │ │ │ │ │ │ │ └── NetworkConnectionTest.html │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ ├── package-tree.html │ │ │ │ │ │ └── package-use.html │ │ │ │ │ ├── package-frame.html │ │ │ │ │ ├── package-summary.html │ │ │ │ │ ├── package-tree.html │ │ │ │ │ ├── package-use.html │ │ │ │ │ ├── resource │ │ │ │ │ │ ├── ConfirmTest.html │ │ │ │ │ │ ├── class-use │ │ │ │ │ │ │ └── ConfirmTest.html │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ ├── package-tree.html │ │ │ │ │ │ └── package-use.html │ │ │ │ │ └── vxml │ │ │ │ │ │ ├── VxmlTest.html │ │ │ │ │ │ ├── class-use │ │ │ │ │ │ └── VxmlTest.html │ │ │ │ │ │ ├── package-frame.html │ │ │ │ │ │ ├── package-summary.html │ │ │ │ │ │ ├── package-tree.html │ │ │ │ │ │ └── package-use.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ ├── package-use.html │ │ │ │ └── robustness │ │ │ │ │ ├── AllTests.html │ │ │ │ │ ├── ListenerTest.html │ │ │ │ │ ├── MSFaultTestServer │ │ │ │ │ ├── MediaServerFaultTest.html │ │ │ │ │ ├── SIPServer_Base.html │ │ │ │ │ ├── Test_2_2_5_1_MediaServerSendsBye.html │ │ │ │ │ ├── Test_2_2_5_2_MediaServerRejectSDP.html │ │ │ │ │ ├── Test_2_2_5_3_MediaServerSendsReInvite.html │ │ │ │ │ ├── Test_2_2_5_4_MediaServerRejectReinvite.html │ │ │ │ │ ├── class-use │ │ │ │ │ │ ├── MediaServerFaultTest.html │ │ │ │ │ │ ├── SIPServer_Base.html │ │ │ │ │ │ ├── Test_2_2_5_1_MediaServerSendsBye.html │ │ │ │ │ │ ├── Test_2_2_5_2_MediaServerRejectSDP.html │ │ │ │ │ │ ├── Test_2_2_5_3_MediaServerSendsReInvite.html │ │ │ │ │ │ └── Test_2_2_5_4_MediaServerRejectReinvite.html │ │ │ │ │ ├── package-frame.html │ │ │ │ │ ├── package-summary.html │ │ │ │ │ ├── package-tree.html │ │ │ │ │ └── package-use.html │ │ │ │ │ ├── MediaObjectIdTest.html │ │ │ │ │ ├── NullReferenceTest.html │ │ │ │ │ ├── UnchangedArgsTest.html │ │ │ │ │ ├── class-use │ │ │ │ │ ├── AllTests.html │ │ │ │ │ ├── ListenerTest.html │ │ │ │ │ ├── MediaObjectIdTest.html │ │ │ │ │ ├── NullReferenceTest.html │ │ │ │ │ └── UnchangedArgsTest.html │ │ │ │ │ ├── mediagroup │ │ │ │ │ ├── MediaGroupUnjoinTest.html │ │ │ │ │ ├── PlayerRobustnessTest.html │ │ │ │ │ ├── class-use │ │ │ │ │ │ ├── MediaGroupUnjoinTest.html │ │ │ │ │ │ └── PlayerRobustnessTest.html │ │ │ │ │ ├── package-frame.html │ │ │ │ │ ├── package-summary.html │ │ │ │ │ ├── package-tree.html │ │ │ │ │ └── package-use.html │ │ │ │ │ ├── networkconnection │ │ │ │ │ ├── CodecPolicyTest.html │ │ │ │ │ ├── class-use │ │ │ │ │ │ └── CodecPolicyTest.html │ │ │ │ │ ├── package-frame.html │ │ │ │ │ ├── package-summary.html │ │ │ │ │ ├── package-tree.html │ │ │ │ │ └── package-use.html │ │ │ │ │ ├── package-frame.html │ │ │ │ │ ├── package-summary.html │ │ │ │ │ ├── package-tree.html │ │ │ │ │ ├── package-use.html │ │ │ │ │ └── resource │ │ │ │ │ ├── RTCTest.html │ │ │ │ │ ├── class-use │ │ │ │ │ └── RTCTest.html │ │ │ │ │ ├── package-frame.html │ │ │ │ │ ├── package-summary.html │ │ │ │ │ ├── package-tree.html │ │ │ │ │ └── package-use.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ │ ├── constant-values.html │ │ │ ├── deprecated-list.html │ │ │ ├── help-doc.html │ │ │ ├── index-all.html │ │ │ ├── index.html │ │ │ ├── overview-frame.html │ │ │ ├── overview-summary.html │ │ │ ├── overview-tree.html │ │ │ ├── package-list │ │ │ ├── resources │ │ │ └── inherit.gif │ │ │ ├── serialized-form.html │ │ │ └── stylesheet.css │ │ ├── launch-TCK.sh │ │ ├── log4j2.properties │ │ ├── log4j2.xml │ │ ├── media │ │ ├── Numbers_1-15.wav │ │ ├── Numbers_1-5_3s.wav │ │ ├── cago-dtmf2.wav │ │ ├── cagocago-onesecond.wav │ │ ├── decreasingvolume-recorded.wav │ │ ├── dtmf-1.wav │ │ ├── dtmfs-1-9.wav │ │ ├── increasingvolume-recorded.wav │ │ ├── recorded.wav │ │ └── recorded2.wav │ │ ├── mediarecorded.wav │ │ ├── mixeradaptertest.properties │ │ ├── run.bat │ │ ├── server.log │ │ ├── tck-cactus │ │ ├── build.xml │ │ ├── local.properties │ │ └── src │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ └── cactus.properties │ │ ├── tck-reports │ │ └── 2011-09-27_11-01 │ │ │ └── junit-noframes.html │ │ ├── tck-run │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.MediaConfigTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.MediaObjectIdTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.MediaSessionTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.SupportedFeaturesTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.join.InitJoinTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.PlayerTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.PromptAndCollectTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.PromptAndRecordTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.RecorderTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.signals.DTMFBufferingTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.signals.SignalDetectorTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mixer.MixerAdapterTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mixer.MixerJoinTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mixer.MixerMediaGroupTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mixer.MixerTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mixer.ParticipantDTMFTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.mixer.ParticipantJoinTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.networkconnection.CodecPolicyTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.networkconnection.NetworkConnectionTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.resource.ConfirmTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.functional.vxml.VxmlTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.ListenerTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.MediaObjectIdTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.NullReferenceTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.UnchangedArgsTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.mediagroup.MediaGroupUnjoinTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.mediagroup.PlayerRobustnessTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.networkconnection.CodecPolicyTest.xml │ │ ├── TEST-com.hp.opencall.jmsc.test.mandatory.robustness.resource.RTCTest.xml │ │ └── TESTS-TestSuites.xml │ │ ├── tck.jar │ │ ├── tck.log │ │ └── windows_classpath ├── mgcp │ ├── driver │ │ ├── ant-build-config.properties │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── restcomm │ │ │ │ │ └── media │ │ │ │ │ └── client │ │ │ │ │ └── mgcp │ │ │ │ │ ├── handlers │ │ │ │ │ ├── MessageHandler.java │ │ │ │ │ ├── MgcpContentHandler.java │ │ │ │ │ ├── ReceivedTransactionID.java │ │ │ │ │ └── TransactionHandler.java │ │ │ │ │ ├── jain │ │ │ │ │ └── pkg │ │ │ │ │ │ ├── AUMgcpEvent.java │ │ │ │ │ │ ├── AUPackage.java │ │ │ │ │ │ ├── AUUtils.java │ │ │ │ │ │ ├── AnnouncementParmValue.java │ │ │ │ │ │ ├── BooleanValue.java │ │ │ │ │ │ ├── DisplayTextSeg.java │ │ │ │ │ │ ├── EventsValue.java │ │ │ │ │ │ ├── NumberValue.java │ │ │ │ │ │ ├── Parameter.java │ │ │ │ │ │ ├── ParameterEnum.java │ │ │ │ │ │ ├── ParserException.java │ │ │ │ │ │ ├── PosKeyValue.java │ │ │ │ │ │ ├── SLPackage.java │ │ │ │ │ │ ├── SegmentId.java │ │ │ │ │ │ ├── SilenceSeg.java │ │ │ │ │ │ ├── StringValue.java │ │ │ │ │ │ ├── TextToSpeechSeg.java │ │ │ │ │ │ └── Value.java │ │ │ │ │ ├── parser │ │ │ │ │ ├── SplitDetails.java │ │ │ │ │ ├── StringFunctions.java │ │ │ │ │ ├── commands │ │ │ │ │ │ ├── AuditConnectionHandler.java │ │ │ │ │ │ ├── AuditEndpointHandler.java │ │ │ │ │ │ ├── CreateConnectionHandler.java │ │ │ │ │ │ ├── DeleteConnectionHandler.java │ │ │ │ │ │ ├── EndpointConfigurationHandler.java │ │ │ │ │ │ ├── ModifyConnectionHandler.java │ │ │ │ │ │ ├── NotificationRequestHandler.java │ │ │ │ │ │ ├── NotifyHandler.java │ │ │ │ │ │ ├── RespUnknownHandler.java │ │ │ │ │ │ └── RestartInProgressHandler.java │ │ │ │ │ ├── params │ │ │ │ │ │ ├── BandwidthHandler.java │ │ │ │ │ │ ├── BearerInformationHandler.java │ │ │ │ │ │ ├── CapabilityHandler.java │ │ │ │ │ │ ├── CompressionAlgorithmHandler.java │ │ │ │ │ │ ├── ConnectionModeHandler.java │ │ │ │ │ │ ├── ConnectionParmHandler.java │ │ │ │ │ │ ├── DigitMapHandler.java │ │ │ │ │ │ ├── EchoCancellationHandler.java │ │ │ │ │ │ ├── EmbeddedRequestHandler.java │ │ │ │ │ │ ├── EncryptionMethodHandler.java │ │ │ │ │ │ ├── EndpointIdentifierHandler.java │ │ │ │ │ │ ├── EventNameHandler.java │ │ │ │ │ │ ├── GainControlHandler.java │ │ │ │ │ │ ├── InfoCodeHandler.java │ │ │ │ │ │ ├── LocalOptionValueHandler.java │ │ │ │ │ │ ├── NotificationRequestParamHandler.java │ │ │ │ │ │ ├── NotifiedEntityHandler.java │ │ │ │ │ │ ├── PacketizationPeriodHandler.java │ │ │ │ │ │ ├── ReasonCodeHandler.java │ │ │ │ │ │ ├── RequestedActionHandler.java │ │ │ │ │ │ ├── RequestedEventHandler.java │ │ │ │ │ │ ├── ResourceReservationHandler.java │ │ │ │ │ │ ├── RestartMethodHandler.java │ │ │ │ │ │ ├── ReturnCodeHandler.java │ │ │ │ │ │ ├── SilenceSuppressionHandler.java │ │ │ │ │ │ ├── TypeOfNetworkHandler.java │ │ │ │ │ │ └── TypeOfServiceHandler.java │ │ │ │ │ └── pkg │ │ │ │ │ │ └── PackageNameHandler.java │ │ │ │ │ ├── stack │ │ │ │ │ ├── ExtendedJainMgcpProvider.java │ │ │ │ │ ├── JainMgcpExtendedListener.java │ │ │ │ │ ├── JainMgcpStackImpl.java │ │ │ │ │ └── JainMgcpStackProviderImpl.java │ │ │ │ │ └── utils │ │ │ │ │ ├── PacketRepresentation.java │ │ │ │ │ └── PacketRepresentationFactory.java │ │ │ └── resources │ │ │ │ └── org │ │ │ │ └── mobicents │ │ │ │ └── mgcp │ │ │ │ └── stack │ │ │ │ └── mgcp-stack.properties │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── restcomm │ │ │ │ └── media │ │ │ │ └── client │ │ │ │ └── mgcp │ │ │ │ └── test │ │ │ │ ├── MessageFlowHarness.java │ │ │ │ ├── MessageHandlerTest.java │ │ │ │ ├── TestHarness.java │ │ │ │ ├── auditconnection │ │ │ │ ├── AuditConnectionTest.java │ │ │ │ ├── CA.java │ │ │ │ └── MGW.java │ │ │ │ ├── auditendpoint │ │ │ │ ├── AuditEndpointTest.java │ │ │ │ ├── CA.java │ │ │ │ └── MGW.java │ │ │ │ ├── commandparsing │ │ │ │ ├── CommandParseTest.java │ │ │ │ └── TestJainMgcpStackImpl.java │ │ │ │ ├── concurrency │ │ │ │ ├── CA.java │ │ │ │ ├── MGW.java │ │ │ │ └── build.xml │ │ │ │ ├── createconnection │ │ │ │ ├── CA.java │ │ │ │ ├── CreateConnectionTest.java │ │ │ │ ├── CreateConnectionWithTwoEndpointsTest.java │ │ │ │ └── MGW.java │ │ │ │ ├── deleteconnection │ │ │ │ ├── CA.java │ │ │ │ ├── DeleteConnectionTest.java │ │ │ │ └── MGW.java │ │ │ │ ├── endpointconfiguration │ │ │ │ ├── CA.java │ │ │ │ ├── EndpointConfigurationTest.java │ │ │ │ └── MGW.java │ │ │ │ ├── endpointhandler │ │ │ │ ├── CA.java │ │ │ │ ├── MGW.java │ │ │ │ └── SimpleFlowTest.java │ │ │ │ ├── modifyconnection │ │ │ │ ├── CA.java │ │ │ │ ├── MGW.java │ │ │ │ └── ModifyConnectionTest.java │ │ │ │ ├── notificationrequest │ │ │ │ ├── CA.java │ │ │ │ ├── MGW.java │ │ │ │ └── NotificationRequestTest.java │ │ │ │ ├── notify │ │ │ │ ├── CA.java │ │ │ │ ├── MGW.java │ │ │ │ └── NotifyTest.java │ │ │ │ ├── parser │ │ │ │ └── ParserTest.java │ │ │ │ ├── profiler │ │ │ │ ├── CRCXCA.java │ │ │ │ ├── CRCXMGW.java │ │ │ │ └── README.txt │ │ │ │ ├── restartinprogress │ │ │ │ ├── CA.java │ │ │ │ ├── MGW.java │ │ │ │ └── RestartInProgressTest.java │ │ │ │ └── transactionretransmisson │ │ │ │ ├── CA.java │ │ │ │ ├── MGW.java │ │ │ │ └── TxRetransmissionTest.java │ │ │ └── resources │ │ │ ├── log4j2.properties │ │ │ └── test.properties │ ├── pom.xml │ └── tck │ │ ├── README.txt │ │ └── pom.xml └── pom.xml ├── codec ├── g711 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── restcomm │ │ │ │ └── media │ │ │ │ └── core │ │ │ │ └── codec │ │ │ │ └── g711 │ │ │ │ ├── alaw │ │ │ │ ├── Decoder.java │ │ │ │ ├── Encoder.java │ │ │ │ └── EncoderData.java │ │ │ │ └── ulaw │ │ │ │ ├── Decoder.java │ │ │ │ ├── Encoder.java │ │ │ │ └── EncoderData.java │ │ └── resources │ │ │ └── speech.properties │ │ └── test │ │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── codec │ │ └── g711 │ │ ├── alaw │ │ └── AlawCodecTest.java │ │ └── ulaw │ │ └── UlawCodecTest.java ├── g729 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── codec │ │ └── g729 │ │ ├── ArrayUtils.java │ │ ├── Bits.java │ │ ├── CelpCo.java │ │ ├── CircularBuffer.java │ │ ├── CodLD8K.java │ │ ├── CorFunc.java │ │ ├── DecAcelp.java │ │ ├── DecGain.java │ │ ├── DecLD8K.java │ │ ├── DecLag.java │ │ ├── Decoder.java │ │ ├── Encoder.java │ │ ├── Filter.java │ │ ├── FloatPointer.java │ │ ├── GainPred.java │ │ ├── GenericPointer.java │ │ ├── IntegerPointer.java │ │ ├── LD8KConstants.java │ │ ├── Lpc.java │ │ ├── LpcFunc.java │ │ ├── LspDec.java │ │ ├── LspGetq.java │ │ ├── PParity.java │ │ ├── Pitch.java │ │ ├── PostFil.java │ │ ├── PostPro.java │ │ ├── PreProc.java │ │ ├── PredLt.java │ │ ├── Pwf.java │ │ ├── QuaGain.java │ │ ├── QuaLsp.java │ │ ├── TabLD8k.java │ │ ├── Taming.java │ │ └── Util.java ├── gsm │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── codec │ │ │ └── gsm │ │ │ ├── BasicFunctions.java │ │ │ ├── Decoder.java │ │ │ └── Encoder.java │ │ └── test │ │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── codec │ │ └── gsm │ │ └── BasicFunctionsTest.java ├── ilbc │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── codec │ │ │ └── ilbc │ │ │ ├── BasicFunctions.java │ │ │ ├── CbSearchData.java │ │ │ ├── CbUpdateIndexData.java │ │ │ ├── CodingFunctions.java │ │ │ ├── Constants.java │ │ │ ├── CorrData.java │ │ │ ├── Decoder.java │ │ │ ├── DecoderState.java │ │ │ ├── Encoder.java │ │ │ ├── EncoderBits.java │ │ │ └── EncoderState.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── codec │ │ │ └── ilbc │ │ │ └── CodecTest.java │ │ └── resources │ │ ├── iLBC.INP │ │ ├── iLBC_20ms.BIT │ │ ├── iLBC_20ms_clean.OUT │ │ ├── iLBC_20ms_tlm05.OUT │ │ └── iLBC_Fix.enc ├── l16 │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── codec │ │ └── l16 │ │ ├── Decoder.java │ │ └── Encoder.java ├── opus │ ├── opus-java │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── restcomm │ │ │ │ └── media │ │ │ │ └── core │ │ │ │ └── codec │ │ │ │ └── opus │ │ │ │ ├── Decoder.java │ │ │ │ ├── Encoder.java │ │ │ │ └── OpusJni.java │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── restcomm │ │ │ │ └── media │ │ │ │ └── core │ │ │ │ └── codec │ │ │ │ └── opus │ │ │ │ └── OpusCodecTest.java │ │ │ └── resources │ │ │ └── test_sound_mono_48.pcm │ ├── opus-native │ │ ├── README.md │ │ ├── linux │ │ │ └── pom.xml │ │ ├── macos │ │ │ └── pom.xml │ │ ├── pom.xml │ │ └── src │ │ │ └── opus_jni.cpp │ └── pom.xml └── pom.xml ├── component ├── .gitignore ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── component │ │ ├── AbstractSink.java │ │ ├── AbstractSource.java │ │ ├── BaseComponent.java │ │ ├── audio │ │ ├── AudioComponent.java │ │ ├── AudioInput.java │ │ ├── AudioMixer.java │ │ ├── AudioOutput.java │ │ ├── AudioSplitter.java │ │ ├── Complex.java │ │ ├── FFT.java │ │ ├── GoertzelFilter.java │ │ ├── Resampler.java │ │ ├── Sine.java │ │ ├── SoundCard.java │ │ └── SpectraAnalyzer.java │ │ ├── dsp │ │ ├── Dsp.java │ │ └── DspFactoryImpl.java │ │ └── oob │ │ ├── OOBComponent.java │ │ ├── OOBInput.java │ │ ├── OOBMixer.java │ │ ├── OOBOutput.java │ │ └── OOBSplitter.java │ └── test │ └── java │ └── org │ └── restcomm │ └── media │ └── core │ └── component │ ├── AbstractComponentTest.java │ ├── AbstractSourceTest.java │ ├── audio │ ├── AudioMixerTest.java │ ├── AudioSplitterTest.java │ ├── FFTTest.java │ ├── ResamplerTest.java │ ├── SineTest.java │ └── SoundCardTest.java │ ├── dsp │ └── DspFactoryTest.java │ └── oob │ ├── OOBMixerTest.java │ ├── OOBReceiver.java │ ├── OOBSender.java │ └── OOBSplitterTest.java ├── concurrent ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── concurrent │ │ ├── ConcurrentCyclicFIFO.java │ │ ├── ConcurrentMap.java │ │ └── Lock.java │ └── test │ └── java │ └── org │ └── restcomm │ └── media │ └── core │ └── concurrent │ └── ConcurrentCyclicFIFOTest.java ├── control ├── mgcp │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── assemble │ │ │ └── descriptor.xml │ │ ├── config │ │ │ └── META-INF │ │ │ │ ├── jboss-beans.xml │ │ │ │ └── jboss-structure.xml │ │ └── java │ │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── control │ │ │ └── mgcp │ │ │ ├── call │ │ │ ├── GlobalMgcpCallManager.java │ │ │ ├── MgcpCall.java │ │ │ └── MgcpCallManager.java │ │ │ ├── command │ │ │ ├── AbstractMgcpCommand.java │ │ │ ├── AuditConnectionCommand.java │ │ │ ├── AuditEndpointCommand.java │ │ │ ├── CrcxContext.java │ │ │ ├── CreateConnectionCommand.java │ │ │ ├── DeleteConnectionCommand.java │ │ │ ├── MgcpCommand.java │ │ │ ├── MgcpCommandException.java │ │ │ ├── MgcpCommandParameterType.java │ │ │ ├── MgcpCommandProvider.java │ │ │ ├── MgcpCommandResult.java │ │ │ ├── ModifyConnectionCommand.java │ │ │ ├── NotificationRequest.java │ │ │ ├── RequestNotificationCommand.java │ │ │ └── param │ │ │ │ └── NotifiedEntity.java │ │ │ ├── connection │ │ │ ├── AbstractMgcpConnection.java │ │ │ ├── MgcpConnection.java │ │ │ ├── MgcpConnectionProvider.java │ │ │ ├── MgcpConnectionState.java │ │ │ ├── MgcpLocalConnection.java │ │ │ └── MgcpRemoteConnection.java │ │ │ ├── controller │ │ │ ├── MgcpController.java │ │ │ └── fsm │ │ │ │ ├── MgcpControllerEvent.java │ │ │ │ ├── MgcpControllerFsm.java │ │ │ │ ├── MgcpControllerFsmBuilder.java │ │ │ │ ├── MgcpControllerFsmImpl.java │ │ │ │ ├── MgcpControllerGlobalContext.java │ │ │ │ ├── MgcpControllerState.java │ │ │ │ ├── action │ │ │ │ ├── BindChannelAction.java │ │ │ │ ├── CloseChannelAction.java │ │ │ │ └── OpenChannelAction.java │ │ │ │ └── transition │ │ │ │ ├── BindChannelContext.java │ │ │ │ └── MgcpControllerTransitionContext.java │ │ │ ├── endpoint │ │ │ ├── EndpointIdentifier.java │ │ │ ├── EndpointIdentifierParser.java │ │ │ ├── GenericMgcpEndpoint.java │ │ │ ├── MalformedMgcpEndpointIdentifier.java │ │ │ ├── MediaGroup.java │ │ │ ├── MediaGroupImpl.java │ │ │ ├── MgcpEndpoint.java │ │ │ ├── MgcpEndpointManager.java │ │ │ ├── MgcpEndpointObserver.java │ │ │ ├── MgcpEndpointState.java │ │ │ ├── MgcpEndpointSubject.java │ │ │ ├── MgcpMixerEndpoint.java │ │ │ ├── MgcpSplitterEndpoint.java │ │ │ └── provider │ │ │ │ ├── AbstractMgcpEndpointProvider.java │ │ │ │ ├── MediaGroupProvider.java │ │ │ │ ├── MgcpEndpointProvider.java │ │ │ │ ├── MgcpMixerEndpointProvider.java │ │ │ │ └── MgcpSplitterEndpointProvider.java │ │ │ ├── exception │ │ │ ├── AbstractSubMgcpEventProvider.java │ │ │ ├── DuplicateMgcpEndpointException.java │ │ │ ├── DuplicateMgcpTransactionException.java │ │ │ ├── MalformedMgcpEventRequestException.java │ │ │ ├── MgcpCallNotFoundException.java │ │ │ ├── MgcpChannelException.java │ │ │ ├── MgcpConnectionException.java │ │ │ ├── MgcpConnectionNotFoundException.java │ │ │ ├── MgcpEndpointException.java │ │ │ ├── MgcpEndpointNotFoundException.java │ │ │ ├── MgcpEventNotFoundException.java │ │ │ ├── MgcpException.java │ │ │ ├── MgcpPackageNotFoundException.java │ │ │ ├── MgcpParseException.java │ │ │ ├── MgcpTransactionException.java │ │ │ ├── MgcpTransactionNotFoundException.java │ │ │ ├── UnrecognizedMgcpNamespaceException.java │ │ │ └── UnsupportedMgcpEventException.java │ │ │ ├── message │ │ │ ├── LocalConnectionOptionType.java │ │ │ ├── LocalConnectionOptions.java │ │ │ ├── LocalConnectionOptionsParser.java │ │ │ ├── MessageDirection.java │ │ │ ├── MgcpMessage.java │ │ │ ├── MgcpMessageObserver.java │ │ │ ├── MgcpMessageParser.java │ │ │ ├── MgcpMessageSubject.java │ │ │ ├── MgcpParameter.java │ │ │ ├── MgcpParameterType.java │ │ │ ├── MgcpRequest.java │ │ │ ├── MgcpRequestType.java │ │ │ ├── MgcpResponse.java │ │ │ └── MgcpResponseCode.java │ │ │ ├── network │ │ │ ├── netty │ │ │ │ ├── AsyncMgcpChannel.java │ │ │ │ ├── MgcpChannelInboundHandler.java │ │ │ │ ├── MgcpChannelInitializer.java │ │ │ │ ├── MgcpMessageDecoder.java │ │ │ │ ├── MgcpMessageEncoder.java │ │ │ │ ├── MgcpMessageEnvelope.java │ │ │ │ └── MgcpNetworkManager.java │ │ │ └── nio │ │ │ │ ├── MgcpChannel.java │ │ │ │ └── MgcpPacketHandler.java │ │ │ ├── pkg │ │ │ ├── AbstractMgcpSignal.java │ │ │ ├── DynamicMgcpPackageManager.java │ │ │ ├── GenericMgcpEvent.java │ │ │ ├── GlobalMgcpEventProvider.java │ │ │ ├── MgcpActionType.java │ │ │ ├── MgcpEvent.java │ │ │ ├── MgcpEventObserver.java │ │ │ ├── MgcpEventParser.java │ │ │ ├── MgcpEventProvider.java │ │ │ ├── MgcpEventSubject.java │ │ │ ├── MgcpEventType.java │ │ │ ├── MgcpPackage.java │ │ │ ├── MgcpPackageManager.java │ │ │ ├── MgcpRequestedEvent.java │ │ │ ├── MgcpRequestedEventsParser.java │ │ │ ├── MgcpSignal.java │ │ │ ├── MgcpSignalProvider.java │ │ │ ├── NotifiedEntityParser.java │ │ │ ├── SignalRequest.java │ │ │ ├── SignalType.java │ │ │ ├── SignalsRequestParser.java │ │ │ ├── au │ │ │ │ ├── AdvancedAudioEventType.java │ │ │ │ ├── AudioPackage.java │ │ │ │ ├── AudioSignalType.java │ │ │ │ ├── EndSignal.java │ │ │ │ ├── OperationComplete.java │ │ │ │ ├── OperationFailed.java │ │ │ │ ├── PlayAnnouncement.java │ │ │ │ ├── Playlist.java │ │ │ │ ├── ReturnCode.java │ │ │ │ ├── ReturnParameters.java │ │ │ │ ├── SignalParameters.java │ │ │ │ ├── asr │ │ │ │ │ ├── AsrContext.java │ │ │ │ │ ├── AsrEvent.java │ │ │ │ │ ├── AsrFsm.java │ │ │ │ │ ├── AsrFsmBuilder.java │ │ │ │ │ ├── AsrFsmImpl.java │ │ │ │ │ ├── AsrSignal.java │ │ │ │ │ └── AsrState.java │ │ │ │ ├── pc │ │ │ │ │ ├── PlayCollect.java │ │ │ │ │ ├── PlayCollectContext.java │ │ │ │ │ ├── PlayCollectEvent.java │ │ │ │ │ ├── PlayCollectFsm.java │ │ │ │ │ ├── PlayCollectFsmBuilder.java │ │ │ │ │ ├── PlayCollectFsmImpl.java │ │ │ │ │ └── PlayCollectState.java │ │ │ │ └── pr │ │ │ │ │ ├── LoadPlaylistAction.java │ │ │ │ │ ├── PlayRecord.java │ │ │ │ │ ├── PlayRecordContext.java │ │ │ │ │ ├── PlayRecordEvent.java │ │ │ │ │ ├── PlayRecordFsm.java │ │ │ │ │ ├── PlayRecordFsmBuilder.java │ │ │ │ │ ├── PlayRecordFsmImpl.java │ │ │ │ │ └── PlayRecordState.java │ │ │ ├── exception │ │ │ │ ├── UnrecognizedMgcpActionException.java │ │ │ │ ├── UnrecognizedMgcpEventException.java │ │ │ │ ├── UnrecognizedMgcpPackageException.java │ │ │ │ └── UnsupportedMgcpSignalException.java │ │ │ └── r │ │ │ │ ├── RtpEventProvider.java │ │ │ │ ├── RtpEventType.java │ │ │ │ ├── RtpPackage.java │ │ │ │ └── rto │ │ │ │ ├── RtpTimeoutEvent.java │ │ │ │ ├── RtpTimeoutEventParser.java │ │ │ │ └── RtpTimeoutStartTime.java │ │ │ ├── transaction │ │ │ ├── GlobalMgcpTransactionManager.java │ │ │ ├── MgcpTransaction.java │ │ │ ├── MgcpTransactionManager.java │ │ │ ├── MgcpTransactionManagerProvider.java │ │ │ ├── MgcpTransactionNumberspace.java │ │ │ ├── MgcpTransactionState.java │ │ │ ├── SubMgcpTransactionManager.java │ │ │ └── SubMgcpTransactionManagerProvider.java │ │ │ └── util │ │ │ └── collections │ │ │ ├── Parameters.java │ │ │ └── ValueTransformers.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── control │ │ │ └── mgcp │ │ │ ├── call │ │ │ ├── GlobalMgcpCallManagerTest.java │ │ │ └── MgcpCallTest.java │ │ │ ├── command │ │ │ ├── CreateConnectionCommandTest.java │ │ │ ├── DeleteConnectionCommandTest.java │ │ │ ├── MgcpCommandProviderTest.java │ │ │ ├── ModifyConnectionCommandTest.java │ │ │ ├── RequestNotificationCommandTest.java │ │ │ └── param │ │ │ │ └── NotifiedEntityParserTest.java │ │ │ ├── connection │ │ │ ├── MgcpLocalConnectionTest.java │ │ │ └── MgcpRemoteConnectionTest.java │ │ │ ├── endpoint │ │ │ ├── GenericMgcpEndpointTest.java │ │ │ ├── MgcpEndpointManagerTest.java │ │ │ ├── MgcpMixerEndpointTest.java │ │ │ ├── MgcpSplitterEndpointProviderTest.java │ │ │ ├── MgcpSplitterEndpointTest.java │ │ │ └── MixerEndpointProviderTest.java │ │ │ ├── message │ │ │ ├── LocalConnectionOptionsParserTest.java │ │ │ └── MgcpMessageParserTest.java │ │ │ ├── network │ │ │ └── nio │ │ │ │ ├── MgcpChannelTest.java │ │ │ │ └── MgcpPacketHandlerTest.java │ │ │ ├── pkg │ │ │ ├── MgcpRequestedEventsParserTest.java │ │ │ ├── SignalsRequestParserTest.java │ │ │ ├── au │ │ │ │ ├── PlayAnnouncementTest.java │ │ │ │ ├── PlaylistTest.java │ │ │ │ ├── asr │ │ │ │ │ ├── AsrSignalBaseTest.java │ │ │ │ │ ├── AsrSignalDtmfSpeechTest.java │ │ │ │ │ └── AsrSignalSpeechTest.java │ │ │ │ ├── pc │ │ │ │ │ └── PlayCollectTest.java │ │ │ │ └── pr │ │ │ │ │ └── PlayRecordTest.java │ │ │ └── r │ │ │ │ ├── RtpEventProviderTest.java │ │ │ │ └── rto │ │ │ │ └── RtpTimeoutEventParserTest.java │ │ │ └── transaction │ │ │ ├── GlobalMgcpTransactionManagerTest.java │ │ │ ├── MgcpControllerTest.java │ │ │ ├── MgcpTransactionNumberspaceTest.java │ │ │ └── SubMgcpTransactionManagerTest.java │ │ └── resources │ │ ├── log4j2.properties │ │ ├── mgcp-conf.xml │ │ └── sdp │ │ └── basic-sdp.txt └── pom.xml ├── driver ├── asr-driver │ ├── asr-driver-api │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── drivers │ │ │ └── asr │ │ │ ├── AsrDriver.java │ │ │ ├── AsrDriverConfigurationException.java │ │ │ ├── AsrDriverEventListener.java │ │ │ ├── AsrDriverException.java │ │ │ ├── AsrDriverManager.java │ │ │ └── UnknownAsrDriverException.java │ └── pom.xml └── pom.xml ├── ice ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── ice │ │ ├── CandidatePair.java │ │ ├── CandidateType.java │ │ ├── CandidateWrapper.java │ │ ├── FoundationsRegistry.java │ │ ├── HostCandidate.java │ │ ├── IceAgent.java │ │ ├── IceAuthenticator.java │ │ ├── IceAuthenticatorImpl.java │ │ ├── IceCandidate.java │ │ ├── IceComponent.java │ │ ├── IceException.java │ │ ├── IceFactory.java │ │ ├── IceHandler.java │ │ ├── IceMediaStream.java │ │ ├── LocalCandidateWrapper.java │ │ ├── ServerReflexiveCandidate.java │ │ ├── events │ │ ├── IceEventListener.java │ │ └── SelectedCandidatesEvent.java │ │ ├── harvest │ │ ├── CandidateHarvester.java │ │ ├── ExternalCandidateHarvester.java │ │ ├── HarvestException.java │ │ ├── HarvestManager.java │ │ ├── HostCandidateHarvester.java │ │ └── NoCandidatesGatheredException.java │ │ ├── lite │ │ ├── IceLiteAgent.java │ │ └── LiteFoundationsRegistry.java │ │ └── network │ │ ├── ProtocolHandler.java │ │ ├── nio │ │ ├── EventScheduler.java │ │ ├── NioServer.java │ │ ├── OperationRequest.java │ │ └── ScheduledEvent.java │ │ └── stun │ │ ├── BindingSuccessEvent.java │ │ ├── ConnectivityCheckServer.java │ │ ├── StunHandler.java │ │ └── StunListener.java │ └── test │ ├── java │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── ice │ │ ├── ExternalCandidateHarvesterTest.java │ │ ├── HostCandidateHarvesterTest.java │ │ ├── HostCandidateTest.java │ │ ├── IceAuthenticatorImplTest.java │ │ ├── IceComponentTest.java │ │ ├── IceHandlerUsernameTest.java │ │ ├── IceMediaStreamTest.java │ │ └── lite │ │ └── LiteFoundationRegistryTest.java │ └── resources │ └── org │ └── restcomm │ └── media │ └── core │ └── ice │ └── sdp │ └── sdp_vanilla_answer.txt ├── logo.svg ├── network ├── .gitignore ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── network │ │ ├── api │ │ ├── AsynchronousNetworkChannel.java │ │ ├── AsynchronousNetworkManager.java │ │ ├── NetworkChannel.java │ │ ├── SynchronousNetworkChannel.java │ │ └── SynchronousNetworkManager.java │ │ ├── deprecated │ │ ├── IPAddressCompare.java │ │ ├── IPAddressType.java │ │ ├── PortManager.java │ │ ├── ProtocolHandler.java │ │ ├── RtpPortManager.java │ │ ├── TransportAddress.java │ │ ├── UdpManager.java │ │ ├── channel │ │ │ ├── AbstractNetworkChannel.java │ │ │ ├── Channel.java │ │ │ ├── DirectNetworkGuard.java │ │ │ ├── MultiplexedChannel.java │ │ │ ├── MultiplexedNetworkChannel.java │ │ │ ├── NetworkChannel.java │ │ │ ├── NetworkGuard.java │ │ │ ├── PacketHandler.java │ │ │ ├── PacketHandlerException.java │ │ │ ├── PacketHandlerPipeline.java │ │ │ ├── RestrictedNetworkGuard.java │ │ │ └── SbcNetworkGuard.java │ │ ├── netty │ │ │ ├── NetworkChannel.java │ │ │ ├── NetworkManager.java │ │ │ └── UdpNetworkManager.java │ │ └── server │ │ │ └── NioServer.java │ │ └── netty │ │ ├── NettyNetworkManager.java │ │ ├── channel │ │ ├── AbstractNettyNetworkChannelFsm.java │ │ ├── AsyncNettyNetworkChannel.java │ │ ├── AsyncNettyNetworkChannelFsm.java │ │ ├── NettyNetworkChannelEvent.java │ │ ├── NettyNetworkChannelFsm.java │ │ ├── NettyNetworkChannelFsmBuilder.java │ │ ├── NettyNetworkChannelFsmListener.java │ │ ├── NettyNetworkChannelGlobalContext.java │ │ ├── NettyNetworkChannelState.java │ │ └── NettyNetworkChannelTransitionContext.java │ │ ├── filter │ │ ├── DirectNetworkGuard.java │ │ ├── LocalNetworkGuard.java │ │ ├── NetworkGuard.java │ │ └── SbcNetworkGuard.java │ │ └── handler │ │ └── NetworkFilter.java │ └── test │ ├── java │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── network │ │ ├── deprecated │ │ ├── RtpPortManagerTest.java │ │ ├── UdpPeripheryTest.java │ │ ├── channel │ │ │ ├── DirectNetworkGuardTest.java │ │ │ ├── HighPriorityPacketHandlerMock.java │ │ │ ├── LowPriorityPacketHandlerMock.java │ │ │ ├── MediumPriorityPacketHandlerMock.java │ │ │ ├── MultiplexedChannelTest.java │ │ │ ├── PacketHandlerMock.java │ │ │ ├── PacketHandlerPipelineTest.java │ │ │ ├── RestrictedMultiplexedNetworkChannelTest.java │ │ │ ├── RestrictedNetworkGuardTest.java │ │ │ └── SbcNetworkGuardTest.java │ │ └── netty │ │ │ └── UdpNetworkManagerTest.java │ │ └── netty │ │ ├── NettyNetworkManagerTest.java │ │ ├── channel │ │ ├── AsyncNettyNetworkChannelFsmTest.java │ │ └── AsyncNettyNetworkChannelTest.java │ │ └── filter │ │ ├── DirectNetworkGuardTest.java │ │ ├── LocalNetworkGuardTest.java │ │ └── SbcNetworkGuardTest.java │ └── resources │ └── log4j2.properties ├── pcap ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── pcap │ │ ├── AsyncPcapChannel.java │ │ ├── AsyncPcapChannelHandler.java │ │ ├── GenericPcapReader.java │ │ ├── PcapFile.java │ │ ├── PcapPacketEncoder.java │ │ ├── PcapPlayer.java │ │ └── PcapPlayerContext.java │ └── test │ ├── java │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── pcap │ │ └── PcapPlayerTest.java │ └── resources │ ├── log4j2.properties │ └── pcap │ ├── dtmf-oob-one-hash.cap.gz │ ├── dtmf-oob-two-hash.cap.gz │ └── gigaset-n510-ip-pro-rfc2833.pcap ├── pom.xml ├── resource ├── dtmf │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── restcomm │ │ │ │ └── media │ │ │ │ └── core │ │ │ │ └── resource │ │ │ │ └── dtmf │ │ │ │ ├── DetectorImpl.java │ │ │ │ ├── DetectorProvider.java │ │ │ │ ├── DtmfBuffer.java │ │ │ │ ├── DtmfEventImpl.java │ │ │ │ ├── GeneratorImpl.java │ │ │ │ ├── detector │ │ │ │ ├── AbstractDtmfDetector.java │ │ │ │ ├── AbstractDtmfSink.java │ │ │ │ ├── DtmfDetector.java │ │ │ │ ├── DtmfDetectorProvider.java │ │ │ │ ├── DtmfEvent.java │ │ │ │ ├── DtmfEventObserver.java │ │ │ │ ├── DtmfEventSubject.java │ │ │ │ ├── DtmfSinkFacade.java │ │ │ │ ├── DtmfSinkFacadeProvider.java │ │ │ │ ├── InbandDtmfSink.java │ │ │ │ ├── Rfc2833DtmfDetector.java │ │ │ │ └── Rfc2833DtmfSink.java │ │ │ │ └── util │ │ │ │ └── NtpTimeStampUtil.java │ │ └── resources │ │ │ └── speech.properties │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── resource │ │ │ └── dtmf │ │ │ ├── DtmfBufferingTest.java │ │ │ ├── DtmfGenerationTest.java │ │ │ ├── DtmfTest.java │ │ │ └── Rfc2833DtmfDetectorTest.java │ │ └── resources │ │ ├── dtmf_rfc2833_2_digit_pairs.pcap │ │ ├── dtmf_rfc2833_4_digits_fast.pcap │ │ ├── dtmf_rfc2833_4_digits_slow.pcap │ │ └── log4j2.properties ├── media-player │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── restcomm │ │ │ │ └── media │ │ │ │ └── core │ │ │ │ └── resource │ │ │ │ └── player │ │ │ │ ├── Track.java │ │ │ │ ├── audio │ │ │ │ ├── AudioPlayerEvent.java │ │ │ │ ├── AudioPlayerImpl.java │ │ │ │ ├── AudioPlayerProvider.java │ │ │ │ ├── CachedRemoteStreamProvider.java │ │ │ │ ├── DirectRemoteStreamProvider.java │ │ │ │ ├── Extension.java │ │ │ │ ├── RemoteStreamProvider.java │ │ │ │ ├── gsm │ │ │ │ │ └── GsmTrackImpl.java │ │ │ │ ├── mpeg │ │ │ │ │ └── AMRTrackImpl.java │ │ │ │ ├── tone │ │ │ │ │ └── ToneTrackImpl.java │ │ │ │ ├── tts │ │ │ │ │ ├── AlanVoiceFactory.java │ │ │ │ │ ├── KevinVoiceFactory.java │ │ │ │ │ ├── MbrolaVoiceFactory.java │ │ │ │ │ ├── TtsTrackImpl.java │ │ │ │ │ ├── VoiceFactory.java │ │ │ │ │ ├── VoiceManager.java │ │ │ │ │ └── VoicesCache.java │ │ │ │ └── wav │ │ │ │ │ └── WavTrackImpl.java │ │ │ │ └── video │ │ │ │ └── mpeg │ │ │ │ ├── AMRSampleEntry.java │ │ │ │ ├── AMRWidebandSampleEntry.java │ │ │ │ ├── AVSdpContainer.java │ │ │ │ ├── AmrSpecificBox.java │ │ │ │ ├── AsciiTable.java │ │ │ │ ├── AudioSampleEntry.java │ │ │ │ ├── AudioTrack.java │ │ │ │ ├── Box.java │ │ │ │ ├── CdscTrackReferenceTypeBox.java │ │ │ │ ├── ChunkLargeOffsetBox.java │ │ │ │ ├── ChunkOffsetBox.java │ │ │ │ ├── CleanApertureBox.java │ │ │ │ ├── CompositionOffsetBox.java │ │ │ │ ├── CopyrightBox.java │ │ │ │ ├── DataEntryUrlBox.java │ │ │ │ ├── DataEntryUrnBox.java │ │ │ │ ├── DataInformationBox.java │ │ │ │ ├── DataReferenceBox.java │ │ │ │ ├── ESDBox.java │ │ │ │ ├── EditBox.java │ │ │ │ ├── EditListBox.java │ │ │ │ ├── FileTypeBox.java │ │ │ │ ├── FreeSpaceBox.java │ │ │ │ ├── FullBox.java │ │ │ │ ├── HandlerReferenceBox.java │ │ │ │ ├── HintMediaHeaderBox.java │ │ │ │ ├── HintTrackReferenceTypeBox.java │ │ │ │ ├── MP4AudioSampleEntry.java │ │ │ │ ├── MediaBox.java │ │ │ │ ├── MediaDataBox.java │ │ │ │ ├── MediaHeaderBox.java │ │ │ │ ├── MediaInformationBox.java │ │ │ │ ├── MovieBox.java │ │ │ │ ├── MovieHeaderBox.java │ │ │ │ ├── MovieHintInformation.java │ │ │ │ ├── MpegPresentation.java │ │ │ │ ├── NullMediaHeaderBox.java │ │ │ │ ├── PixelAspectRatioBox.java │ │ │ │ ├── RTPConstructor.java │ │ │ │ ├── RTPImmediateConstructor.java │ │ │ │ ├── RTPLocalPacket.java │ │ │ │ ├── RTPMovieHintInformation.java │ │ │ │ ├── RTPNoOpConstructor.java │ │ │ │ ├── RTPSample.java │ │ │ │ ├── RTPSampleConstructor.java │ │ │ │ ├── RTPSampleDescriptionConstructor.java │ │ │ │ ├── RTPTrack.java │ │ │ │ ├── RTPTrackSdpHintInformation.java │ │ │ │ ├── RtpHintSampleEntry.java │ │ │ │ ├── SampleDescriptionBox.java │ │ │ │ ├── SampleEntry.java │ │ │ │ ├── SampleSizeBox.java │ │ │ │ ├── SampleTableBox.java │ │ │ │ ├── SampleToChunkBox.java │ │ │ │ ├── SequenceOffSet.java │ │ │ │ ├── SoundMediaHeaderBox.java │ │ │ │ ├── SyncSampleBox.java │ │ │ │ ├── TestRead.java │ │ │ │ ├── TimeOffSet.java │ │ │ │ ├── TimeScaleEntry.java │ │ │ │ ├── TimeToSampleBox.java │ │ │ │ ├── TrackBox.java │ │ │ │ ├── TrackHeaderBox.java │ │ │ │ ├── TrackHintInformation.java │ │ │ │ ├── TrackReferenceBox.java │ │ │ │ ├── TrackReferenceTypeBox.java │ │ │ │ ├── UndefinedBox.java │ │ │ │ ├── UserDataBox.java │ │ │ │ ├── VideoMediaHeaderBox.java │ │ │ │ ├── VideoTrack.java │ │ │ │ └── VisualSampleEntry.java │ │ └── resources │ │ │ └── speech.properties │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── restcomm │ │ │ └── media │ │ │ └── core │ │ │ └── resource │ │ │ └── player │ │ │ ├── MediaPlayerImplTest.java │ │ │ └── audio │ │ │ ├── gsm │ │ │ └── GsmTrackImplTest.java │ │ │ ├── tone │ │ │ └── ToneTrackImplTest.java │ │ │ ├── tts │ │ │ └── TtsTrackImplTest.java │ │ │ └── wav │ │ │ ├── WavTrackCacheTest.java │ │ │ └── WavTrackImplTest.java │ │ └── resources │ │ ├── demo-prompt.wav │ │ ├── log4j2.properties │ │ └── org │ │ └── mobicents │ │ └── media │ │ └── server │ │ └── impl │ │ └── resource │ │ └── ss7 │ │ ├── Mtp3TwoLinksContainerLocalLoadTest.xml │ │ └── Mtp3TwoLinksContainerMessageLocalTest.xml ├── media-recorder │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── restcomm │ │ │ │ └── media │ │ │ │ └── core │ │ │ │ └── resource │ │ │ │ └── recorder │ │ │ │ └── audio │ │ │ │ ├── AudioRecorderImpl.java │ │ │ │ ├── AudioRecorderProvider.java │ │ │ │ ├── RecorderEventImpl.java │ │ │ │ └── RecorderFileSink.java │ │ └── resources │ │ │ └── speech.properties │ │ └── test │ │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── resource │ │ └── recorder │ │ └── audio │ │ └── AudioRecorderImplTest.java ├── pom.xml └── vad │ ├── .gitignore │ ├── pom.xml │ └── src │ └── main │ └── java │ └── org │ └── restcomm │ └── media │ └── core │ └── resource │ └── vad │ ├── VoiceActivityDetector.java │ ├── VoiceActivityDetectorListener.java │ └── VoiceActivityDetectorProvider.java ├── rtp ├── .gitignore ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ ├── rtcp │ │ ├── RtcpAppDefined.java │ │ ├── RtcpBye.java │ │ ├── RtcpChannel.java │ │ ├── RtcpHandler.java │ │ ├── RtcpHeader.java │ │ ├── RtcpIntervalCalculator.java │ │ ├── RtcpPacket.java │ │ ├── RtcpPacketFactory.java │ │ ├── RtcpPacketType.java │ │ ├── RtcpReceiverReport.java │ │ ├── RtcpReport.java │ │ ├── RtcpReportBlock.java │ │ ├── RtcpSdes.java │ │ ├── RtcpSdesChunk.java │ │ ├── RtcpSdesItem.java │ │ ├── RtcpSenderReport.java │ │ ├── XSRandom.java │ │ └── ntp │ │ │ └── NtpUtils.java │ │ └── rtp │ │ ├── BufferListener.java │ │ ├── ChannelsManager.java │ │ ├── CnameGenerator.java │ │ ├── LocalDataChannel.java │ │ ├── LoggingDatagramTransport.java │ │ ├── MockWallClock.java │ │ ├── RTPChannelListener.java │ │ ├── RTPDataChannel.java │ │ ├── RTPInput.java │ │ ├── RTPOutput.java │ │ ├── RtpChannel.java │ │ ├── RtpClock.java │ │ ├── RtpHandler.java │ │ ├── RtpListener.java │ │ ├── RtpPacket.java │ │ ├── RtpTransmitter.java │ │ ├── SsrcGenerator.java │ │ ├── channels │ │ ├── AudioChannel.java │ │ ├── MediaChannel.java │ │ └── MediaChannelProvider.java │ │ ├── crypto │ │ ├── AlgorithmCertificate.java │ │ ├── AsymmetricSRTPTransformer.java │ │ ├── CipherSuite.java │ │ ├── DatagramTransportAdaptor.java │ │ ├── DtlsSrtpServer.java │ │ ├── DtlsSrtpServerProvider.java │ │ ├── PacketTransformer.java │ │ ├── RawPacket.java │ │ ├── SRTCPCryptoContext.java │ │ ├── SRTCPTransformer.java │ │ ├── SRTPCipherCTR.java │ │ ├── SRTPCipherF8.java │ │ ├── SRTPCryptoContext.java │ │ ├── SRTPParameters.java │ │ ├── SRTPPolicy.java │ │ ├── SRTPTransformEngine.java │ │ ├── SRTPTransformer.java │ │ ├── TlsUtils.java │ │ └── TransformEngine.java │ │ ├── jitter │ │ ├── FixedJitterBuffer.java │ │ └── JitterBuffer.java │ │ ├── netty │ │ ├── AbstractRtpInboundHandlerFsm.java │ │ ├── RtpDemultiplexer.java │ │ ├── RtpInboundHandler.java │ │ ├── RtpInboundHandlerEvent.java │ │ ├── RtpInboundHandlerFormatChangedContext.java │ │ ├── RtpInboundHandlerFsm.java │ │ ├── RtpInboundHandlerFsmBuilder.java │ │ ├── RtpInboundHandlerFsmImpl.java │ │ ├── RtpInboundHandlerGlobalContext.java │ │ ├── RtpInboundHandlerPacketReceivedContext.java │ │ ├── RtpInboundHandlerState.java │ │ ├── RtpInboundHandlerTransactionContext.java │ │ ├── RtpInboundHandlerUpdateModeContext.java │ │ ├── RtpPacketFilter.java │ │ ├── SrtpDecoder.java │ │ └── SrtpEncoder.java │ │ ├── rfc2833 │ │ ├── DtmfInput.java │ │ └── DtmfOutput.java │ │ ├── sdp │ │ ├── CandidateField.java │ │ ├── ConnectionField.java │ │ ├── MediaDescriptorField.java │ │ ├── MediaType.java │ │ ├── OriginField.java │ │ ├── RtcpMuxField.java │ │ ├── SdpComparator.java │ │ ├── SdpFactory.java │ │ ├── SessionDescription.java │ │ └── TimeField.java │ │ ├── secure │ │ ├── DtlsHandler.java │ │ ├── DtlsListener.java │ │ ├── DtlsPacket.java │ │ ├── NioUdpTransport.java │ │ └── SrtpPacket.java │ │ └── statistics │ │ ├── RtpMember.java │ │ └── RtpStatistics.java │ └── test │ ├── java │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ ├── rtcp │ │ ├── RtcpAppDefinedTest.java │ │ ├── RtcpByeTest.java │ │ ├── RtcpHandlerTest.java │ │ ├── RtcpIntervalCalculatorTest.java │ │ ├── RtcpPacketTest.java │ │ ├── RtcpReceiverReportTest.java │ │ ├── RtcpReportBlockTest.java │ │ ├── RtcpSdesChunkTest.java │ │ ├── RtcpSdesItemTest.java │ │ ├── RtcpSdesTest.java │ │ ├── RtcpSenderReportTest.java │ │ ├── XSRandomTest.java │ │ └── ntp │ │ │ └── NtpUtilsTest.java │ │ └── rtp │ │ ├── CnameGeneratorTest.java │ │ ├── LocalChannelTest.java │ │ ├── LocalEventTest.java │ │ ├── RTPDataChannelTest.java │ │ ├── RTPEventTest.java │ │ ├── RtpChannelTest.java │ │ ├── RtpClockTest.java │ │ ├── RtpPacketTest.java │ │ ├── SsrcGeneratorTest.java │ │ ├── channels │ │ └── MediaChannelTest.java │ │ ├── crypto │ │ └── SrtpParametersTest.java │ │ ├── jitter │ │ └── FixedJitterBufferTest.java │ │ ├── netty │ │ ├── RtpDemultiplexerTest.java │ │ ├── RtpInboundHandlerFsmTest.java │ │ ├── RtpInboundHandlerTest.java │ │ ├── SrtpDecoderTest.java │ │ └── SrtpEncoderTest.java │ │ ├── rfc2833 │ │ └── DtmfRfc2833Test.java │ │ ├── sdp │ │ ├── AVProfileTest.java │ │ ├── CandidateFieldTest.java │ │ ├── MediaDescriptorTest.java │ │ ├── MediaDescriptorTest2.java │ │ ├── RTPFormatsTest.java │ │ ├── SdpComparatorTest.java │ │ ├── SdpFactoryTest.java │ │ └── SessionDescriptionTest.java │ │ ├── secure │ │ ├── DtlsHandlerTest.java │ │ └── NioUdpTransportTest.java │ │ └── statistics │ │ ├── RtpMemberTest.java │ │ └── RtpStatisticsTest.java │ └── resources │ ├── log4j2.properties │ └── org │ └── restcomm │ └── media │ └── core │ └── rtp │ ├── netty │ ├── dtls-packet.pcap │ ├── mgcp-packet.pcap │ ├── rtcp-packet.pcap │ ├── rtp-packet.pcap │ └── stun-packet.pcap │ └── rfc2833 │ ├── cisco-spa-525G2-zendesk34432.pcap │ ├── dtmf-oob-one-hash.cap.gz │ ├── dtmf-oob-two-hash.cap.gz │ ├── gigaset-n510-ip-pro-rfc2833.pcap │ └── zendesk-34401-rfc2833.pcap ├── scheduler ├── .gitignore ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── restcomm │ └── media │ └── core │ └── scheduler │ ├── Clock.java │ ├── OrderedTaskQueue.java │ ├── PriorityQueueScheduler.java │ ├── Scheduler.java │ ├── ServiceScheduler.java │ ├── Task.java │ ├── TaskChain.java │ ├── TaskChainListener.java │ ├── TaskListener.java │ └── WallClock.java ├── sdp ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── sdp │ │ ├── MediaProfile.java │ │ ├── SdpException.java │ │ ├── SdpField.java │ │ ├── SdpParser.java │ │ ├── SdpParserPipeline.java │ │ ├── SessionDescription.java │ │ ├── SessionDescriptionFactory.java │ │ ├── SessionDescriptionParser.java │ │ ├── SessionLevelAccessor.java │ │ ├── attributes │ │ ├── AbstractConnectionModeAttribute.java │ │ ├── ConnectionModeAttribute.java │ │ ├── FormatParameterAttribute.java │ │ ├── GenericAttribute.java │ │ ├── InactiveAttribute.java │ │ ├── MaxPacketTimeAttribute.java │ │ ├── PacketTimeAttribute.java │ │ ├── RecvOnlyAttribute.java │ │ ├── RtpMapAttribute.java │ │ ├── SendOnlyAttribute.java │ │ ├── SendRecvAttribute.java │ │ ├── SsrcAttribute.java │ │ └── parser │ │ │ ├── ConnectionModeAttributeParser.java │ │ │ ├── FormatParameterAttributeParser.java │ │ │ ├── MaxPacketTimeAttributeParser.java │ │ │ ├── PacketTimeAttributeParser.java │ │ │ ├── RtpMapAttributeParser.java │ │ │ └── SsrcAttributeParser.java │ │ ├── dtls │ │ └── attributes │ │ │ ├── FingerprintAttribute.java │ │ │ ├── SetupAttribute.java │ │ │ └── parser │ │ │ ├── FingerprintAttributeParser.java │ │ │ └── SetupAttributeParser.java │ │ ├── fields │ │ ├── AttributeField.java │ │ ├── ConnectionField.java │ │ ├── MediaDescriptionField.java │ │ ├── OriginField.java │ │ ├── SessionNameField.java │ │ ├── TimingField.java │ │ ├── VersionField.java │ │ └── parser │ │ │ ├── ConnectionFieldParser.java │ │ │ ├── GenericAttributeParser.java │ │ │ ├── MediaDescriptionFieldParser.java │ │ │ ├── OriginFieldParser.java │ │ │ ├── SessionNameFieldParser.java │ │ │ ├── TimingFieldParser.java │ │ │ └── VersionFieldParser.java │ │ ├── format │ │ ├── AVProfile.java │ │ ├── RTPFormat.java │ │ └── RTPFormats.java │ │ ├── ice │ │ └── attributes │ │ │ ├── CandidateAttribute.java │ │ │ ├── IceLiteAttribute.java │ │ │ ├── IcePwdAttribute.java │ │ │ ├── IceUfragAttribute.java │ │ │ └── parser │ │ │ ├── CandidateAttributeParser.java │ │ │ ├── IceLiteAttributeParser.java │ │ │ ├── IcePwdAttributeParser.java │ │ │ └── IceUfragAttributeParser.java │ │ └── rtcp │ │ └── attributes │ │ ├── RtcpAttribute.java │ │ ├── RtcpMuxAttribute.java │ │ └── parser │ │ ├── RtcpAttributeParser.java │ │ └── RtcpMuxAttributeParser.java │ └── test │ ├── java │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── sdp │ │ ├── SessionDescriptionParserTest.java │ │ ├── attributes │ │ ├── FormatAttributeTest.java │ │ ├── MaxPacketTimeAttributeTest.java │ │ ├── PacketTimeAttributeTest.java │ │ ├── RtpMapAttributeTest.java │ │ └── parser │ │ │ ├── ConnectionModeAttributeParserTest.java │ │ │ ├── FormatParameterAttributeParserTest.java │ │ │ ├── MaxPacketTimeAttributeParserTest.java │ │ │ ├── PacketTimeAttributeParserTest.java │ │ │ ├── RtpMapAttributeParserTest.java │ │ │ └── SsrcAttributeParserTest.java │ │ ├── dtls │ │ └── attributes │ │ │ ├── FingerprintAttributeTest.java │ │ │ └── parser │ │ │ ├── FingerprintAttributeParserTest.java │ │ │ └── SetupAttributeParserTest.java │ │ ├── fields │ │ ├── AttributeFieldTest.java │ │ ├── ConnectionFieldTest.java │ │ ├── MediaDescriptionFieldTest.java │ │ ├── OriginFieldTest.java │ │ ├── SessionNameFieldTest.java │ │ ├── TimingFieldTest.java │ │ ├── VersionFieldTest.java │ │ └── parser │ │ │ ├── AttributeFieldParserTest.java │ │ │ ├── ConnectionFieldParserTest.java │ │ │ ├── MediaDescriptionFieldParserTest.java │ │ │ ├── OriginFieldParserTest.java │ │ │ ├── SessionNameFieldParserTest.java │ │ │ ├── TimingFieldParserTest.java │ │ │ └── VersionFieldParserTest.java │ │ ├── ice │ │ └── attributes │ │ │ ├── CandidateAttributeTest.java │ │ │ ├── IcePwdAttributeTest.java │ │ │ ├── IceUfragTest.java │ │ │ └── parser │ │ │ ├── CandidateAttributeParserTest.java │ │ │ ├── IceLiteAttributeParserTest.java │ │ │ ├── IcePwdAttributeParserTest.java │ │ │ └── IceUfragParserTest.java │ │ └── rtcp │ │ └── attributes │ │ ├── RtcpAttributeTest.java │ │ └── parser │ │ ├── RtcpAttributeParserTest.java │ │ └── RtcpMuxAttributeParserTest.java │ └── resources │ └── org │ └── restcomm │ └── media │ └── core │ └── sdp │ ├── android-sdk-offer.txt │ ├── chrome-39-offer.txt │ ├── firefox-33-offer.txt │ ├── firefox-54-offer.txt │ ├── sdp-webrtc.txt │ └── tlc-scb.txt ├── spi ├── .gitignore ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── restcomm │ │ └── media │ │ └── core │ │ └── spi │ │ ├── CheckPoint.java │ │ ├── Component.java │ │ ├── ComponentFactory.java │ │ ├── ComponentType.java │ │ ├── Connection.java │ │ ├── ConnectionEvent.java │ │ ├── ConnectionFailureListener.java │ │ ├── ConnectionListener.java │ │ ├── ConnectionMode.java │ │ ├── ConnectionState.java │ │ ├── ConnectionType.java │ │ ├── ControlProtocol.java │ │ ├── Endpoint.java │ │ ├── EndpointInstaller.java │ │ ├── EndpointState.java │ │ ├── FormatNotSupportedException.java │ │ ├── MediaException.java │ │ ├── MediaServer.java │ │ ├── MediaSink.java │ │ ├── MediaSource.java │ │ ├── MediaType.java │ │ ├── ModeNotSupportedException.java │ │ ├── MultimediaResourceGroup.java │ │ ├── MultimediaSink.java │ │ ├── MultimediaSource.java │ │ ├── NamingService.java │ │ ├── RelayType.java │ │ ├── ResourceGroup.java │ │ ├── ResourceUnavailableException.java │ │ ├── ServerManager.java │ │ ├── TooManyConnectionsException.java │ │ ├── Valve.java │ │ ├── clock │ │ ├── Task.java │ │ ├── Timer.java │ │ └── TimerTask.java │ │ ├── dsp │ │ ├── Attenuator.java │ │ ├── Codec.java │ │ ├── DspFactory.java │ │ └── Processor.java │ │ ├── dtmf │ │ ├── DtmfDetector.java │ │ ├── DtmfDetectorListener.java │ │ ├── DtmfDetectorProvider.java │ │ ├── DtmfEvent.java │ │ ├── DtmfGenerator.java │ │ ├── DtmfGeneratorEvent.java │ │ ├── DtmfGeneratorListener.java │ │ └── DtmfTonesData.java │ │ ├── format │ │ ├── ApplicationFormat.java │ │ ├── AudioFormat.java │ │ ├── DtlsFormat.java │ │ ├── EncodingName.java │ │ ├── Format.java │ │ ├── FormatFactory.java │ │ ├── Formats.java │ │ ├── VideoFormat.java │ │ └── audio │ │ │ └── DTMFFormat.java │ │ ├── listener │ │ ├── Event.java │ │ ├── Listener.java │ │ ├── Listeners.java │ │ └── TooManyListenersException.java │ │ ├── memory │ │ ├── Frame.java │ │ ├── Memory.java │ │ └── Partition.java │ │ ├── player │ │ ├── Player.java │ │ ├── PlayerEvent.java │ │ ├── PlayerListener.java │ │ └── PlayerProvider.java │ │ ├── recorder │ │ ├── Recorder.java │ │ ├── RecorderEvent.java │ │ ├── RecorderListener.java │ │ └── RecorderProvider.java │ │ ├── resource │ │ └── TTSEngine.java │ │ ├── tone │ │ ├── ToneDetector.java │ │ ├── ToneDetectorListener.java │ │ └── ToneEvent.java │ │ └── utils │ │ └── Text.java │ └── test │ └── java │ └── org │ └── restcomm │ └── media │ └── core │ └── spi │ ├── format │ ├── AudioFormatTest.java │ ├── FormatTest.java │ ├── FormatsTest.java │ └── VideoFormatTest.java │ ├── listener │ └── ListenersTest.java │ ├── memory │ ├── FrameTest.java │ └── MemoryTest.java │ └── utils │ ├── TextTest.java │ └── TimeChecker.java └── stun ├── pom.xml └── src └── main └── java └── org └── restcomm └── media └── core └── stun ├── StunException.java └── messages ├── StunIndication.java ├── StunMessage.java ├── StunMessageFactory.java ├── StunRequest.java ├── StunResponse.java ├── StunTransactionId.java └── attributes ├── StunAttribute.java ├── StunAttributeDecoder.java ├── StunAttributeFactory.java ├── address ├── AddressAttribute.java ├── AlternateServerAttribute.java ├── ChangedAddressAttribute.java ├── DestinationAddressAttribute.java ├── ReflectedFromAttribute.java ├── RemoteAddressAttribute.java ├── ResponseAddressAttribute.java ├── SourceAddressAttribute.java ├── XorMappedAddressAttribute.java ├── XorPeerAddressAttribute.java └── XorRelayedAddressAttribute.java ├── control ├── ControlAttribute.java ├── ControlledAttribute.java └── ControllingAttribute.java ├── data └── DataAttribute.java └── general ├── ChangeRequestAttribute.java ├── ChannelNumberAttribute.java ├── ContextDependentAttribute.java ├── DontFragmentAttribute.java ├── ErrorCodeAttribute.java ├── EvenPortAttribute.java ├── FingerprintAttribute.java ├── LifetimeAttribute.java ├── MagicCookieAttribute.java ├── MappedAddressAttribute.java ├── MessageIntegrityAttribute.java ├── NonceAttribute.java ├── OptionalAttribute.java ├── PriorityAttribute.java ├── RealmAttribute.java ├── RequestedTransportAttribute.java ├── ReservationTokenAttribute.java ├── SoftwareAttribute.java ├── UnknownAttributesAttribute.java ├── UseCandidateAttribute.java ├── UsernameAttribute.java └── XorOnlyAttribute.java /.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | /**/.classpath 3 | 4 | # ignore .svn metadata files 5 | .svn 6 | 7 | # ignore OS junk files 8 | .DS_Store 9 | 10 | # ignore Maven generated target folders 11 | ~ 12 | target 13 | bin 14 | classes 15 | *.zip 16 | 17 | # temp files 18 | *~ 19 | 20 | # Ignore Maven target/ dirs 21 | /**/target/**/* 22 | 23 | #Ignore Maven generated artifacts 24 | /**/.classpath 25 | /**/.project 26 | /**/.settings 27 | 28 | # ignore diagram images 29 | architecture-diagrams/**/*.png 30 | 31 | media-server-docs/sources-mobicents/src 32 | media-server-docs/sources-telscale/src 33 | client/jsr-309/tck/tck-run 34 | 35 | /**/*.iml 36 | .idea 37 | -------------------------------------------------------------------------------- /Jenkinsfile-snapshot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env groovy 2 | node("cxs-slave-master") { 3 | 4 | configFileProvider( 5 | [configFile(fileId: '37cb206e-6498-4d8a-9b3d-379cd0ccd99b', targetLocation: 'settings.xml')]) { 6 | sh 'mkdir -p ~/.m2 && sed -i "s|@LOCAL_REPO_PATH@|$WORKSPACE/M2_REPO|g" $WORKSPACE/settings.xml && cp $WORKSPACE/settings.xml -f ~/.m2/settings.xml' 7 | } 8 | 9 | stage ('Checkout') { 10 | checkout scm 11 | } 12 | 13 | stage ('Build') { 14 | sh "mvn clean install -DskipTests" 15 | } 16 | 17 | stage ('Test') { 18 | sh "mvn test -Dmaven.test.failure.ignore=true" 19 | junit testResults: '**/target/surefire-reports/*.xml', testDataPublishers: [[$class: 'StabilityTestDataPublisher']] 20 | } 21 | 22 | stage ('Deploy') { 23 | sh "mvn clean install package deploy:deploy -Pattach-sources,generate-javadoc,maven-release -DskipTests=true -DskipNexusStagingDeployMojo=true -DaltDeploymentRepository=nexus::default::$CXS_NEXUS_SNAPSHOTS_URL" 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /architecture-diagrams/bootstrap/bootstrap-classes.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/architecture-diagrams/bootstrap/bootstrap-classes.dia -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-asr-state.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | state AsrSignal { 3 | [*] --> LoadingPlaylist 4 | LoadingPlaylist --> Prompting : prompt 5 | LoadingPlaylist --> Prompted : no_prompt 6 | Prompting --> Prompted : end_prompt 7 | Prompting --> Prompting : next_track 8 | Prompted --> [*] 9 | || 10 | [*] --> Collecting 11 | Collecting --> Collecting : recognized_text 12 | Collecting --> WaitingAsrTimeout: end_input 13 | Collecting --> Collected: end_input_without_wfr 14 | WaitingAsrTimeout --> Collected: asr_timeout 15 | WaitingAsrTimeout --> WaitingAsrTimeout : recognized_text 16 | Collected --> [*] 17 | } 18 | 19 | [*] -down-> AsrSignal 20 | AsrSignal -down-> Evaluating : evaluate/timeout 21 | AsrSignal --> Canceled : cancel 22 | 23 | Evaluating -down-> Failing : no_recognized_text 24 | Evaluating -down-> Canceled : cancel 25 | Evaluating -down-> Succeeding : succeed 26 | 27 | Failing -down-> PlayingFailure : prompt 28 | Failing -down-> Failed : no_prompt/cancel 29 | PlayingFailure --> PlayingFailure : next_track 30 | PlayingFailure -down-> Failed : end_prompt/cancel 31 | 32 | Succeeding -down-> PlayingSuccess : prompt 33 | Succeeding -down-> Succeeded : no_prompt/cancel 34 | PlayingSuccess --> PlayingSuccess : next_track 35 | PlayingSuccess -down-> Succeeded : end_prompt/cancel 36 | 37 | Canceled -down-> Succeeded : succeed 38 | Canceled -down-> Failed : fail (NO_SPEECH) 39 | 40 | Succeeded --> [*] 41 | Failed --> [*] 42 | @enduml -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-classes.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/architecture-diagrams/mgcp/mgcp-classes.dia -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-connection-max-duration-timeout-no-event-sequence.adoc: -------------------------------------------------------------------------------- 1 | [plantuml,file="mgcp-connection-max-duration-timeout-no-event-sequence.png"] 2 | -- 3 | == Call Setup == 4 | 5 | CallAgent -> MediaServer : CRCX endpoint/$ 6 | CallAgent <-- MediaServer : 200 OK, Z:, I: 7 | 8 | == Timeout/Cleanup == 9 | 10 | ... maximum call duration reached ... 11 | MediaServer -> MediaServer : DLCX endpoint/, I: 12 | MediaServer --> MediaServer : 200 OK 13 | -- -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-connection-max-duration-timeout-sequence.adoc: -------------------------------------------------------------------------------- 1 | [plantuml,file="mgcp-connection-max-duration-timeout-sequence.png"] 2 | -- 3 | == Call Setup == 4 | 5 | CallAgent -> MediaServer : CRCX endpoint/$ 6 | CallAgent <-- MediaServer : 200 OK, Z:, I: 7 | CallAgent -> MediaServer : RQNT endpoint/, R: R/rto@(N)() 8 | CallAgent <-- MediaServer: 200 OK 9 | 10 | == Timeout == 11 | 12 | ... maximum call duration reached ... 13 | CallAgent <- MediaServer : NTFY O:R/rto@() 14 | CallAgent --> MediaServer : 200 OK 15 | 16 | == Call Cleanup == 17 | 18 | CallAgent -> MediaServer : DLCX endpoint/ 19 | CallAgent <-- MediaServer : 200 OK 20 | -- -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-connection-rtp-timeout-sequence.adoc: -------------------------------------------------------------------------------- 1 | [plantuml,file="mgcp-connection-rtp-timeout-sequence.png"] 2 | -- 3 | == Call Setup == 4 | 5 | CallAgent -> MediaServer : CRCX endpoint/$ 6 | CallAgent <-- MediaServer : 200 OK, Z:, I: 7 | CallAgent -> MediaServer : RQNT endpoint/, R: R/rto@(N)() 8 | CallAgent <-- MediaServer: 200 OK 9 | 10 | == Timeout == 11 | 12 | ... seconds without receiving an RTP packet ... 13 | CallAgent <- MediaServer : NTFY O:R/rto@() 14 | CallAgent --> MediaServer : 200 OK 15 | 16 | == Call Cleanup == 17 | 18 | CallAgent -> MediaServer : DLCX endpoint/ 19 | CallAgent <-- MediaServer : 200 OK 20 | -- -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-controller-state.adoc: -------------------------------------------------------------------------------- 1 | @startuml 2 | [*] --> ACTIVATING 3 | 4 | state ACTIVATING { 5 | [*] --> OPENING_CHANNEL 6 | OPENING_CHANNEL --> BINDING_CHANNEL : channel_opened 7 | } 8 | 9 | ACTIVATING --> ACTIVATED : activated 10 | ACTIVATING --> DEACTIVATING : deactivate 11 | 12 | ACTIVATED --> DEACTIVATING : deactivate 13 | 14 | 15 | state DEACTIVATING { 16 | [*] --> CLOSING_CHANNEL 17 | } 18 | 19 | DEACTIVATING --> DEACTIVATED : deactivated 20 | DEACTIVATED --> [*] 21 | @enduml -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-transaction-class.adoc: -------------------------------------------------------------------------------- 1 | [plantuml,file="mgcp-transaction-class.png"] 2 | -- 3 | interface ListeningExecutorService { 4 | + ListenableFuture submit(Callable) 5 | } 6 | 7 | interface FutureCallback { 8 | + onSuccess(V) 9 | + onFailure(Throwable); 10 | } 11 | 12 | interface Callable { 13 | + V call() 14 | } 15 | 16 | class MgcpTransactionManager { 17 | - Collection transactions 18 | + process(MgcpRequest, MgcpCommand) 19 | + process(MgcpResponse) 20 | } 21 | 22 | class MgcpTransaction { 23 | - MgcpRequest request 24 | - MgcpResponse response 25 | } 26 | 27 | class MgcpCommand { 28 | - EndpointManager endpoints 29 | + V call() 30 | } 31 | 32 | ListeningExecutorService <-- MgcpTransactionManager : submit 33 | (MgcpTransactionManager, ListeningExecutorService) . MgcpCommand 34 | Callable <|-- MgcpCommand 35 | 36 | FutureCallback -> MgcpTransactionManager : onCommandComplete 37 | MgcpTransactionManager *--> MgcpTransaction 38 | 39 | -- -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-transaction-outbound-sequence.adoc: -------------------------------------------------------------------------------- 1 | [plantuml,file="mgcp-transaction-outbound-sequence.png"] 2 | -- 3 | MgcpEndpoint -> MgcpController : notify(request, OUT) 4 | activate MgcpController 5 | 6 | MgcpController -> MgcpTransactionManager : process(request) 7 | activate MgcpTransactionManager 8 | 9 | create MgcpTransaction 10 | MgcpTransactionManager -> MgcpTransaction : create 11 | MgcpTransactionManager -> MgcpTransactionManager : register(request.transactionId) 12 | 13 | deactivate MgcpTransactionManager 14 | MgcpController -> MgcpChannel : send(request) 15 | deactivate MgcpController 16 | 17 | activate MgcpChannel 18 | MgcpChannel ->] : bytes 19 | deactivate MgcpChannel 20 | 21 | 22 | ||| 23 | ... waiting for call agent to reply ... 24 | ||| 25 | 26 | MgcpChannel <-] : bytes 27 | activate MgcpChannel 28 | MgcpChannel -> MgcpController : notify(response, IN) 29 | deactivate MgcpChannel 30 | 31 | activate MgcpController 32 | MgcpController -> MgcpTransactionManager : process(response) 33 | deactivate MgcpController 34 | 35 | activate MgcpTransactionManager 36 | MgcpTransactionManager -> MgcpTransactionManager : deregister(response.transactionId) 37 | deactivate MgcpTransactionManager 38 | destroy MgcpTransaction 39 | -- -------------------------------------------------------------------------------- /architecture-diagrams/mgcp/mgcp-transaction-outbound-sequence.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/architecture-diagrams/mgcp/mgcp-transaction-outbound-sequence.dia -------------------------------------------------------------------------------- /architecture-diagrams/network/network-channel-classes.adoc: -------------------------------------------------------------------------------- 1 | [uml,file="network-channel-mgcp.png"] 2 | -- 3 | interface NetworkChannel { 4 | } 5 | 6 | abstract class AbstractNetworkChannel { 7 | } 8 | 9 | class MultiplexedNetworkChannel { 10 | -List handlers 11 | } 12 | 13 | interface NetworkGuard { 14 | +isSecure(NetworkChannel,SocketAddress) 15 | } 16 | 17 | class RestrictedNetworkGuard { 18 | } 19 | 20 | class DirectNetworkGuard { 21 | } 22 | 23 | class SbcNetworkGuard { 24 | } 25 | 26 | NetworkChannel <|-- AbstractNetworkChannel 27 | AbstractNetworkChannel <|-- MultiplexedNetworkChannel 28 | MultiplexedNetworkChannel <|-- MgcpChannel : restricted 29 | MultiplexedNetworkChannel <|-- RtpChannel : direct or sbc 30 | MultiplexedNetworkChannel <|-- RtcpChannel : direct or sbc 31 | 32 | AbstractNetworkChannel -right-> NetworkGuard 33 | NetworkGuard <|-- AbstractNetworkGuard 34 | AbstractNetworkGuard <|-- RestrictedNetworkGuard 35 | AbstractNetworkGuard <|-- DirectNetworkGuard 36 | AbstractNetworkGuard <|-- SbcNetworkGuard 37 | -- -------------------------------------------------------------------------------- /architecture-diagrams/pcap/pcap-player-classes.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | class PcapFile 3 | class PcapPacket 4 | class PcapPlayer 5 | class PcapPlayerWorker 6 | class PcapChannel 7 | class PcapChannelInitializer 8 | class RtpPcapEncoder 9 | abstract class AsyncNetworkChannel 10 | interface Scheduler 11 | 12 | AsyncNetworkChannel <|-- PcapChannel 13 | PcapChannel -> PcapChannelInitializer : setup pipeline 14 | PcapChannelInitializer --> RtpPcapEncoder 15 | PcapChannel <-- PcapPlayer : send 16 | (PcapChannel,PcapPlayer) . PcapPacket 17 | PcapPlayer --> PcapFile : read 18 | PcapPlayer -> Scheduler : schedule read 19 | (PcapPlayer,Scheduler) .. PcapPlayerWorker 20 | @enduml -------------------------------------------------------------------------------- /architecture-diagrams/resource-pool-classes.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/architecture-diagrams/resource-pool-classes.dia -------------------------------------------------------------------------------- /architecture-diagrams/rtp/rtp-netty-handler-state.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | [*] --> ACTIVATED 3 | ACTIVATED -> ACTIVATED : packet_received 4 | ACTIVATED --> DEACTIVATED : deactivate 5 | DEACTIVATED --> [*] 6 | @enduml -------------------------------------------------------------------------------- /asr/asr-api/.gitignore: -------------------------------------------------------------------------------- 1 | /target -------------------------------------------------------------------------------- /asr/asr-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-asr 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.asr 14 | media-core-asr-api 15 | media-core-asr-api 16 | 17 | 18 | 19 | org.restcomm.media.core.driver.asr 20 | media-core-driver-asr-api 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.apache.maven.plugins 29 | maven-compiler-plugin 30 | 31 | 32 | ${project.artifactId}-${project.parent.version} 33 | 34 | -------------------------------------------------------------------------------- /asr/asr-api/src/main/java/org/restcomm/media/core/asr/AsrEngineProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.asr; 23 | 24 | /** 25 | * Produces instances of {@link AsrEngine}. 26 | * 27 | * @author gdubina 28 | * 29 | */ 30 | public interface AsrEngineProvider { 31 | 32 | /** 33 | * Build a new ASR engine. 34 | * 35 | * @return A new instance of ASR engine. 36 | */ 37 | AsrEngine provide(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /asr/asr-engine/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-asr 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.asr 14 | media-core-asr-engine 15 | media-core-asr-engine 16 | 17 | 18 | 19 | org.restcomm.media.core.asr 20 | media-core-asr-api 21 | ${project.version} 22 | 23 | 24 | org.restcomm.media.core 25 | media-core-component 26 | ${project.version} 27 | 28 | 29 | com.google.guava 30 | guava 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.apache.maven.plugins 38 | maven-compiler-plugin 39 | 40 | 41 | ${project.artifactId}-${project.parent.version} 42 | 43 | -------------------------------------------------------------------------------- /client/jsr-309/driver/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/fsm/Logger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.fsm; 21 | 22 | /** 23 | * 24 | * @author kulikov 25 | */ 26 | public interface Logger { 27 | public void info(String s); 28 | public void debug(String s); 29 | public void warn(String s); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/fsm/StateEventHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.fsm; 21 | 22 | /** 23 | * 24 | * @author kulikov 25 | */ 26 | public interface StateEventHandler { 27 | public void onEvent(State state); 28 | } 29 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/fsm/TransitionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.fsm; 21 | 22 | /** 23 | * 24 | * @author kulikov 25 | */ 26 | public interface TransitionHandler { 27 | public void process(State state); 28 | } 29 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/javax/media/mscontrol/DefaultEventGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.javax.media.mscontrol; 21 | 22 | public class DefaultEventGeneratorFactory extends EventGeneratorFactory { 23 | 24 | public DefaultEventGeneratorFactory(String pkgName, String eventName, boolean isOnEndpoint) { 25 | super(pkgName, eventName, isOnEndpoint); 26 | } 27 | 28 | @Override 29 | public String toString() { 30 | return super.toString() + " DefaultEventGeneratorFactory"; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/javax/media/mscontrol/container/LinkListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.javax.media.mscontrol.container; 21 | 22 | /** 23 | * 24 | * @author kulikov 25 | */ 26 | public interface LinkListener { 27 | public void joined(Link link); 28 | public void unjoined(Link link); 29 | } 30 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/javax/media/mscontrol/mediagroup/RecorderState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.javax.media.mscontrol.mediagroup; 21 | 22 | public enum RecorderState { 23 | IDLE, ACTIVE, PAUSED 24 | } 25 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/javax/media/mscontrol/mediagroup/signals/buffer/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.javax.media.mscontrol.mediagroup.signals.buffer; 21 | 22 | /** 23 | * 24 | * @author kulikov 25 | */ 26 | public class Event { 27 | private String s = "unknown"; 28 | 29 | public Event() { 30 | } 31 | 32 | public Event(String s) { 33 | this.s = s; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return s; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/javax/media/mscontrol/resource/ExtendedParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.javax.media.mscontrol.resource; 21 | 22 | import javax.media.mscontrol.Parameter; 23 | 24 | public enum ExtendedParameter implements Parameter { 25 | ENDPOINT_LOCAL_NAME, MIXER_ADAPTER_CONFIG 26 | 27 | } 28 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/java/org/restcomm/mscontrol/sdp/FormatParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this software; if not, write to the Free 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 19 | */ 20 | package org.restcomm.mscontrol.sdp; 21 | 22 | /** 23 | * 24 | * @author kulikov 25 | */ 26 | public interface FormatParser { 27 | public final static AVProfile AVPROFILE = new AVProfile(); 28 | 29 | public Format getFormat(int payload); 30 | public boolean parse(String rtpmap, int[] payloads, Format[] formats, int count); 31 | public void write(StringBuffer buffer, int p, Format f); 32 | } 33 | -------------------------------------------------------------------------------- /client/jsr-309/driver/src/main/resources/META-INF/services/javax.media.mscontrol.spi.Driver: -------------------------------------------------------------------------------- 1 | #mobicents provider of Driver for JSR-309 2 | org.restcomm.javax.media.mscontrol.spi.DriverImpl -------------------------------------------------------------------------------- /client/jsr-309/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-client 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.client 14 | media-core-client-jsr-309 15 | media-core-client-jsr-309 16 | 17 | 18 | driver 19 | 20 | 21 | -------------------------------------------------------------------------------- /client/jsr-309/tck/JSR_309_TCK_License.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/JSR_309_TCK_License.pdf -------------------------------------------------------------------------------- /client/jsr-309/tck/OC_jsr309_TCK_20091029.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/OC_jsr309_TCK_20091029.zip -------------------------------------------------------------------------------- /client/jsr-309/tck/TCK-version: -------------------------------------------------------------------------------- 1 | JSR309 TCK Version 1.524 2 | -------------------------------------------------------------------------------- /client/jsr-309/tck/coverage/sigtest-2.1-src.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/coverage/sigtest-2.1-src.zip -------------------------------------------------------------------------------- /client/jsr-309/tck/coverage/sigtest.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/coverage/sigtest.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/concurrent-3.0.0.CR2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/concurrent-3.0.0.CR2.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/jain-mgcp-ri-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/jain-mgcp-ri-1.0.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/jain-sip-ri-1.2.146.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/jain-sip-ri-1.2.146.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/jsr-309-driver-3.0.0.CR2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/jsr-309-driver-3.0.0.CR2.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/junit-4.7-src.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/junit-4.7-src.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/junit.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/junit.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/log4j-1.2-api-2.10.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/log4j-1.2-api-2.10.0.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/log4j-api-2.10.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/log4j-api-2.10.0.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/log4j-core-2.10.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/log4j-core-2.10.0.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/media_server_control-1_0-final-spec.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/media_server_control-1_0-final-spec.zip -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/mgcp-driver-3.0.0.CR2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/mgcp-driver-3.0.0.CR2.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/deps/mscontrol.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/deps/mscontrol.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/exclude-list.properties: -------------------------------------------------------------------------------- 1 | # This file contains the list of testcases that should not be run, 2 | # because they have been found incorrect, invalid, superseded, or otherwise not applicable. 3 | # Exclude List Revision: v 0.0, increments for each new list published 4 | 5 | # Examples 6 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/functional/join/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory.functional.join (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory.functional.join 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | InitJoinTest
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/functional/networkconnection/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory.functional.networkconnection (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory.functional.networkconnection 20 | 21 | 22 | 29 | 30 |
23 | Classes  24 | 25 |
26 | CodecPolicyTest 27 |
28 | NetworkConnectionTest
31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/functional/resource/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory.functional.resource (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory.functional.resource 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | ConfirmTest
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/functional/vxml/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory.functional.vxml (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory.functional.vxml 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | VxmlTest
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory 20 | 21 | 22 | 29 | 30 |
23 | Classes  24 | 25 |
26 | AllCactusTests 27 |
28 | AllTests
31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/robustness/mediagroup/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory.robustness.mediagroup (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory.robustness.mediagroup 20 | 21 | 22 | 29 | 30 |
23 | Classes  24 | 25 |
26 | MediaGroupUnjoinTest 27 |
28 | PlayerRobustnessTest
31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/robustness/networkconnection/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory.robustness.networkconnection (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory.robustness.networkconnection 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | CodecPolicyTest
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/com/hp/opencall/jmsc/test/mandatory/robustness/resource/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.hp.opencall.jmsc.test.mandatory.robustness.resource (Test Compatibility Kit for JSR309) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.hp.opencall.jmsc.test.mandatory.robustness.resource 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | RTCTest
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/package-list: -------------------------------------------------------------------------------- 1 | com.hp.opencall.jmsc.test 2 | com.hp.opencall.jmsc.test.mandatory 3 | com.hp.opencall.jmsc.test.mandatory.functional 4 | com.hp.opencall.jmsc.test.mandatory.functional.join 5 | com.hp.opencall.jmsc.test.mandatory.functional.mediagroup 6 | com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.signals 7 | com.hp.opencall.jmsc.test.mandatory.functional.mixer 8 | com.hp.opencall.jmsc.test.mandatory.functional.networkconnection 9 | com.hp.opencall.jmsc.test.mandatory.functional.resource 10 | com.hp.opencall.jmsc.test.mandatory.functional.vxml 11 | com.hp.opencall.jmsc.test.mandatory.robustness 12 | com.hp.opencall.jmsc.test.mandatory.robustness.MSFaultTestServer 13 | com.hp.opencall.jmsc.test.mandatory.robustness.mediagroup 14 | com.hp.opencall.jmsc.test.mandatory.robustness.networkconnection 15 | com.hp.opencall.jmsc.test.mandatory.robustness.resource 16 | -------------------------------------------------------------------------------- /client/jsr-309/tck/javadoc/TCK/resources/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/javadoc/TCK/resources/inherit.gif -------------------------------------------------------------------------------- /client/jsr-309/tck/launch-TCK.sh: -------------------------------------------------------------------------------- 1 | JSR309TCK_HOME=$(dirname $0) 2 | # Keep "." first, so that properties are loaded from there 3 | # Change "mscontrolRI.jar" for your implementation jar 4 | CP=".:mscontrol.jar:mobicents-jsr309-impl-2.2.0.CR2.jar:tck.jar" 5 | for jar in deps/*.jar 6 | do 7 | CP=$CP:$jar 8 | done 9 | # echo $CP 10 | 11 | if [ "$1" != "" ] 12 | then 13 | ARG="$1" 14 | else 15 | ARG="AllTests" 16 | fi 17 | $JAVA_HOME/bin/java -cp $CP org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.$ARG 18 | -------------------------------------------------------------------------------- /client/jsr-309/tck/log4j2.properties: -------------------------------------------------------------------------------- 1 | status=error 2 | dest=err 3 | name=PropertiesConfig 4 | 5 | property.filename = target/logs/debuglog.txt 6 | 7 | filter.threshold.type=ThresholdFilter 8 | filter.threshold.level=debug 9 | 10 | appender.console.type=Console 11 | appender.console.name=console 12 | appender.console.layout.type=PatternLayout 13 | appender.console.layout.pattern=%d %-5p [%c] %m%n 14 | 15 | rootLogger.level=info 16 | rootLogger.appenderRef.console.ref=console 17 | 18 | logger.media.name=org.restcomm.media 19 | logger.media.level=info 20 | logger.media.additivity=false 21 | logger.media.appenderRef.console.ref=console 22 | 23 | logger.hp.name=com.hp 24 | logger.hp.level=info 25 | logger.hp.additivity=false 26 | logger.hp.appenderRef.console.ref=console -------------------------------------------------------------------------------- /client/jsr-309/tck/media/Numbers_1-15.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/Numbers_1-15.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/Numbers_1-5_3s.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/Numbers_1-5_3s.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/cago-dtmf2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/cago-dtmf2.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/cagocago-onesecond.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/cagocago-onesecond.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/decreasingvolume-recorded.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/decreasingvolume-recorded.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/dtmf-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/dtmf-1.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/dtmfs-1-9.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/dtmfs-1-9.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/increasingvolume-recorded.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/increasingvolume-recorded.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/recorded.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/recorded.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/media/recorded2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/media/recorded2.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/mediarecorded.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/mediarecorded.wav -------------------------------------------------------------------------------- /client/jsr-309/tck/mixeradaptertest.properties: -------------------------------------------------------------------------------- 1 | testcase.mixeradapter.increasingvolume=file:///opt/mobsource/medianew/client/jsr-309/tck/media/increasingvolume-recorded.wav 2 | testcase.mixeradapter.decreasingvolume=file:///opt/mobsource/medianew/client/jsr-309/tck/media/decreasingvolume-recorded.wav 3 | -------------------------------------------------------------------------------- /client/jsr-309/tck/run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set CLASSPATH=.;tck.jar;deps/jain-mgcp-ri-1.0.jar;deps/mgcp-impl-2.0.0.GA.jar;deps/mscontrol.jar;c:/projects/mobicents/trunk/servers/media/jsr-309/core/target/mobicents-jsr309-impl-2.0.0.BETA5-SNAPSHOT.jar;deps/junit.jar;deps/jain-sip-ri-1.2.146.jar;deps/log4j-1.2.14.jar; 3 | 4 | rem java -classpath %CLASSPATH% org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.mandatory.functional.networkconnection.CodecPolicyTest 5 | 6 | rem JOIN 7 | rem java -classpath %CLASSPATH% org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.mandatory.functional.join.InitJoinTest 8 | 9 | rem PLAYER 10 | rem java -classpath %CLASSPATH% org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.PlayerTest 11 | java -classpath %CLASSPATH% org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.PromptAndCollectTest 12 | 13 | rem SIGNAL DETECTOR 14 | rem java -classpath %CLASSPATH% org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.signals.SignalDetectorTest 15 | rem java -classpath %CLASSPATH% org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.mandatory.functional.mediagroup.signals.DTMFBufferingTest 16 | 17 | 18 | 19 | rem java -classpath %CLASSPATH% org.junit.runner.JUnitCore com.hp.opencall.jmsc.test.mandatory.functional.AllTests -------------------------------------------------------------------------------- /client/jsr-309/tck/server.log: -------------------------------------------------------------------------------- 1 | 2013-02-12 23:21:47,160 DEBUG [TestBase] (main) Loading file:/opt/mobsource/medianew/client/jsr-309/tck/exclude-list.properties 2 | 2013-02-12 23:21:47,162 INFO [Runner] (main) Start mandatory.functional.mediagroup.PlayerTest.test_2_1_1_1_Play javadoc::Joinable::1 javadoc::MediaGroup::1 javadoc::MediaGroup::6 javadoc::Player::1 javadoc::PlayerEvent::15 3 | 2013-02-12 23:21:47,162 DEBUG [TestBase] (main) Getting a MsControlFactory instance 4 | 2013-02-12 23:21:47,184 INFO [DriverImpl] (main) Initializing MGCP on /127.0.0.1:2729 5 | 2013-02-12 23:21:47,202 WARN [JainMgcpStackImpl] (main) Failed to locate properties file, using default values 6 | 2013-02-12 23:21:47,221 INFO [JainMgcpStackImpl] (main) Jain Mgcp stack bound to IP /127.0.0.1 and UDP port 2729 7 | -------------------------------------------------------------------------------- /client/jsr-309/tck/tck-cactus/local.properties: -------------------------------------------------------------------------------- 1 | #Required properties: 2 | SERVER=localhost 3 | PORT=7001 4 | USERNAME=weblogic 5 | PASSWORD=weblogic 6 | DEPLOY-TARGETS=AdminServer 7 | OCCAS-HOME=C:/occas40/ 8 | cactus.lib.dir=C:/opt/jakarta-cactus-13-1.7.2/lib/ 9 | mscontrol.jar=../mscontrol.jar 10 | tck.jar=../tck.jar 11 | log4j.jar=../deps/log4j-1.2.14.jar 12 | 13 | -------------------------------------------------------------------------------- /client/jsr-309/tck/tck-cactus/src/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /client/jsr-309/tck/tck-cactus/src/cactus.properties: -------------------------------------------------------------------------------- 1 | cactus.contextURL=http://localhost:7001/tck-cactified 2 | cactus.servletRedirectorName=ServletRedirector 3 | -------------------------------------------------------------------------------- /client/jsr-309/tck/tck.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/tck.jar -------------------------------------------------------------------------------- /client/jsr-309/tck/tck.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/client/jsr-309/tck/tck.log -------------------------------------------------------------------------------- /client/jsr-309/tck/windows_classpath: -------------------------------------------------------------------------------- 1 | .;tck.jar;mscontrolRI.jar;mscontrol.jar;deps/castor-1.1.2.1-anttasks.jar;deps/nist-sdp-1.0.jar;deps/commons-logging.jar;deps/junit.jar;deps/JainSipRi1.2.jar;deps/castor-1.1.2.1-xml.jar;deps/log4j-1.2.14.jar;deps/concurrent.jar;deps/castor-1.1.2.1-codegen.jar;deps/xercesImpl.jar;deps/JainSipApi1.2.jar -------------------------------------------------------------------------------- /client/mgcp/driver/ant-build-config.properties: -------------------------------------------------------------------------------- 1 | #This is used by concurrency test 2 | javac.debug=on 3 | javac.source=1.7 4 | javac.target=1.7 5 | javac.deprecation=true 6 | javac.optimize=off 7 | javac.debuglevel=lines,vars,source 8 | log4j=/home/abhayani/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar 9 | # JUNIT ONLY REQUIRED FOR TESTING. NOT REQUIRED FOR jain-sip RI 10 | junit=/home/abhayani/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar 11 | jain-mgcp-ri=/home/abhayani/.m2/repository/jain/jain-mgcp-ri/1.0/jain-mgcp-ri-1.0.jar 12 | 13 | ant=/home/abhayani/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar -------------------------------------------------------------------------------- /client/mgcp/driver/src/main/java/org/restcomm/media/client/mgcp/jain/pkg/AUPackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.client.mgcp.jain.pkg; 24 | 25 | import jain.protocol.ip.mgcp.pkg.PackageName; 26 | 27 | /** 28 | * 29 | * @author amit bhayani 30 | * 31 | */ 32 | public class AUPackage { 33 | public static final int ADVANCED_AUDIO = 200; 34 | public static final PackageName AU = PackageName.factory("AU", ADVANCED_AUDIO); 35 | } 36 | -------------------------------------------------------------------------------- /client/mgcp/driver/src/main/java/org/restcomm/media/client/mgcp/jain/pkg/EventsValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.client.mgcp.jain.pkg; 24 | 25 | public class EventsValue extends Value { 26 | public EventsValue() { 27 | super(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /client/mgcp/driver/src/main/java/org/restcomm/media/client/mgcp/jain/pkg/Parameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.client.mgcp.jain.pkg; 24 | 25 | public interface Parameter { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /client/mgcp/driver/src/main/java/org/restcomm/media/client/mgcp/jain/pkg/SLPackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.client.mgcp.jain.pkg; 24 | 25 | import jain.protocol.ip.mgcp.pkg.PackageName; 26 | 27 | /** 28 | * 29 | * @author yulian oifa 30 | * 31 | */ 32 | public class SLPackage { 33 | public static final int SL_PACKAGE = 201; 34 | public static final PackageName SL = PackageName.factory("SL", SL_PACKAGE); 35 | } 36 | -------------------------------------------------------------------------------- /client/mgcp/driver/src/main/resources/org/mobicents/mgcp/stack/mgcp-stack.properties: -------------------------------------------------------------------------------- 1 | # Number of parser threads used to parse incoming messages 2 | # Optimal while set to number of cpu cores available on server 3 | executorQueueSize=2 4 | -------------------------------------------------------------------------------- /client/mgcp/driver/src/test/java/org/restcomm/media/client/mgcp/test/profiler/README.txt: -------------------------------------------------------------------------------- 1 | The CRCXCA and CRCXMGW are used for profiling the stack. CRCXCA will simple send CRCX messages and expects back response from MGW. -------------------------------------------------------------------------------- /client/mgcp/driver/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | status=error 2 | dest=err 3 | name=PropertiesConfig 4 | 5 | property.filename = target/logs/debuglog.txt 6 | 7 | filter.threshold.type=ThresholdFilter 8 | filter.threshold.level=debug 9 | 10 | appender.console.type=Console 11 | appender.console.name=console 12 | appender.console.layout.type=PatternLayout 13 | appender.console.layout.pattern=%d %-5p [%c] %m%n 14 | 15 | appender.rolling.type = RollingFile 16 | appender.rolling.name = file 17 | appender.rolling.fileName = ${filename} 18 | appender.rolling.filePattern = target/logs/debuglog-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz 19 | appender.rolling.layout.type = PatternLayout 20 | appender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n 21 | appender.rolling.policies.type = Policies 22 | appender.rolling.policies.size.type = SizeBasedTriggeringPolicy 23 | appender.rolling.policies.size.size=250MB 24 | appender.rolling.strategy.type = DefaultRolloverStrategy 25 | appender.rolling.strategy.max = 1 26 | 27 | rootLogger.level=info 28 | rootLogger.appenderRef.console.ref=console 29 | rootLogger.appenderRef.file.ref=file 30 | 31 | logger.media.name=org.restcomm.media 32 | logger.media.level=info 33 | logger.media.additivity=false 34 | logger.media.appenderRef.console.ref=console 35 | 36 | logger.mgcp.name=org.restcomm.media.client.mgcp 37 | logger.mgcp.level=info 38 | logger.mgcp.additivity=false 39 | logger.mgcp.appenderRef.console.ref=console 40 | 41 | -------------------------------------------------------------------------------- /client/mgcp/driver/src/test/resources/test.properties: -------------------------------------------------------------------------------- 1 | org.mobicents.mgcp.stack.test.LOG_FILE=logs/debuglog.txt 2 | org.mobicents.mgcp.stack.test.ABORT_ON_FAIL=false 3 | 4 | -------------------------------------------------------------------------------- /client/mgcp/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | pom 5 | 6 | 7 | org.restcomm.media.core 8 | media-core-client 9 | 8.2.0-SNAPSHOT 10 | 11 | 12 | org.restcomm.media.core.client 13 | media-core-client-mgcp 14 | media-core-client-mgcp 15 | 16 | 17 | driver 18 | 19 | 20 | -------------------------------------------------------------------------------- /client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-client 15 | media-core-client 16 | 17 | 18 | jsr-309 19 | mgcp 20 | 21 | 22 | -------------------------------------------------------------------------------- /codec/g711/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /codec/g711/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-codec 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.codec 14 | media-core-codec-g711 15 | media-core-codec-g711 16 | 17 | 18 | 19 | 20 | org.apache.maven.plugins 21 | maven-compiler-plugin 22 | 23 | 24 | ${project.artifactId}-${project.version} 25 | 26 | -------------------------------------------------------------------------------- /codec/g711/src/main/resources/speech.properties: -------------------------------------------------------------------------------- 1 | # Copyright 2001 Sun Microsystems, Inc. 2 | # All Rights Reserved. Use is subject to license terms. 3 | # 4 | # See the file "license.terms" for information on usage and 5 | # redistribution of this file, and for a DISCLAIMER OF ALL 6 | # WARRANTIES. 7 | # 8 | 9 | # Modify this accordingly... 10 | # 11 | #TextSynthEngineCentral=com.sun.speech.engine.synthesis.text.TextEngineCentral 12 | # 13 | FreeTTSSynthEngineCentral=com.sun.speech.freetts.jsapi.FreeTTSEngineCentral 14 | -------------------------------------------------------------------------------- /codec/g729/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /codec/g729/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-codec 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.codec 14 | media-core-codec-g729 15 | media-core-codec-g729 16 | 17 | 18 | 19 | 20 | org.apache.maven.plugins 21 | maven-compiler-plugin 22 | 23 | 24 | ${project.artifactId}-${project.version} 25 | 26 | -------------------------------------------------------------------------------- /codec/g729/src/main/java/org/restcomm/media/core/codec/g729/FloatPointer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.codec.g729; 24 | 25 | public class FloatPointer { 26 | public Float value = null; 27 | public FloatPointer(Float v) { 28 | value = v; 29 | } 30 | public FloatPointer() { 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /codec/g729/src/main/java/org/restcomm/media/core/codec/g729/GenericPointer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.codec.g729; 24 | 25 | public class GenericPointer { 26 | public T value = null; 27 | public GenericPointer(T v) { 28 | value = v; 29 | } 30 | public GenericPointer() { 31 | } 32 | public void setValue(T a) { 33 | value = a; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /codec/g729/src/main/java/org/restcomm/media/core/codec/g729/IntegerPointer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.codec.g729; 24 | 25 | public class IntegerPointer { 26 | public Integer value = null; 27 | public IntegerPointer(Integer v) { 28 | value = v; 29 | } 30 | public IntegerPointer() { 31 | } 32 | public void setValue(Integer a) { 33 | value = a; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /codec/gsm/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /codec/gsm/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-codec 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.codec 14 | media-core-codec-gsm 15 | media-core-codec-gms 16 | 17 | 18 | 19 | 20 | org.apache.maven.plugins 21 | maven-compiler-plugin 22 | 23 | 24 | ${project.artifactId}-${project.version} 25 | 26 | -------------------------------------------------------------------------------- /codec/ilbc/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /codec/ilbc/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-codec 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.codec 14 | media-core-codec-ilbc 15 | media-core-codec-ilbc 16 | 17 | 18 | 19 | 20 | org.apache.maven.plugins 21 | maven-compiler-plugin 22 | 23 | 24 | ${project.artifactId}-${project.version} 25 | 26 | -------------------------------------------------------------------------------- /codec/ilbc/src/test/resources/iLBC.INP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/codec/ilbc/src/test/resources/iLBC.INP -------------------------------------------------------------------------------- /codec/ilbc/src/test/resources/iLBC_20ms.BIT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/codec/ilbc/src/test/resources/iLBC_20ms.BIT -------------------------------------------------------------------------------- /codec/ilbc/src/test/resources/iLBC_20ms_clean.OUT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/codec/ilbc/src/test/resources/iLBC_20ms_clean.OUT -------------------------------------------------------------------------------- /codec/ilbc/src/test/resources/iLBC_20ms_tlm05.OUT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/codec/ilbc/src/test/resources/iLBC_20ms_tlm05.OUT -------------------------------------------------------------------------------- /codec/ilbc/src/test/resources/iLBC_Fix.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/codec/ilbc/src/test/resources/iLBC_Fix.enc -------------------------------------------------------------------------------- /codec/l16/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /codec/l16/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | jar 5 | 6 | 7 | org.restcomm.media.core 8 | media-core-codec 9 | 8.2.0-SNAPSHOT 10 | 11 | 12 | org.restcomm.media.core.codec 13 | media-core-codec-l16 14 | media-core-codec-l16 15 | 16 | 17 | 18 | 19 | org.apache.maven.plugins 20 | maven-compiler-plugin 21 | 22 | 23 | ${project.artifactId}-${project.version} 24 | 25 | -------------------------------------------------------------------------------- /codec/opus/opus-java/src/test/resources/test_sound_mono_48.pcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/codec/opus/opus-java/src/test/resources/test_sound_mono_48.pcm -------------------------------------------------------------------------------- /codec/opus/opus-native/README.md: -------------------------------------------------------------------------------- 1 | c++ opus_jni.cpp -std=c++11 -I/usr/lib/jvm/jdk1.7.0_80/include -I/usr/lib/jvm/jdk1.7.0_80/include/linux -I/usr/include/opus -lopus -Wall -fPIC -shared -o libopus_jni.so 2 | -------------------------------------------------------------------------------- /codec/opus/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-codec 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.codec 14 | media-core-codec-opus 15 | media-core-codec-opus 16 | 17 | 18 | opus-java 19 | opus-native 20 | 21 | -------------------------------------------------------------------------------- /codec/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-codec 15 | media-core-codec 16 | 17 | 18 | 19 | org.restcomm.media.core 20 | media-core-spi 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | g711 27 | gsm 28 | g729 29 | l16 30 | ilbc 31 | opus 32 | 33 | -------------------------------------------------------------------------------- /component/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /concurrent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-concurrent 15 | media-core-concurrent 16 | 17 | 18 | 19 | 20 | org.apache.maven.plugins 21 | maven-compiler-plugin 22 | 23 | 24 | ${project.artifactId}-${project.version} 25 | 26 | -------------------------------------------------------------------------------- /control/mgcp/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /.settings 3 | /.classpath 4 | /.project 5 | 6 | -------------------------------------------------------------------------------- /control/mgcp/src/main/assemble/descriptor.xml: -------------------------------------------------------------------------------- 1 | 2 | mgcp-controller-service.sar 3 | 4 | 5 | src/main/config 6 | / 7 | 8 | 9 | 10 | 11 | /lib 12 | false 13 | runtime 14 | 15 | jain:jain-mgcp-ri 16 | 17 | org.mobicents.jain:mobicents-mgcp-impl 18 | 19 | 20 | org.mobicents.servers.media:mms-controllers-mgcp 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /control/mgcp/src/main/config/META-INF/jboss-structure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/command/MgcpCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.command; 23 | 24 | import java.util.concurrent.Callable; 25 | 26 | /** 27 | * Represents an MGCP action that can be executed. 28 | * 29 | * @author Henrique Rosa (henrique.rosa@telestax.com) 30 | * 31 | */ 32 | public interface MgcpCommand extends Callable { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/command/MgcpCommandParameterType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.command; 23 | 24 | /** 25 | * @author Henrique Rosa (henrique.rosa@telestax.com) 26 | * 27 | */ 28 | public enum MgcpCommandParameterType { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/connection/MgcpConnectionState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.connection; 23 | 24 | /** 25 | * Enumeration of possible MGCP connection states. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum MgcpConnectionState { 31 | 32 | CLOSED, HALF_OPEN, OPEN; 33 | } 34 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/controller/fsm/MgcpControllerEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.controller.fsm; 23 | 24 | /** 25 | * Events that trigger state transition in {@link MgcpControllerFsm}. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum MgcpControllerEvent { 31 | 32 | ACTIVATE, CHANNEL_OPENED, CHANNEL_BOUND, DEACTIVATE, DEACTIVATED 33 | 34 | } 35 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/controller/fsm/transition/MgcpControllerTransitionContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.controller.fsm.transition; 23 | 24 | /** 25 | * 26 | * @author Henrique Rosa (henrique.rosa@telestax.com) 27 | * 28 | */ 29 | public interface MgcpControllerTransitionContext { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/endpoint/MgcpEndpointState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.endpoint; 23 | 24 | /** 25 | * List of possible states of an MGCP Endpoint. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum MgcpEndpointState { 31 | 32 | ACTIVE, INACTIVE; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/message/MgcpRequestType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.message; 23 | 24 | /** 25 | * Types of MGCP messages. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum MgcpRequestType { 31 | 32 | CRCX, MDCX, DLCX, RQNT, AUCX, AUEP, NTFY; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/pkg/MgcpEventParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.pkg; 23 | 24 | /** 25 | * @author Henrique Rosa (henrique.rosa@telestax.com) 26 | * 27 | */ 28 | public interface MgcpEventParser { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/pkg/SignalType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.pkg; 23 | 24 | /** 25 | * @author Henrique Rosa (henrique.rosa@telestax.com) 26 | * 27 | */ 28 | public enum SignalType { 29 | 30 | ON_OFF("oo"), TIME_OUT("to"), BRIEF("br"); 31 | 32 | private final String label; 33 | 34 | private SignalType(String label) { 35 | this.label = label; 36 | } 37 | 38 | public String label() { 39 | return label; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/pkg/au/asr/AsrEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.pkg.au.asr; 23 | 24 | /** 25 | * @author anikiforov 26 | */ 27 | public enum AsrEvent { 28 | 29 | PROMPT, NO_PROMPT, NEXT_TRACK, END_PROMPT, END_INPUT, DTMF_TONE, WAITING_FOR_RESPONSE_TIMEOUT, EVALUATE, TIMEOUT, CANCEL, PLAY_SUCCESS, PLAY_FAILURE, SUCCEED, FAIL, NO_RECOGNIZED_TEXT, PATTERN_MISMATCH, RECOGNIZED_TEXT, DRIVER_ERROR, END_INPUT_WITHOUT_WAITING_FOR_RESPONSE; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/pkg/au/asr/AsrState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.pkg.au.asr; 23 | 24 | /** 25 | * @author anikiforov 26 | */ 27 | public enum AsrState { 28 | 29 | PLAY_COLLECT, PLAY, LOADING_PLAYLIST, PROMPTING, PROMPTED, COLLECT, COLLECTING, COLLECTED, WAITING_FOR_RESPONSE, CANCELED, EVALUATING, SUCCEEDING, PLAYING_SUCCESS, SUCCEEDED, FAILING, PLAYING_FAILURE, FAILED; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /control/mgcp/src/main/java/org/restcomm/media/core/control/mgcp/transaction/MgcpTransactionState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.control.mgcp.transaction; 23 | 24 | /** 25 | * Possible states of an MGCP Transaction. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum MgcpTransactionState { 31 | 32 | IDLE, EXECUTING_REQUEST, WAITING_RESPONSE, COMPLETED 33 | 34 | } 35 | -------------------------------------------------------------------------------- /control/mgcp/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | status=error 2 | dest=err 3 | name=PropertiesConfig 4 | 5 | filter.threshold.type=ThresholdFilter 6 | filter.threshold.level=debug 7 | 8 | appender.console.type=Console 9 | appender.console.name=console 10 | appender.console.layout.type=PatternLayout 11 | appender.console.layout.pattern=%d %-5p [%c] %m%n 12 | 13 | rootLogger.level=info 14 | rootLogger.appenderRef.console.ref=console 15 | 16 | logger.media.name=org.restcomm.media 17 | logger.media.level=info 18 | logger.media.additivity=false 19 | logger.media.appenderRef.console.ref=console 20 | 21 | logger.mgcp.name=org.restcomm.media.control.mgcp 22 | logger.mgcp.level=info 23 | logger.mgcp.additivity=false 24 | logger.mgcp.appenderRef.console.ref=console 25 | 26 | -------------------------------------------------------------------------------- /control/mgcp/src/test/resources/mgcp-conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /control/mgcp/src/test/resources/sdp/basic-sdp.txt: -------------------------------------------------------------------------------- 1 | v=0 2 | o=example 1450021652720 1450021652720 IN IP4 127.0.0.1 3 | s=sip call 4 | c=IN IP4 127.0.0.1 5 | t=0 0 6 | m=audio 65000 RTP/AVP 8 18 7 | a=ptime:20 8 | a=fmtp:18 annexb=no -------------------------------------------------------------------------------- /control/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-control 15 | media-core-control 16 | 17 | 18 | mgcp 19 | 20 | 21 | -------------------------------------------------------------------------------- /driver/asr-driver/asr-driver-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core.driver 9 | media-core-driver-asr 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.driver.asr 14 | media-core-driver-asr-api 15 | media-core-driver-asr-api 16 | 17 | 18 | 19 | 20 | org.apache.maven.plugins 21 | maven-compiler-plugin 22 | 23 | 24 | ${project.artifactId}-${project.version} 25 | 26 | -------------------------------------------------------------------------------- /driver/asr-driver/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-driver 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.driver 14 | media-core-driver-asr 15 | media-core-driver-asr 16 | 17 | 18 | asr-driver-api 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 27 | 28 | ${project.artifactId}-${project.version} 29 | 30 | -------------------------------------------------------------------------------- /driver/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-driver 15 | media-core-driver 16 | 17 | 18 | asr-driver 19 | 20 | -------------------------------------------------------------------------------- /ice/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-ice 15 | media-core-ice 16 | 17 | 18 | 19 | org.restcomm.media.core 20 | media-core-stun 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.apache.maven.plugins 29 | maven-compiler-plugin 30 | 31 | 32 | ${project.artifactId}-${project.version} 33 | 34 | -------------------------------------------------------------------------------- /ice/src/main/java/org/restcomm/media/core/ice/CandidateWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.ice; 22 | 23 | /** 24 | * Wraps an {@link IceCandidate}. 25 | * @author Henrique Rosa 26 | * 27 | */ 28 | public interface CandidateWrapper { 29 | 30 | IceCandidate getCandidate(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ice/src/main/java/org/restcomm/media/core/ice/IceException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.ice; 22 | 23 | /** 24 | * 25 | * @author Henrique Rosa 26 | * 27 | */ 28 | public class IceException extends Exception { 29 | 30 | private static final long serialVersionUID = -4740400846650381855L; 31 | 32 | public IceException() { 33 | super(); 34 | } 35 | 36 | public IceException(String message, Throwable cause) { 37 | super(message, cause); 38 | } 39 | 40 | public IceException(String message) { 41 | super(message); 42 | } 43 | 44 | public IceException(Throwable cause) { 45 | super(cause); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /ice/src/main/java/org/restcomm/media/core/ice/events/IceEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.ice.events; 22 | 23 | /** 24 | * Listens for ICE-related events. 25 | * 26 | * @author Henrique Rosa 27 | * 28 | */ 29 | public interface IceEventListener { 30 | 31 | /** 32 | * Event caught when all possible candidate pairs have been selected for an 33 | * ICE Agent. 34 | * 35 | * @param event 36 | * The event data 37 | */ 38 | void onSelectedCandidates(SelectedCandidatesEvent event); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /ice/src/main/java/org/restcomm/media/core/ice/network/ProtocolHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.ice.network; 22 | 23 | import java.io.IOException; 24 | import java.nio.channels.SelectionKey; 25 | 26 | /** 27 | * 28 | * @author Henrique Rosa 29 | * 30 | */ 31 | public interface ProtocolHandler { 32 | 33 | String getProtocol(); 34 | 35 | byte[] process(SelectionKey key, byte[] data, int length) throws IOException; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /ice/src/main/java/org/restcomm/media/core/ice/network/stun/StunListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.ice.network.stun; 22 | 23 | /** 24 | * 25 | * @author Henrique Rosa (henrique.rosa@telestax.com) 26 | * 27 | */ 28 | public interface StunListener { 29 | 30 | void onBinding(BindingSuccessEvent key); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ice/src/test/resources/org/restcomm/media/core/ice/sdp/sdp_vanilla_answer.txt: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 1389657909416 1 IN IP4 127.0.0.1 3 | s=Mobicents Media Server 4 | c=IN IP4 127.0.0.1 5 | t=0 0 6 | m=audio 6000 RTP/SAVPF 0 126 7 | c=IN IP4 127.0.0.1 8 | a=rtcp-mux 9 | a=rtpmap:0 PCMU/8000 10 | a=setup:passive 11 | a=rtpmap:126 telephone-event/0 12 | a=fmtp:126 0-15 13 | a=setup:passive 14 | a=fingerprint:sha-256 28:D5:4A:00:0E:4A:53:F9:DC:57:67:17:49:BC:E2:85:24:A3:52:70:99:76:48:B8:72:11:BB:DF:14:A7:4D:3B 15 | a=mid:audio 16 | m=video 0 RTP/SAVPF 100 116 117 17 | m=application 0 RTP/SAVPF 101 -------------------------------------------------------------------------------- /network/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /target 3 | -------------------------------------------------------------------------------- /network/src/main/java/org/restcomm/media/core/network/api/NetworkChannel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.network.api; 23 | 24 | /** 25 | * Network channel that supports both synchronous and asynchronous API. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public interface NetworkChannel extends SynchronousNetworkChannel, AsynchronousNetworkChannel { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /network/src/main/java/org/restcomm/media/core/network/deprecated/netty/NetworkChannel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.network.deprecated.netty; 23 | 24 | /** 25 | * @author Henrique Rosa (henrique.rosa@telestax.com) 26 | * 27 | */ 28 | public interface NetworkChannel { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /network/src/main/java/org/restcomm/media/core/network/netty/channel/NettyNetworkChannelEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.network.netty.channel; 23 | 24 | /** 25 | * Valid events for {@link AsyncNettyNetworkChannel}. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum NettyNetworkChannelEvent { 31 | 32 | OPEN, OPENED, BIND, BOUND, CONNECT, CONNECTED, DISCONNECT, DISCONNECTED, CLOSE, CLOSED; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /network/src/test/java/org/restcomm/media/core/network/deprecated/channel/HighPriorityPacketHandlerMock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.network.deprecated.channel; 22 | 23 | 24 | /** 25 | * A mock of the Packet Handler 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public class HighPriorityPacketHandlerMock extends PacketHandlerMock { 31 | 32 | protected static final int PRIORITY = 5; 33 | protected static final String DATA = "high"; 34 | 35 | 36 | public HighPriorityPacketHandlerMock() { 37 | super(PRIORITY, DATA); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /network/src/test/java/org/restcomm/media/core/network/deprecated/channel/LowPriorityPacketHandlerMock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.network.deprecated.channel; 22 | 23 | 24 | /** 25 | * A mock of the Packet Handler 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public class LowPriorityPacketHandlerMock extends PacketHandlerMock { 31 | 32 | protected static final int PRIORITY = 1; 33 | protected static final String DATA = "low"; 34 | 35 | 36 | public LowPriorityPacketHandlerMock() { 37 | super(PRIORITY, DATA); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /network/src/test/java/org/restcomm/media/core/network/deprecated/channel/MediumPriorityPacketHandlerMock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.network.deprecated.channel; 22 | 23 | 24 | /** 25 | * A mock of the Packet Handler 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public class MediumPriorityPacketHandlerMock extends PacketHandlerMock { 31 | 32 | protected static final int PRIORITY = 3; 33 | protected static final String DATA = "medium"; 34 | 35 | 36 | public MediumPriorityPacketHandlerMock() { 37 | super(PRIORITY, DATA); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /pcap/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | status=error 2 | dest=err 3 | name=PropertiesConfig 4 | 5 | filter.threshold.type=ThresholdFilter 6 | filter.threshold.level=debug 7 | 8 | appender.console.type=Console 9 | appender.console.name=console 10 | appender.console.layout.type=PatternLayout 11 | appender.console.layout.pattern=%d %-5p [%c] %m%n 12 | 13 | rootLogger.level=info 14 | rootLogger.appenderRef.console.ref=console 15 | 16 | logger.media.name=org.restcomm.media 17 | logger.media.level=info 18 | logger.media.additivity=false 19 | logger.media.appenderRef.console.ref=console 20 | 21 | logger.pcap.name=org.restcomm.media.pcap 22 | logger.pcap.level=info 23 | logger.pcap.additivity=false 24 | logger.pcap.appenderRef.console.ref=console 25 | -------------------------------------------------------------------------------- /pcap/src/test/resources/pcap/dtmf-oob-one-hash.cap.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/pcap/src/test/resources/pcap/dtmf-oob-one-hash.cap.gz -------------------------------------------------------------------------------- /pcap/src/test/resources/pcap/dtmf-oob-two-hash.cap.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/pcap/src/test/resources/pcap/dtmf-oob-two-hash.cap.gz -------------------------------------------------------------------------------- /pcap/src/test/resources/pcap/gigaset-n510-ip-pro-rfc2833.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/pcap/src/test/resources/pcap/gigaset-n510-ip-pro-rfc2833.pcap -------------------------------------------------------------------------------- /resource/dtmf/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /.settings 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /resource/dtmf/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-resource 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.resource 14 | media-core-resource-dtmf 15 | media-core-resource-dtmf 16 | 17 | 18 | 19 | 20 | org.restcomm.media.core 21 | media-core-pcap 22 | ${project.version} 23 | test 24 | 25 | 26 | 27 | 28 | 29 | 30 | org.apache.maven.plugins 31 | maven-compiler-plugin 32 | 33 | 34 | ${project.artifactId}-${project.version} 35 | 36 | 37 | -------------------------------------------------------------------------------- /resource/dtmf/src/main/java/org/restcomm/media/core/resource/dtmf/detector/DtmfDetectorProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2018, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.resource.dtmf.detector; 23 | 24 | /** 25 | * Provides instances of {@link DtmfDetector} 26 | * 27 | * @author Vladimir Morosev (vladimir.morosev@telestax.com) created on 09/03/2018 28 | */ 29 | public interface DtmfDetectorProvider { 30 | 31 | DtmfDetector provide(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /resource/dtmf/src/main/java/org/restcomm/media/core/resource/dtmf/detector/DtmfEventObserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2018, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.resource.dtmf.detector; 23 | 24 | /** 25 | * Interface implemented by classes that observe DTMF tone event. 26 | * 27 | * @author Vladimir Morosev (vladimir.morosev@telestax.com) 28 | */ 29 | public interface DtmfEventObserver { 30 | void onDtmfEvent(DtmfEvent event); 31 | } 32 | -------------------------------------------------------------------------------- /resource/dtmf/src/main/java/org/restcomm/media/core/resource/dtmf/detector/DtmfEventSubject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2018, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.resource.dtmf.detector; 23 | 24 | /** 25 | * Subject interface for DTMF events. 26 | * 27 | * @author Vladimir Morosev (vladimir.morosev@telestax.com) 28 | */ 29 | public interface DtmfEventSubject { 30 | 31 | void notify(DtmfEvent event); 32 | void observe(DtmfEventObserver observer); 33 | void forget(DtmfEventObserver observer); 34 | } 35 | -------------------------------------------------------------------------------- /resource/dtmf/src/main/java/org/restcomm/media/core/resource/dtmf/detector/InbandDtmfSink.java: -------------------------------------------------------------------------------- 1 | package org.restcomm.media.core.resource.dtmf.detector; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.restcomm.media.core.component.audio.AudioOutput; 6 | 7 | /** 8 | * @author Henrique Rosa (henrique.rosa@telestax.com) created on 09/04/2018 9 | */ 10 | public class InbandDtmfSink extends AbstractDtmfSink { 11 | 12 | private static final Logger log = LogManager.getLogger(InbandDtmfSink.class); 13 | 14 | private final AudioOutput output; 15 | 16 | public InbandDtmfSink(String name, DtmfDetector detector, AudioOutput output) { 17 | super(name, detector); 18 | this.output = output; 19 | this.output.join(this); 20 | } 21 | 22 | @Override 23 | protected Logger getLogger() { 24 | return log; 25 | } 26 | 27 | @Override 28 | public void activate() { 29 | this.output.start(); 30 | } 31 | 32 | @Override 33 | public void deactivate() { 34 | this.output.stop(); 35 | } 36 | 37 | public AudioOutput getOutput() { 38 | return this.output; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /resource/dtmf/src/main/java/org/restcomm/media/core/resource/dtmf/detector/Rfc2833DtmfSink.java: -------------------------------------------------------------------------------- 1 | package org.restcomm.media.core.resource.dtmf.detector; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.restcomm.media.core.component.oob.OOBOutput; 6 | 7 | /** 8 | * @author Henrique Rosa (henrique.rosa@telestax.com) created on 09/04/2018 9 | */ 10 | public class Rfc2833DtmfSink extends AbstractDtmfSink { 11 | 12 | private static final Logger log = LogManager.getLogger(Rfc2833DtmfSink.class); 13 | 14 | private final OOBOutput output; 15 | 16 | public Rfc2833DtmfSink(String name, DtmfDetector detector, OOBOutput output) { 17 | super(name, detector); 18 | this.output = output; 19 | this.output.join(this); 20 | } 21 | 22 | @Override 23 | protected Logger getLogger() { 24 | return log; 25 | } 26 | 27 | @Override 28 | public void activate() { 29 | this.output.start(); 30 | } 31 | 32 | @Override 33 | public void deactivate() { 34 | this.output.stop(); 35 | } 36 | 37 | public OOBOutput getOutput() { 38 | return this.output; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /resource/dtmf/src/main/resources/speech.properties: -------------------------------------------------------------------------------- 1 | # Copyright 2001 Sun Microsystems, Inc. 2 | # All Rights Reserved. Use is subject to license terms. 3 | # 4 | # See the file "license.terms" for information on usage and 5 | # redistribution of this file, and for a DISCLAIMER OF ALL 6 | # WARRANTIES. 7 | # 8 | 9 | # Modify this accordingly... 10 | # 11 | #TextSynthEngineCentral=com.sun.speech.engine.synthesis.text.TextEngineCentral 12 | # 13 | FreeTTSSynthEngineCentral=com.sun.speech.freetts.jsapi.FreeTTSEngineCentral 14 | -------------------------------------------------------------------------------- /resource/dtmf/src/test/resources/dtmf_rfc2833_2_digit_pairs.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/resource/dtmf/src/test/resources/dtmf_rfc2833_2_digit_pairs.pcap -------------------------------------------------------------------------------- /resource/dtmf/src/test/resources/dtmf_rfc2833_4_digits_fast.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/resource/dtmf/src/test/resources/dtmf_rfc2833_4_digits_fast.pcap -------------------------------------------------------------------------------- /resource/dtmf/src/test/resources/dtmf_rfc2833_4_digits_slow.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/resource/dtmf/src/test/resources/dtmf_rfc2833_4_digits_slow.pcap -------------------------------------------------------------------------------- /resource/dtmf/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | status=error 2 | dest=err 3 | name=PropertiesConfig 4 | 5 | filter.threshold.type=ThresholdFilter 6 | filter.threshold.level=debug 7 | 8 | appender.console.type=Console 9 | appender.console.name=console 10 | appender.console.layout.type=PatternLayout 11 | appender.console.layout.pattern=%d %-5p [%c] %m%n 12 | 13 | rootLogger.level=info 14 | rootLogger.appenderRef.console.ref=console 15 | 16 | logger.media.name=org.restcomm.media 17 | logger.media.level=info 18 | logger.media.additivity=false 19 | logger.media.appenderRef.console.ref=console 20 | 21 | logger.rtp.name=org.restcomm.media.rtp 22 | logger.rtp.level=debug 23 | logger.rtp.additivity=false 24 | logger.rtp.appenderRef.console.ref=console 25 | 26 | logger.dtmf.name=org.restcomm.media.resource.dtmf 27 | logger.dtmf.level=debug 28 | logger.dtmf.additivity=false 29 | logger.dtmf.appenderRef.console.ref=console 30 | 31 | -------------------------------------------------------------------------------- /resource/media-player/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /resource/media-player/src/main/java/org/restcomm/media/core/resource/player/audio/DirectRemoteStreamProvider.java: -------------------------------------------------------------------------------- 1 | package org.restcomm.media.core.resource.player.audio; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.net.URL; 6 | import java.net.URLConnection; 7 | 8 | /** 9 | * Created by achikin on 6/7/16. 10 | */ 11 | public class DirectRemoteStreamProvider implements RemoteStreamProvider { 12 | 13 | private final int connectionTimeout; 14 | 15 | public DirectRemoteStreamProvider() { 16 | this(2000); 17 | } 18 | 19 | public DirectRemoteStreamProvider(int connectionTimeout) { 20 | this.connectionTimeout = connectionTimeout; 21 | } 22 | 23 | @Override 24 | public InputStream getStream(URL uri) throws IOException { 25 | URLConnection connection = uri.openConnection(); 26 | connection.setConnectTimeout(connectionTimeout); 27 | connection.setReadTimeout(connectionTimeout); 28 | return connection.getInputStream(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /resource/media-player/src/main/java/org/restcomm/media/core/resource/player/audio/RemoteStreamProvider.java: -------------------------------------------------------------------------------- 1 | package org.restcomm.media.core.resource.player.audio; 2 | import java.io.IOException; 3 | import java.io.InputStream; 4 | import java.net.URL; 5 | 6 | /** 7 | * Created by achikin on 5/9/16. 8 | */ 9 | public interface RemoteStreamProvider { 10 | InputStream getStream(URL uri) throws IOException; 11 | } 12 | -------------------------------------------------------------------------------- /resource/media-player/src/main/resources/speech.properties: -------------------------------------------------------------------------------- 1 | # Copyright 2001 Sun Microsystems, Inc. 2 | # All Rights Reserved. Use is subject to license terms. 3 | # 4 | # See the file "license.terms" for information on usage and 5 | # redistribution of this file, and for a DISCLAIMER OF ALL 6 | # WARRANTIES. 7 | # 8 | 9 | # Modify this accordingly... 10 | # 11 | #TextSynthEngineCentral=com.sun.speech.engine.synthesis.text.TextEngineCentral 12 | # 13 | FreeTTSSynthEngineCentral=com.sun.speech.freetts.jsapi.FreeTTSEngineCentral 14 | -------------------------------------------------------------------------------- /resource/media-player/src/test/resources/demo-prompt.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/resource/media-player/src/test/resources/demo-prompt.wav -------------------------------------------------------------------------------- /resource/media-recorder/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /resource/media-recorder/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media.core 9 | media-core-resource 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core.resource 14 | media-core-resource-recorder 15 | media-core-resource-recorder 16 | 17 | 18 | 19 | org.restcomm.media.core.resource 20 | media-core-resource-vad 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.apache.maven.plugins 29 | maven-compiler-plugin 30 | 31 | 32 | ${project.artifactId}-${project.version} 33 | 34 | -------------------------------------------------------------------------------- /resource/media-recorder/src/main/resources/speech.properties: -------------------------------------------------------------------------------- 1 | # Copyright 2001 Sun Microsystems, Inc. 2 | # All Rights Reserved. Use is subject to license terms. 3 | # 4 | # See the file "license.terms" for information on usage and 5 | # redistribution of this file, and for a DISCLAIMER OF ALL 6 | # WARRANTIES. 7 | # 8 | 9 | # Modify this accordingly... 10 | # 11 | #TextSynthEngineCentral=com.sun.speech.engine.synthesis.text.TextEngineCentral 12 | # 13 | FreeTTSSynthEngineCentral=com.sun.speech.freetts.jsapi.FreeTTSEngineCentral 14 | -------------------------------------------------------------------------------- /resource/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | pom 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-resource 15 | media-core-resource 16 | 17 | 18 | 19 | org.restcomm.media.core 20 | media-core-component 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | dtmf 27 | media-player 28 | media-recorder 29 | vad 30 | 31 | 32 | -------------------------------------------------------------------------------- /resource/vad/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /.settings 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /resource/vad/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | org.restcomm.media.core 8 | media-core-resource 9 | 8.2.0-SNAPSHOT 10 | 11 | 12 | org.restcomm.media.core.resource 13 | media-core-resource-vad 14 | media-core-resource-vad 15 | 16 | 17 | 18 | 19 | org.apache.maven.plugins 20 | maven-compiler-plugin 21 | 22 | 23 | ${project.artifactId}-${project.version} 24 | 25 | 26 | -------------------------------------------------------------------------------- /resource/vad/src/main/java/org/restcomm/media/core/resource/vad/VoiceActivityDetectorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.resource.vad; 23 | 24 | /** 25 | * Listener that is notified about events raised by {@link VoiceActivityDetector}. 26 | * 27 | * @author anikiforov 28 | * 29 | */ 30 | public interface VoiceActivityDetectorListener { 31 | 32 | /** 33 | * Event raised when user speech is detected. 34 | */ 35 | void onVoiceActivityDetected(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /resource/vad/src/main/java/org/restcomm/media/core/resource/vad/VoiceActivityDetectorProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2018, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.resource.vad; 23 | 24 | /** 25 | * Provides instances of {@link VoiceActivityDetector} 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) created on 15/02/2018 28 | */ 29 | public interface VoiceActivityDetectorProvider { 30 | 31 | VoiceActivityDetector provide(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /rtp/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtcp/RtcpPacketType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.rtcp; 22 | 23 | public enum RtcpPacketType { 24 | 25 | RTCP_REPORT, RTCP_BYE; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtcp/XSRandom.java: -------------------------------------------------------------------------------- 1 | package org.restcomm.media.core.rtcp; 2 | 3 | import java.util.Random; 4 | 5 | public class XSRandom extends Random { 6 | 7 | private static final long serialVersionUID = -668678943206857357L; 8 | 9 | private long seed; 10 | 11 | public XSRandom() { 12 | this.seed = System.nanoTime(); 13 | } 14 | 15 | /** 16 | * Implementation of George Marsaglia's elegant Xorshift random generator 17 | * 30% faster and better quality than the built-in {@link Random} 18 | */ 19 | @Override 20 | protected int next(int nbits) { 21 | long x = this.seed; 22 | x ^= (x << 21); 23 | x ^= (x >>> 35); 24 | x ^= (x << 4); 25 | this.seed = x; 26 | x &= ((1L << nbits) - 1); 27 | return (int) x; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/BufferListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.rtp; 24 | 25 | /** 26 | * 27 | * @author kulikov 28 | */ 29 | public interface BufferListener { 30 | public void onFill(); 31 | } 32 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/RTPChannelListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.rtp; 22 | 23 | /** 24 | * 25 | * @author kulikov 26 | */ 27 | @Deprecated 28 | public interface RTPChannelListener { 29 | public void onRtpFailure(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/crypto/TransformEngine.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Code derived and adapted from the Jitsi client side SRTP framework. 4 | * 5 | * Distributed under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | package org.restcomm.media.core.rtp.crypto; 9 | 10 | /** 11 | * Defines how to get PacketTransformers for RTP and RTCP packets. A 12 | * single PacketTransformer can be used for both RTP and RTCP packets 13 | * or there can be two separate PacketTransformers. 14 | * 15 | * @author Bing SU (nova.su@gmail.com) 16 | */ 17 | public interface TransformEngine 18 | { 19 | /** 20 | * Gets the PacketTransformer for RTP packets. 21 | * 22 | * @return the PacketTransformer for RTP packets 23 | */ 24 | public PacketTransformer getRTPTransformer(); 25 | 26 | /** 27 | * Gets the PacketTransformer for RTCP packets. 28 | * 29 | * @return the PacketTransformer for RTCP packets 30 | */ 31 | public PacketTransformer getRTCPTransformer(); 32 | } 33 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/netty/RtpInboundHandlerEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.rtp.netty; 23 | 24 | /** 25 | * Set of valid events that can happen during lifetime of an {@link RtpInboundHandler}. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum RtpInboundHandlerEvent { 31 | 32 | ACTIVATE, PACKET_RECEIVED, DEACTIVATE; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/netty/RtpInboundHandlerState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.rtp.netty; 23 | 24 | /** 25 | * Set of states that form the {@link RtpInboundHandler} finite state machine. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public enum RtpInboundHandlerState { 31 | 32 | ACTIVATED, DEACTIVATED; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/netty/RtpInboundHandlerTransactionContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2017, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.rtp.netty; 23 | 24 | /** 25 | * @author Henrique Rosa (henrique.rosa@telestax.com) 26 | * 27 | */ 28 | public interface RtpInboundHandlerTransactionContext { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/sdp/RtcpMuxField.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.rtp.sdp; 22 | 23 | import org.restcomm.media.core.spi.utils.Text; 24 | 25 | /** 26 | * Represents the SDP rtcp-mux attribute field 27 | * 28 | * @author Henrique Rosa (henrique.rosa@telestax.com) 29 | * 30 | * @deprecated use new /io/sdp library 31 | */ 32 | public class RtcpMuxField { 33 | 34 | public static final Text RTCP_MUX_FIELD = new Text("a=rtcp-mux"); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /rtp/src/main/java/org/restcomm/media/core/rtp/secure/DtlsListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.rtp.secure; 22 | 23 | /** 24 | * Listens to DTLS-related events. 25 | * 26 | * @author Henrique Rosa 27 | * 28 | */ 29 | public interface DtlsListener { 30 | 31 | void onDtlsHandshakeComplete(); 32 | 33 | void onDtlsHandshakeFailed(Throwable e); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /rtp/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | status=error 2 | dest=err 3 | name=PropertiesConfig 4 | 5 | filter.threshold.type=ThresholdFilter 6 | filter.threshold.level=debug 7 | 8 | appender.console.type=Console 9 | appender.console.name=console 10 | appender.console.layout.type=PatternLayout 11 | appender.console.layout.pattern=%d %-5p [%c] %m%n 12 | 13 | rootLogger.level=info 14 | rootLogger.appenderRef.console.ref=console 15 | 16 | logger.media.name=org.restcomm.media 17 | logger.media.level=debug 18 | logger.media.additivity=false 19 | logger.media.appenderRef.console.ref=console 20 | 21 | logger.rtp.name=org.restcomm.media.rtp 22 | logger.rtp.level=debug 23 | logger.rtp.additivity=false 24 | logger.rtp.appenderRef.console.ref=console 25 | 26 | logger.rtcp.name=org.restcomm.media.rtcp 27 | logger.rtcp.level=debug 28 | logger.rtcp.additivity=false 29 | logger.rtcp.appenderRef.console.ref=console 30 | 31 | logger.pcap.name=org.restcomm.media.pcap 32 | logger.pcap.level=info 33 | logger.pcap.additivity=false 34 | logger.pcap.appenderRef.console.ref=console 35 | -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/netty/dtls-packet.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/netty/dtls-packet.pcap -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/netty/mgcp-packet.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/netty/mgcp-packet.pcap -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/netty/rtcp-packet.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/netty/rtcp-packet.pcap -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/netty/rtp-packet.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/netty/rtp-packet.pcap -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/netty/stun-packet.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/netty/stun-packet.pcap -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/cisco-spa-525G2-zendesk34432.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/cisco-spa-525G2-zendesk34432.pcap -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/dtmf-oob-one-hash.cap.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/dtmf-oob-one-hash.cap.gz -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/dtmf-oob-two-hash.cap.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/dtmf-oob-two-hash.cap.gz -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/gigaset-n510-ip-pro-rfc2833.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/gigaset-n510-ip-pro-rfc2833.pcap -------------------------------------------------------------------------------- /rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/zendesk-34401-rfc2833.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RestComm/media-core/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/test/resources/org/restcomm/media/core/rtp/rfc2833/zendesk-34401-rfc2833.pcap -------------------------------------------------------------------------------- /scheduler/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /scheduler/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-scheduler 15 | media-core-scheduler 16 | 17 | 18 | 19 | 20 | org.restcomm.media.core 21 | media-core-concurrent 22 | ${project.version} 23 | 24 | 25 | 26 | 27 | 28 | 29 | org.apache.maven.plugins 30 | maven-compiler-plugin 31 | 32 | 33 | ${project.artifactId}-${project.version} 34 | 35 | -------------------------------------------------------------------------------- /sdp/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | org.restcomm.media 8 | media-core 9 | 8.2.0-SNAPSHOT 10 | 11 | 12 | org.restcomm.media.core 13 | media-core-sdp 14 | media-core-sdp 15 | 16 | 17 | 18 | org.restcomm.media.core 19 | media-core-spi 20 | ${project.version} 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.apache.maven.plugins 28 | maven-compiler-plugin 29 | 30 | 31 | ${project.artifactId}-${project.version} 32 | 33 | -------------------------------------------------------------------------------- /sdp/src/main/java/org/restcomm/media/core/sdp/SdpField.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.sdp; 22 | 23 | /** 24 | * 25 | * @author Henrique Rosa (henrique.rosa@telestax.com) 26 | * 27 | */ 28 | public interface SdpField { 29 | 30 | static final String FIELD_SEPARATOR = "="; 31 | 32 | /** 33 | * Gets the type of the field 34 | * 35 | * @return the char that represents the field 36 | */ 37 | char getFieldType(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /sdp/src/main/java/org/restcomm/media/core/sdp/SessionDescriptionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.sdp; 22 | 23 | /** 24 | * Factory that produces {@link SessionDescription}. 25 | * 26 | * @author Henrique Rosa (henrique.rosa@telestax.com) 27 | * 28 | */ 29 | public class SessionDescriptionFactory { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /sdp/src/main/java/org/restcomm/media/core/sdp/attributes/AbstractConnectionModeAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2014, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * under the terms of the GNU Affero General Public License as 8 | * published by the Free Software Foundation; either version 3 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Affero General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Affero General Public License 17 | * along with this program. If not, see 18 | * 19 | */ 20 | 21 | package org.restcomm.media.core.sdp.attributes; 22 | 23 | import org.restcomm.media.core.sdp.fields.AttributeField; 24 | 25 | /** 26 | * Fake attribute that gathers recvonly, sendonly, sendrecv. 27 | * 28 | * @author Henrique Rosa (henrique.rosa@telestax.com) 29 | * 30 | */ 31 | public abstract class AbstractConnectionModeAttribute extends AttributeField { 32 | 33 | protected AbstractConnectionModeAttribute(String mode) { 34 | super(mode); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /sdp/src/test/resources/org/restcomm/media/core/sdp/android-sdk-offer.txt: -------------------------------------------------------------------------------- 1 | v=0 2 | o=doubango 1983 678901 IN IP4 85.240.134.182 3 | s=- 4 | c=IN IP4 85.240.134.182 5 | t=0 0 6 | a=tcap:1 RTP/AVPF 7 | m=audio 64826 RTP/AVP 8 0 101 8 | a=ptime:20 9 | a=silenceSupp:off - - - - 10 | a=rtpmap:8 PCMA/8000/1 11 | a=rtpmap:0 PCMU/8000/1 12 | a=rtpmap:101 telephone-event/8000/1 13 | a=fmtp:101 0-16 14 | a=pcfg:1 t=1 15 | a=sendrecv 16 | a=rtcp-mux 17 | a=ssrc:358658856 cname:doubango@365226042 18 | a=ssrc:358658856 mslabel:6994f7d1-6ce9-4fbd-acfd-84e5131ca2e2 19 | a=ssrc:358658856 label:doubango@audio -------------------------------------------------------------------------------- /sdp/src/test/resources/org/restcomm/media/core/sdp/tlc-scb.txt: -------------------------------------------------------------------------------- 1 | v=0 2 | o=sbc-SMART-01a 1450021652720 1450021652720 IN IP4 203.87.254.164 3 | s=sip call 4 | c=IN IP4 203.87.254.172 5 | t=0 0 6 | m=audio 38832 RTP/AVP 8 18 7 | a=ptime:20 8 | a=fmtp:18 annexb=no -------------------------------------------------------------------------------- /spi/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /spi/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | org.restcomm.media 8 | media-core 9 | 8.2.0-SNAPSHOT 10 | 11 | 12 | org.restcomm.media.core 13 | media-core-spi 14 | media-core-spi 15 | 16 | 17 | 18 | 19 | org.restcomm.media.core 20 | media-core-scheduler 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.apache.maven.plugins 29 | maven-compiler-plugin 30 | 31 | 32 | ${project.artifactId}-${project.version} 33 | 34 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/ConnectionFailureListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi; 24 | 25 | /** 26 | * 27 | * @author kulikov 28 | */ 29 | public interface ConnectionFailureListener { 30 | 31 | public void onFailure(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/ConnectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi; 24 | 25 | import org.restcomm.media.core.spi.listener.Listener; 26 | 27 | /** 28 | * 29 | * @author kulikov 30 | */ 31 | public interface ConnectionListener extends Listener { 32 | } 33 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/ConnectionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi; 24 | 25 | /** 26 | * Defines transport types for connection. 27 | * 28 | * @author kulikov 29 | */ 30 | public enum ConnectionType { 31 | LOCAL, 32 | RTP; 33 | } 34 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/ControlProtocol.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.spi; 23 | 24 | /** 25 | * Enumerates lists of supported control protocols. 26 | * @author Henrique Rosa (henrique.rosa@telestax.com) 27 | * 28 | */ 29 | public enum ControlProtocol { 30 | 31 | MGPC 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/EndpointState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi; 24 | 25 | /** 26 | * 27 | * @author kulikov 28 | */ 29 | public enum EndpointState { 30 | BLOCKED, READY, BUSY 31 | } 32 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/MultimediaSink.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi; 24 | 25 | import java.util.Collection; 26 | 27 | /** 28 | * 29 | * @author kulikov 30 | */ 31 | public interface MultimediaSink { 32 | public Collection getMediaTypes(); 33 | public MediaSink getMediaSink(MediaType media); 34 | } 35 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/ResourceGroup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi; 24 | 25 | import java.util.Collection; 26 | 27 | /** 28 | * 29 | * @author kulikov 30 | */ 31 | public interface ResourceGroup extends Component { 32 | public Collection getMediaTypes(); 33 | public MediaSink getSink(MediaType media); 34 | public MediaSource getSource(MediaType media); 35 | } 36 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/clock/Timer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.clock; 24 | 25 | /** 26 | * 27 | * @author kulikov 28 | */ 29 | public interface Timer { 30 | /** 31 | * Gets the current time in nanoseconds 32 | * 33 | * @return the current time in nanoseconds 34 | */ 35 | public long getTimestamp(); 36 | } 37 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/dtmf/DtmfDetectorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.dtmf; 24 | 25 | import org.restcomm.media.core.spi.listener.Listener; 26 | 27 | /** 28 | * 29 | * @author kulikov 30 | */ 31 | @Deprecated 32 | public interface DtmfDetectorListener extends Listener { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/dtmf/DtmfDetectorProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.spi.dtmf; 23 | 24 | /** 25 | * Provides DTMF Detectors. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | @Deprecated 31 | public interface DtmfDetectorProvider { 32 | 33 | DtmfDetector provide(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/dtmf/DtmfGeneratorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.dtmf; 24 | 25 | import org.restcomm.media.core.spi.listener.Listener; 26 | 27 | /** 28 | * 29 | * @author quintana.thomas@gmail.com (Thomas Quintana) 30 | * @author Yulian Oifa 31 | */ 32 | public interface DtmfGeneratorListener extends Listener { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/format/ApplicationFormat.java: -------------------------------------------------------------------------------- 1 | package org.restcomm.media.core.spi.format; 2 | 3 | /** 4 | * Implementation of the application format 5 | * 6 | * @author Henrique Rosa 7 | * 8 | */ 9 | public class ApplicationFormat extends Format implements Cloneable { 10 | 11 | protected ApplicationFormat(EncodingName name) { 12 | super(name); 13 | } 14 | 15 | protected ApplicationFormat(String name) { 16 | super(new EncodingName(name)); 17 | } 18 | 19 | @Override 20 | public ApplicationFormat clone() { 21 | return new ApplicationFormat(getName().clone()); 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | StringBuilder builder = new StringBuilder(); 27 | builder.append("ApplicationFormat[").append(getName().toString()).append("]"); 28 | return builder.toString(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/listener/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.listener; 24 | 25 | /** 26 | * Generic event interface. 27 | * 28 | * @author kulikov 29 | */ 30 | public interface Event { 31 | public S getSource(); 32 | } 33 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/listener/Listener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.listener; 24 | 25 | /** 26 | * Generaic listener interface. 27 | * 28 | * @author kulikov 29 | */ 30 | public interface Listener { 31 | public void process(E event); 32 | } 33 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/player/PlayerListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.player; 24 | 25 | import org.restcomm.media.core.spi.listener.Listener; 26 | 27 | /** 28 | * 29 | * @author kulikov 30 | */ 31 | public interface PlayerListener extends Listener { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/player/PlayerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.spi.player; 23 | 24 | /** 25 | * Provides Players. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public interface PlayerProvider { 31 | 32 | Player provide(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/recorder/RecorderListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.recorder; 24 | 25 | import org.restcomm.media.core.spi.listener.Listener; 26 | 27 | /** 28 | * 29 | * @author kulikov 30 | */ 31 | public interface RecorderListener extends Listener { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/recorder/RecorderProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TeleStax, Open Source Cloud Communications 3 | * Copyright 2011-2016, Telestax Inc and individual contributors 4 | * by the @authors tag. 5 | * 6 | * This is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as 8 | * published by the Free Software Foundation; either version 2.1 of 9 | * the License, or (at your option) any later version. 10 | * 11 | * This software is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this software; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 20 | */ 21 | 22 | package org.restcomm.media.core.spi.recorder; 23 | 24 | /** 25 | * Provides media recorders. 26 | * 27 | * @author Henrique Rosa (henrique.rosa@telestax.com) 28 | * 29 | */ 30 | public interface RecorderProvider { 31 | 32 | Recorder provide(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/tone/ToneDetectorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.tone; 24 | 25 | import org.restcomm.media.core.spi.listener.Listener; 26 | 27 | /** 28 | * 29 | * @author Oifa Yulian 30 | */ 31 | public interface ToneDetectorListener extends Listener { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spi/src/main/java/org/restcomm/media/core/spi/tone/ToneEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * This is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This software is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this software; if not, write to the Free 19 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 | */ 22 | 23 | package org.restcomm.media.core.spi.tone; 24 | 25 | import org.restcomm.media.core.spi.listener.Event; 26 | 27 | /** 28 | * 29 | * @author Oifa Yulian 30 | */ 31 | public interface ToneEvent extends Event { 32 | public int getFrequency(); 33 | } -------------------------------------------------------------------------------- /stun/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | jar 6 | 7 | 8 | org.restcomm.media 9 | media-core 10 | 8.2.0-SNAPSHOT 11 | 12 | 13 | org.restcomm.media.core 14 | media-core-stun 15 | media-core-stun 16 | 17 | 18 | 19 | org.restcomm.media.core 20 | media-core-network 21 | ${project.version} 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.apache.maven.plugins 29 | maven-compiler-plugin 30 | 31 | 32 | ${project.artifactId}-${project.version} 33 | 34 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/StunIndication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages; 10 | 11 | /** 12 | * An indication descendant of the message class. 13 | * 14 | * For example, indication messages is used by TURN protocol to send and receive 15 | * encapsulated data. 16 | */ 17 | public class StunIndication extends StunMessage { 18 | 19 | public StunIndication() { 20 | super(); 21 | } 22 | 23 | /** 24 | * Checks whether indicationType is a valid indication type and if yes sets 25 | * it as the type of this instance. 26 | * 27 | * @param indicationType 28 | * the type to set 29 | * @throws IllegalArgumentException 30 | * if indicationType is not a valid indication type 31 | */ 32 | @Override 33 | public void setMessageType(char indicationType) 34 | throws IllegalArgumentException { 35 | /* 36 | * old TURN DATA indication type is an indication despite 0x0115 & 37 | * 0x0110 indicates STUN error response type 38 | */ 39 | if (!isIndicationType(indicationType) 40 | && indicationType != StunMessage.OLD_DATA_INDICATION) { 41 | throw new IllegalArgumentException((int) (indicationType) 42 | + " - is not a valid indication type."); 43 | } 44 | super.setMessageType(indicationType); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/StunRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages; 10 | 11 | /** 12 | * Represents a STUN Request message. 13 | */ 14 | public class StunRequest extends StunMessage { 15 | 16 | public StunRequest() { 17 | super(); 18 | } 19 | 20 | @Override 21 | public void setMessageType(char requestType) 22 | throws IllegalArgumentException { 23 | if (!isRequestType(requestType)) { 24 | throw new IllegalArgumentException((int) (requestType) 25 | + " - is not a valid request type."); 26 | } 27 | super.setMessageType(requestType); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/ChangedAddressAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | import org.restcomm.media.core.stun.messages.attributes.StunAttribute; 12 | 13 | /** 14 | * The CHANGED-ADDRESS attribute indicates the IP address and port where 15 | * responses would have been sent from if the "change IP" and "change port" 16 | * flags had been set in the CHANGE-REQUEST attribute of the Binding Request. 17 | *

18 | * The attribute is always present in a Binding Response, independent of the 19 | * value of the flags. Its syntax is identical to MAPPED-ADDRESS. 20 | *

21 | */ 22 | public class ChangedAddressAttribute extends AddressAttribute { 23 | 24 | public static final String NAME = "CHANGED-ADDRESS"; 25 | 26 | public ChangedAddressAttribute() { 27 | super(StunAttribute.CHANGED_ADDRESS); 28 | } 29 | 30 | @Override 31 | public String getName() { 32 | return NAME; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/DestinationAddressAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | import org.restcomm.media.core.stun.messages.attributes.StunAttribute; 12 | 13 | /** 14 | * The DESTINATION-ADDRESS is present in Send Requests of old TURN versions. 15 | *

16 | * It specifies the address and port where the data is to be sent. It is encoded 17 | * in the same way as MAPPED-ADDRESS. 18 | *

19 | */ 20 | public class DestinationAddressAttribute extends AddressAttribute { 21 | 22 | public static final String NAME = "DESTINATION-ADDRESS"; 23 | 24 | public DestinationAddressAttribute() { 25 | super(StunAttribute.DESTINATION_ADDRESS); 26 | } 27 | 28 | @Override 29 | public String getName() { 30 | return NAME; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/ReflectedFromAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | import org.restcomm.media.core.stun.messages.attributes.StunAttribute; 12 | 13 | /** 14 | * The REFLECTED-FROM attribute is present only in Binding Responses, when the 15 | * Binding Request contained a RESPONSE-ADDRESS attribute. 16 | *

17 | * The attribute contains the identity (in terms of IP address) of the source 18 | * where the request came from. Its purpose is to provide traceability, so that 19 | * a STUN server cannot be used as a reflector for denial-of-service attacks. 20 | *

21 | * 22 | * Its syntax is identical to the MAPPED-ADDRESS attribute. 23 | */ 24 | public class ReflectedFromAttribute extends AddressAttribute { 25 | public static final String NAME = "REFLECTED-FROM"; 26 | 27 | public ReflectedFromAttribute() { 28 | super(StunAttribute.REFLECTED_FROM); 29 | } 30 | 31 | @Override 32 | public String getName() { 33 | return NAME; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/RemoteAddressAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | /** 12 | * The REMOTE-ADDRESS is present in Data Indication of old TURN versions. 13 | * 14 | * It specifies the address and port where the data is sent.
15 | * It is encoded in the same way as MAPPED-ADDRESS. 16 | */ 17 | public class RemoteAddressAttribute extends AddressAttribute { 18 | public static final String NAME = "REMOTE-ADDRESS"; 19 | 20 | protected RemoteAddressAttribute() { 21 | super(AddressAttribute.REMOTE_ADDRESS); 22 | } 23 | 24 | @Override 25 | public String getName() { 26 | return NAME; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/ResponseAddressAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | /** 12 | * The RESPONSE-ADDRESS attribute indicates where the response to a Binding 13 | * Request should be sent. 14 | * 15 | * Its syntax is identical to MAPPED-ADDRESS. 16 | */ 17 | public class ResponseAddressAttribute extends AddressAttribute { 18 | 19 | public static final String NAME = "RESPONSE-ADDRESS"; 20 | 21 | public ResponseAddressAttribute() { 22 | super(RESPONSE_ADDRESS); 23 | } 24 | 25 | @Override 26 | public String getName() { 27 | return NAME; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/SourceAddressAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | import org.restcomm.media.core.stun.messages.attributes.StunAttribute; 12 | 13 | /** 14 | * The SOURCE-ADDRESS attribute is present in Binding Responses. 15 | * 16 | * It indicates the source IP address and port that the server is sending the 17 | * response from.
18 | * A Its syntax is identical to that of MAPPED-ADDRESS. 19 | */ 20 | public class SourceAddressAttribute extends AddressAttribute { 21 | 22 | public static final String NAME = "SOURCE-ADDRESS"; 23 | 24 | public SourceAddressAttribute() { 25 | super(StunAttribute.SOURCE_ADDRESS); 26 | } 27 | 28 | @Override 29 | public String getName() { 30 | return NAME; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/XorPeerAddressAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | import org.restcomm.media.core.stun.messages.attributes.StunAttribute; 12 | 13 | /** 14 | * The XOR-PEER-ADDRESS attribute is given by a TURN client to indicates the 15 | * peer destination address of its relayed packet. 16 | * 17 | * It has the same format as XOR-MAPPED-ADDRESS. 18 | */ 19 | public class XorPeerAddressAttribute extends XorMappedAddressAttribute { 20 | 21 | public static final String NAME = "XOR-PEER-ADDRESS"; 22 | 23 | public XorPeerAddressAttribute() { 24 | super(StunAttribute.XOR_PEER_ADDRESS); 25 | } 26 | 27 | @Override 28 | public String getName() { 29 | return NAME; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/address/XorRelayedAddressAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.address; 10 | 11 | import org.restcomm.media.core.stun.messages.attributes.StunAttribute; 12 | 13 | /** 14 | * The XOR-RELAYED-ADDRESS attribute is given by a TURN server to indicates the 15 | * client its relayed address. 16 | * 17 | * It has the same format as XOR-MAPPED-ADDRESS. 18 | */ 19 | public class XorRelayedAddressAttribute extends XorMappedAddressAttribute { 20 | public static final String NAME = "XOR-RELAYED-ADDRESS"; 21 | 22 | public XorRelayedAddressAttribute() { 23 | super(StunAttribute.XOR_RELAYED_ADDRESS); 24 | } 25 | 26 | public String getName() { 27 | return NAME; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/control/ControlledAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.control; 10 | 11 | public class ControlledAttribute extends ControlAttribute { 12 | 13 | public ControlledAttribute() { 14 | super(false); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /stun/src/main/java/org/restcomm/media/core/stun/messages/attributes/control/ControllingAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Code derived and adapted from the Jitsi client side STUN framework. 4 | * 5 | * Distributable under LGPL license. 6 | * See terms of license at gnu.org. 7 | */ 8 | 9 | package org.restcomm.media.core.stun.messages.attributes.control; 10 | 11 | public class ControllingAttribute extends ControlAttribute { 12 | 13 | public ControllingAttribute() { 14 | super(true); 15 | } 16 | 17 | } 18 | --------------------------------------------------------------------------------