cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1406
Views
0
Helpful
10
Replies
Beginner

MediaSense API subscribeToEvents

I'm using the Cisco MediaSense API to subscribeToEvents.

I use this URL: https://10.10.20.64:8440/ora/eventService/event/subscribeToEvents

this content type: application/json

this header: JSESSIONID: 23476F529F436D71E667AF97D91B0BFC (I got this from my valid login)

this body:

{

   requestParameters: {

                        "subscriptionType": "http",

                        "subscriptionUri": "http://192.168.166.9/VOWebApi/voRest",

                        "subscriptionFilters": ["RECORDING_EVENTS"]

                      }

}

Everything works great for wiring up the event. It gives me this response:

{"responseMessage":"Success: Your request was successfully completed.",

"responseCode":2000,

"responseBody":

{

  "subscriptionFilters":

   ["SESSION_STARTED_EVENT","SESSION_UPDATED_EVENT","SESSION_ENDED_EVENT"],

   "subscriptionId":"hSkh86eTThyI8Kp1"

}

}

However, I only seem to get 'SESSION.STARTED_EVENT' and no 'SESSION_ENDED_EVENT'.

When I start a call I get this message at my receiving mechanism of http://192.168.166.9/VOWebApi/voRest.

{"eventBody":{"sessionState":"ACTIVE","callControllerType":"Cisco-CUCM","sessionId":"41159fa62dce11","urls":[{"rtspUrl":"rtsp://10.10.20.64/41159fa62dce11"}],"sessionStartDate":1485964500541,"tracks":[{"trackStartDate":1485964500541,"codec":"G722","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1001","isConference":false,"xRefCi":"20799983","deviceId":"SEP5067AEE068D6"}]},{"trackStartDate":1485964500541,"codec":"G722","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1006","isConference":false,"xRefCi":"20799984","deviceId":"SEP9C57ADF573DE"}]}],"callControllerIP":"10.10.20.1"},"eventType":"SESSION_EVENT","eventAction":"STARTED"}

But when I hang up the call, I do not get anything else. On next call, I get another started and so on. All starts no stops.

Ideas/Thoughts? Thank you.

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Beginner

Re: MediaSense API subscribeToEvents

It was MTU on the Cisco 881 router. changed MTU to 500 and its all set now.

10 REPLIES 10
Beginner

Re: MediaSense API subscribeToEvents

Found a little more info... In RTMT, in one of the ORA logs. I see this EVENT_PUBLISH_FAILED error with "Connection Reset". Yet I can send the same JSON glob to my service using Poster and it accepts it fine.

0000000163: 10.10.20.64: Feb 01 2017 15:57:06.413 +0000: %CCBU_API-4-EVENT_PUBLISH_FAILED: {Thrd=AMS-pool-11-thread-1} %[payload={"eventBody":{"sessionState":"CLOSED_NORMAL","callControllerType":"Cisco-CUCM","sessionId":"41159fa62dce11","urls":[{"rtspUrl":"rtsp://10.10.20.64/archive/41159fa62dce11"},{"mp4Url":"http://10.10.20.64:8081/recordedMedia/oramedia/mp4/41159fa62dce11.mp4"},{"wavUrl":"http://10.10.20.64:8081/recordedMedia/oramedia/wav/41159fa62dce11.wav"},{"httpUrl":"http://10.10.20.64:8081/recordedMedia/oramedia/mp4/41159fa62dce11.mp4"}],"sessionStartDate":1485964500541,"tracks":[{"trackStartDate":1485964500541,"trackDuration":13839,"downloadUrl":"http://10.10.20.64:8081/mma/ExportRaw?recording=41159fa62dce11-TRACK1","codec":"G722","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1001","isConference":false,"xRefCi":"20799983","participantDuration":13839,"deviceId":"SEP5067AEE068D6"}]},{"trackStartDate":1485964500541,"trackDuration":13839,"downloadUrl":"http://10.10.20.64:8081/mma/ExportRaw?recording=41159fa62dce11-TRACK0","codec":"G722","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1006","isConference":false,"xRefCi":"20799984","participantDuration":13839,"deviceId":"SEP9C57ADF573DE"}]}],"sessionDuration":13839,"callControllerIP":"10.10.20.1"},"eventType":"SESSION_EVENT","eventAction":"ENDED"}][subscription_id=hSkh86eTThyI8Kp1][url=http://192.168.166.9/VOWebApi/voRest]: Event failed to publish to specified server

0000000164: 10.10.20.64: Feb 01 2017 15:57:06.413 +0000: %CCBU_API-7-EXCEPTION:  {Thrd=AMS-pool-11-thread-1} Trace exception: com.cisco.uc.apiframework.eventmgr.exception.EMPublishEventException: EMSession.publishToChannel() Event Manager: PublishEvent exception for session hSkh86eTThyI8Kp1EMDeliveryChannel: -type [SWS] deliveryInfo [com.cisco.uc.apiframework.sws.SWSDeliveryInfo@a989057c] dataFormat [JSON],  .

0000000165: 10.10.20.64: Feb 01 2017 15:57:06.442 +0000: %CCBU_API-7-EXCEPTION_INFO: %[build_date=Jan 17, 1970 2:15 AM][build_type=rel][exception=com.cisco.uc.apiframework.eventmgr.exception.EMPublishEventException: EMSession.publishToChannel() Event Manager: PublishEvent exception for session hSkh86eTThyI8Kp1EMDeliveryChannel: -type [SWS] deliveryInfo [com.cisco.uc.apiframework.sws.SWSDeliveryInfo@a989057c] dataFormat [JSON],

    at com.cisco.uc.apiframework.eventmgr.EMSession.publishToChannel(EMSession.java:503)

    at com.cisco.uc.apiframework.eventmgr.EventManagerImpl.publishEvent(EventManagerImpl.java:1512)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)

    at $Proxy31.publishEvent(Unknown Source)

    at com.cisco.ora.ams.core.subscription.SWSSubscription$1.run(SWSSubscription.java:184)

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

    at java.lang.Thread.run(Thread.java:662)

Caused by: com.cisco.uc.apiframework.sws.SWSEventPublisherException: SWSEventPublisherImpl.publishEvent() hSkh86eTThyI8Kp1 Connection reset

    at com.cisco.uc.apiframework.sws.SWSEventPublisherImpl.publishEvent(SWSEventPublisherImpl.java:174)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)

    at $Proxy55.publishEvent(Unknown Source)

    at com.cisco.uc.apiframework.eventmgr.EMSession.publishToChannel(EMSession.java:474)

    ... 16 more

Caused by: java.net.SocketException: Connection reset

    at java.net.SocketInputStream.read(SocketInputStream.java:168)

    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)

    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)

    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)

    at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)

    at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)

    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)

    at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)

    at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)

    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)

    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)

    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)

    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)

    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)

    at com.cisco.uc.apiframework.sws.SWSEventPublisherImpl.publishEvent(SWSEventPublisherImpl.java:166)

    ... 28 more

][product_name=MediaSense][subsystem_exception_info=][tid=AMS-pool-11-thread-1][version_number=MediaSense_9_0_1_0_0_0_202]: Information associated with the following logged exception

0000000257: 10.10.20.64: Feb 01 2017 15:57:22.071 +0000: %CCBU_Infrastructure-6-LOG_PURGER_EVENT: {Thrd=Log Purge Timer} %[event_info=file name: Error-ora.2017-02-01T15-17-23.675.startup.log.gz, file length: 1003][event_name=Zipped log file]: Log Purger Event

0000000014: 10.10.20.64: Feb 01 2017 15:57:22.071 +0000: %CCBU_alarm-6-RTMT_SYSTEM_CONDITION_LISTENER: {Thrd=Log Purge Timer} %[alarm=SCInfrastructure_LOG_PURGER_ERRORClear][appid=null]: Annotated applciaiton for alarm

0000000166: 10.10.20.64: Feb 01 2017 15:59:02.885 +0000: %CCBU_API-4-EVENT_PUBLISH_FAILED: {Thrd=AMS-pool-11-thread-1} %[payload={"eventBody":{"sessionState":"CLOSED_NORMAL","callControllerType":"Cisco-CUCM","sessionId":"42159fa62dce11","urls":[{"rtspUrl":"rtsp://10.10.20.64/archive/42159fa62dce11"},{"mp4Url":"http://10.10.20.64:8081/recordedMedia/oramedia/mp4/42159fa62dce11.mp4"},{"wavUrl":"http://10.10.20.64:8081/recordedMedia/oramedia/wav/42159fa62dce11.wav"},{"httpUrl":"http://10.10.20.64:8081/recordedMedia/oramedia/mp4/42159fa62dce11.mp4"}],"sessionStartDate":1485964500541,"tracks":[{"trackStartDate":1485964500541,"trackDuration":13839,"downloadUrl":"http://10.10.20.64:8081/mma/ExportRaw?recording=42159fa62dce11-TRACK1","codec":"G722","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1006","isConference":false,"xRefCi":"20799984","participantDuration":13839,"deviceId":"SEP9C57ADF573DE"}]},{"trackStartDate":1485964500541,"trackDuration":13839,"downloadUrl":"http://10.10.20.64:8081/mma/ExportRaw?recording=42159fa62dce11-TRACK0","codec":"G722","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1001","isConference":false,"xRefCi":"20799983","participantDuration":13839,"deviceId":"SEP5067AEE068D6"}]}],"sessionDuration":13839,"callControllerIP":"10.10.20.1"},"eventType":"SESSION_EVENT","eventAction":"ENDED"}][subscription_id=hSkh86eTThyI8Kp1][url=http://192.168.166.9/VOWebApi/voRest]: Event failed to publish to specified server

0000000167: 10.10.20.64: Feb 01 2017 15:59:02.885 +0000: %CCBU_API-7-EXCEPTION:  {Thrd=AMS-pool-11-thread-1} Trace exception: com.cisco.uc.apiframework.eventmgr.exception.EMPublishEventException: EMSession.publishToChannel() Event Manager: PublishEvent exception for session hSkh86eTThyI8Kp1EMDeliveryChannel: -type [SWS] deliveryInfo [com.cisco.uc.apiframework.sws.SWSDeliveryInfo@a989057c] dataFormat [JSON],  .

0000000168: 10.10.20.64: Feb 01 2017 15:59:02.886 +0000: %CCBU_API-7-EXCEPTION_INFO: %[build_date=Jan 17, 1970 2:15 AM][build_type=rel][exception=com.cisco.uc.apiframework.eventmgr.exception.EMPublishEventException: EMSession.publishToChannel() Event Manager: PublishEvent exception for session hSkh86eTThyI8Kp1EMDeliveryChannel: -type [SWS] deliveryInfo [com.cisco.uc.apiframework.sws.SWSDeliveryInfo@a989057c] dataFormat [JSON],

    at com.cisco.uc.apiframework.eventmgr.EMSession.publishToChannel(EMSession.java:503)

    at com.cisco.uc.apiframework.eventmgr.EventManagerImpl.publishEvent(EventManagerImpl.java:1512)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)

    at $Proxy31.publishEvent(Unknown Source)

    at com.cisco.ora.ams.core.subscription.SWSSubscription$1.run(SWSSubscription.java:184)

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

    at java.lang.Thread.run(Thread.java:662)

Caused by: com.cisco.uc.apiframework.sws.SWSEventPublisherException: SWSEventPublisherImpl.publishEvent() hSkh86eTThyI8Kp1 Connection timed out

    at com.cisco.uc.apiframework.sws.SWSEventPublisherImpl.publishEvent(SWSEventPublisherImpl.java:174)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)

    at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:107)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)

    at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)

    at $Proxy55.publishEvent(Unknown Source)

    at com.cisco.uc.apiframework.eventmgr.EMSession.publishToChannel(EMSession.java:474)

    ... 16 more

Caused by: java.net.SocketException: Connection timed out

    at java.net.SocketInputStream.socketRead0(Native Method)

    at java.net.SocketInputStream.read(SocketInputStream.java:129)

    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)

    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)

    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)

    at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)

    at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)

    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)

    at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)

    at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)

    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)

    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)

    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)

    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)

    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)

    at com.cisco.uc.apiframework.sws.SWSEventPublisherImpl.publishEvent(SWSEventPublisherImpl.java:166)

    ... 28 more

][product_name=MediaSense][subsystem_exception_info=][tid=AMS-pool-11-thread-1][version_number=MediaSense_9_0_1_0_0_0_202]: Information associated with the following logged exception

Beginner

Re: MediaSense API subscribeToEvents

Tried subscribing to just SESSION_ENDED_EVENT and get same result. No event arrives at end point, logs show ConnectionTimed Out or Connection Reset errors.

Yet, I send this JSON (which is whats in the log that it was attempting to send) to my end point using firefox poster and it arrives just fine.

{"eventBody":{"sessionState":"CLOSED_NORMAL","callControllerType":"Cisco-CUCM","sessionId":"41159fa62dce11","urls":[{"rtspUrl":"rtsp://10.10.20.64/archive/41159fa62dce11"},{"mp4Url":"http://10.10.20.64:8081/recordedMedia/oramedia/mp4/41159fa62dce11.mp4"},{"wavUrl":"http://10.10.20.64:8081/recordedMedia/oramedia/wav/41159fa62dce11.wav"},{"httpUrl":"http://10.10.20.64:8081/recordedMedia/oramedia/mp4/41159fa62dce11.mp4"}],"sessionStartDate":1485964500541,"tracks":[{"trackStartDate":1485964500541,"trackDuration":13839,"downloadUrl":"http://10.10.20.64:8081/mma/ExportRaw?recording=41159fa62dce11-TRACK1","codec":"G722","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1001","isConference":false,"xRefCi":"20799983","participantDuration":13839,"deviceId":"SEP5067AEE068D6"}]},{"trackStartDate":1485964500541,"trackDuration":13839,"downloadUrl":"http://10.10.20.64:8081/mma/ExportRaw?recording=41159fa62dce11-TRACK0","codec":"G722","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1485964500541,"deviceRef":"1006","isConference":false,"xRefCi":"20799984","participantDuration":13839,"deviceId":"SEP9C57ADF573DE"}]}],"sessionDuration":13839,"callControllerIP":"10.10.20.1"},"eventType":"SESSION_EVENT","eventAction":"ENDED"}

SESSION_STARTED_EVENTs arrive just fine.

Beginner

Re: MediaSense API subscribeToEvents

Hi Dan,

I have started looking into the issue and will get back once after checking it on my lab set up. Meanwhile, could you tell which version of Mediasense you are using?

Thanks,

Bhawik

Beginner

Re: MediaSense API subscribeToEvents

It’s the MediaSense Sandbox LAB. Version 10.

Beginner

Re: MediaSense API subscribeToEvents

Here is a full trace log from the MediaSense Server with the errors in it.

I did an internal recording between 2 phones. This should generate 2 STARTED events and 2 ENDED events. I received the 2 STARTED events but the 2 ENDED events did not arrive on my server. The log says: “Connection timed out”

Look for:

0000017965: is the subscription.

0000018540: is the "eventAction":"STARTED" event

0000018541: is the "eventAction":"STARTED" event

0000018886: is “Event failed to publish to specified server”

0000019212: is “Event failed to publish to specified server”

0000019214: is the stack trace

Beginner

Re: MediaSense API subscribeToEvents

Hi Dan,

As you mentioned, there are Connection timed out and Connection resets in your logs. Mediasense is seen trying to send the event notification, but if wasn't successful because connectivity, could be firewall.

I would advice to check once on the connectivity maybe with your IT team.

Further:

I tried to run the subscribeToEvents API on my local set up, to see if I could reproduce the issue. I'm getting both the notifications successfully i.e. for call start and call end.

Request Body:

{

   requestParameters: {

                        "subscriptionType": "http",

                        "subscriptionUri": "http://10.126.135.163:8281/notify",

                        "subscriptionFilters": ["ALL_EVENTS"]

                      }

}

Response:

{"responseMessage":"Success: Your request was successfully completed.","responseCode":2000,"responseBody":{"subscriptionFilters":["SESSION_STARTED_EVENT","SESSION_UPDATED_EVENT","SESSION_ENDED_EVENT","SESSION_PRUNED_EVENT","SESSION_DELETED_EVENT","TAG_ADDED_EVENT","TAG_UPDATED_EVENT","TAG_DELETED_EVENT","ENTER_LOW_STORAGE_SPACE_EVENT","EXIT_LOW_STORAGE_SPACE_EVENT","ENTER_CRITICAL_STORAGE_SPACE_EVENT","EXIT_CRITICAL_STORAGE_SPACE_EVENT","ENTER_EMERGENCY_STORAGE_SPACE_EVENT","EXIT_EMERGENCY_STORAGE_SPACE_EVENT"],"subscriptionId":"AfNqjkMG9QeY1Nl2"}}

__________________________________

chunk data =

{"eventBody":{"sessionState":"ACTIVE","callControllerType":"Cisco-SIPGateway","sessionId":"df15a12fc03641","urls":[{"rtspUrl":"rtsp://10.126.135.163/df15a12fc03641"}],"sessionStartDate":1486377190487,"tracks":[{"trackStartDate":1486377190487,"codec":"H264","trackNumber":3,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486377190487,"deviceRef":"11630","isConference":false,"xRefCi":"6015a12fc03641"}]},{"trackStartDate":1486377190487,"codec":"G729","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486377190487,"deviceRef":"11630","isConference":false,"xRefCi":"6015a12fc03641"}]},{"trackStartDate":1486377190487,"codec":"H264","trackNumber":2,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486377190487,"deviceRef":"6949","isConference":false,"xRefCi":"5f15a12fc03641"}]},{"trackStartDate":1486377190487,"codec":"G729","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486377190487,"deviceRef":"6949","isConference":false,"xRefCi":"5f15a12fc03641"}]}],"callControllerIP":"10.126.135.150","ccid":"2761865472-0000065536-0000273246-0495418890"},"eventType":"SESSION_EVENT","eventAction":"STARTED"}

New request received =

/notify

chunk data =

{"eventBody":{"sessionState":"CLOSED_NORMAL","callControllerType":"Cisco-SIPGateway","sessionId":"df15a12fc03641","urls":[{"rtspUrl":"rtsp://10.126.135.163/archive/df15a12fc03641"},{"mp4Url":"https://10.126.135.163:8446/recordedMedia/oramedia/mp4/df15a12fc03641.mp4"},{"wavUrl":"https://10.126.135.163:8446/recordedMedia/oramedia/wav/df15a12fc03641.wav"},{"httpUrl":"https://10.126.135.163:8446/recordedMedia/oramedia/mp4/df15a12fc03641.mp4"}],"sessionStartDate":1486377190487,"tracks":[{"trackStartDate":1486377190487,"trackDuration":25646,"codec":"H264","trackNumber":3,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486377190487,"deviceRef":"11630","isConference":false,"xRefCi":"6015a12fc03641","participantDuration":25646}]},{"trackStartDate":1486377190487,"trackDuration":25646,"downloadUrl":"https://10.126.135.163:8446/mma/ExportRaw?recording=df15a12fc03641-TRACK1","codec":"G729","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486377190487,"deviceRef":"11630","isConference":false,"xRefCi":"6015a12fc03641","participantDuration":25646}]},{"trackStartDate":1486377190487,"trackDuration":25646,"codec":"H264","trackNumber":2,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486377190487,"deviceRef":"6949","isConference":false,"xRefCi":"5f15a12fc03641","participantDuration":25646}]},{"trackStartDate":1486377190487,"trackDuration":25646,"downloadUrl":"https://10.126.135.163:8446/mma/ExportRaw?recording=df15a12fc03641-TRACK0","codec":"G729","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486377190487,"deviceRef":"6949","isConference":false,"xRefCi":"5f15a12fc03641","participantDuration":25646}]}],"sessionDuration":25646,"callControllerIP":"10.126.135.150","ccid":"2761865472-0000065536-0000273246-0495418890"},"eventType":"SESSION_EVENT","eventAction":"ENDED"}

Let me know how I can help you further on this.

Thanks,

Bhawik

Highlighted
Beginner

Re: MediaSense API subscribeToEvents

Thanks for the reply but how can it be firewall related when 2 lines above in the log shows I received the STARTED EVENT fine. A firewall issue would not let a start through but prevent a stop. Also I can send all the Json for a stop using Firefox poster. My receiver is fine my firewall is fine. What else could it be.

Beginner

Re: MediaSense API subscribeToEvents

Hi Bhawik,

Can you share the receiver you used at [http://10.126.135.163:8281/notify]. This may help debug my side of it.

My receiver seems fine as it accepts the ACTIVE event without issue and will accept the json for an ENDED event if its copied and pasted into Firefox-Poster from the MediaSense error log. However it does not receive the ENDED event directly from MediaSense per the errors above.

Testing with your poster would eliminate a lot of hunting and pecking on next action item. Thank you.

Beginner

Re: MediaSense API subscribeToEvents

Hi Dan,


   requestParameters: {

                        "subscriptionType": "http",

                        "subscriptionUri": "http://10.126.135.163:8281/notify",

                        "subscriptionFilters": ["ALL_EVENTS"]

                      }

}


I created a nodejs server on another mediasense box using below script :

server.js file

var sys = require("sys");

var http = require('http');

fs = require('fs');

http.createServer(function(request,res){

        sys.puts("New request received = ", request.url);

        request.addListener('data', function(chunk) {

       sys.puts("chunk data = ", chunk);

       });

        res.end("I got it" + request.url);

}).listen(8281);

sys.puts("Server Running on 8281");

Server running as shown below:

[root@nms163 bin]# node server.js

Server Running on 8281

(node:5406) DeprecationWarning: sys is deprecated. Use util instead.

(node:5406) DeprecationWarning: util.puts is deprecated. Use console.log instead.

New request received =

/notify

chunk data =

{"eventBody":{"sessionState":"ACTIVE","callControllerType":"Cisco-SIPGateway","sessionId":"18f15a22a7e5041","urls":[{"rtspUrl":"rtsp://10.126.135.137/18f15a22a7e5041"}],"sessionStartDate":1486640113166,"tracks":[{"trackStartDate":1486640113166,"codec":"H264","trackNumber":3,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11630","isConference":false,"xRefCi":"2815a22a7e5041"}]},{"trackStartDate":1486640113166,"codec":"PCMU","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11630","isConference":false,"xRefCi":"2815a22a7e5041"}]},{"trackStartDate":1486640113166,"codec":"H264","trackNumber":2,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11648","isConference":false,"xRefCi":"2715a22a7e5041"}]},{"trackStartDate":1486640113166,"codec":"PCMU","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11648","isConference":false,"xRefCi":"2715a22a7e5041"}]}],"callControllerIP":"10.126.135.150","ccid":"3481880320-0000065536-0000273460-0495418890"},"eventType":"SESSION_EVENT","eventAction":"STARTED"}

New request received =

/notify

chunk data =

{"eventBody":{"sessionState":"CLOSED_NORMAL","callControllerType":"Cisco-SIPGateway","sessionId":"18f15a22a7e5041","urls":[{"rtspUrl":"rtsp://10.126.135.137/archive/18f15a22a7e5041"},{"mp4Url":"https://10.126.135.137:8446/recordedMedia/oramedia/mp4/18f15a22a7e5041.mp4"},{"wavUrl":"https://10.126.135.137:8446/recordedMedia/oramedia/wav/18f15a22a7e5041.wav"},{"httpUrl":"https://10.126.135.137:8446/recordedMedia/oramedia/mp4/18f15a22a7e5041.mp4"}],"sessionStartDate":1486640113166,"tracks":[{"trackStartDate":1486640113166,"trackDuration":6464,"codec":"H264","trackNumber":3,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11630","isConference":false,"xRefCi":"2815a22a7e5041","participantDuration":6464}]},{"trackStartDate":1486640113166,"trackDuration":6464,"downloadUrl":"https://10.126.135.137:8446/mma/ExportRaw?recording=18f15a22a7e5041-TRACK1","codec":"PCMU","trackNumber":1,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11630","isConference":false,"xRefCi":"2815a22a7e5041","participantDuration":6464}]},{"trackStartDate":1486640113166,"trackDuration":6464,"codec":"H264","trackNumber":2,"trackMediaType":"VIDEO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11648","isConference":false,"xRefCi":"2715a22a7e5041","participantDuration":6464}]},{"trackStartDate":1486640113166,"trackDuration":6464,"downloadUrl":"https://10.126.135.137:8446/mma/ExportRaw?recording=18f15a22a7e5041-TRACK0","codec":"PCMU","trackNumber":0,"trackMediaType":"AUDIO","participants":[{"participantStartDate":1486640113166,"deviceRef":"11648","isConference":false,"xRefCi":"2715a22a7e5041","participantDuration":6464}]}],"sessionDuration":6464,"callControllerIP":"10.126.135.150","ccid":"3481880320-0000065536-0000273460-0495418890"},"eventType":"SESSION_EVENT","eventAction":"ENDED"}

____________________________________________________

You might wanna check your ports on the receiver, if they are open or not? I understand that you are able to receive session start event and not the end events, which is basically a tricky situation.

I would recommend you take the packet capture of the time of session start and session end on mediasense and your receiver,  and check for any discrepancy.

You could also share these files here, for us to debug why the TCP connection is not getting established in the case of session end.

Thanks,

Bhawik

Beginner

Re: MediaSense API subscribeToEvents

It was MTU on the Cisco 881 router. changed MTU to 500 and its all set now.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards