API call erros
Thank you for your response. In the meantime i got a bit closer to what I wanted to achieve and my original problem is solved. I am able to make calls using port 7777 like this: curl -X POST ‘http://localhost:7777/apiproxy/version’. This also seems to work with the pullStream Command after I changed some of the parameters: { “data”: { “audioCodecBytes”: “”, “configId”: 3, “emulateUserAgent”: “EvoStream Media Server (www.evostream.com) player”, “forceTcp”: false, “httpProxy”: “”, “isAudio”: true, “keepAlive”: false, “localStreamName”: “oem-livetest”, “operationType”: 1, “pageUrl”: “”, “ppsBytes”: “”, “rangeEnd”: -1, “rangeStart”: -2, “rtcpDetectionInterval”: 10, “sendRenewStream”: false, “spsBytes”: “”, “ssmIp”: “”, “swfUrl”: “”, “tcUrl”: “”, “tos”: 256, “ttl”: 256, “uri”: { “document”: “ch0”, “documentPath”: “\/live\/”, “documentWithFullParameters”: “ch0”, “fullDocumentPath”: “\/live\/ch0”, “fullDocumentPathWithParameters”: “\/live\/ch0”, “fullParameters”: “”, “fullUri”: “rtsp:\/\/ip-address\/live\/ch0”, “fullUriWithAuth”: “rtsp:\/\/username:password@ip-address\/live\/ch0”, “host”: “”, “ip”: “2”, “originalUri”: “rtsp:\/\/username:password@ip-address\/live\/ch0”, “parameters”: {}, “password”: “correct-password”, “port”: 554, “portSpecified”: false, “scheme”: “rtsp”, “userName”: “correct-username” } }, “description”: “Stream rtsp:\/\/username:password@ip-address\/live\/ch0 enqueued for pulling”, “status”: “SUCCESS” } When I then request a list of all streams, this stream is listed, but after about 15 seconds it disappears and I get: {“data”:null,”description”:”Available streams”,”status”:”SUCCESS”} Could you tell me why this is(lost connection to the camera?) and how to resolve this? Could you also tell me how to make API calls from a remote host? HTTP POST requests do not seem to work from remote hosts (connection refused). So what is the correct syntax with authentication?
Here are some logs of what happens when I use the pullStream call, like I described in the previous post. THIS HAPPENS ON “PULLSTREAM”: 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 20->21 IOHT_TCP_CARRIER 1463998706:3:/thelib/src/netio/epoll/tcpacceptor.cpp:187:Accept:Inbound connection accepted: (Far: 127.0.0.1:48027; Near: 127.0.0.1:7777) CTCP(3) TCP(707) IHTT(708) H4C(709) [IJSONCLI(710)] 1463998706:3:/applications/evorouter/src/protocols/cli/cliappprotocolhandler.cpp:1205:ProcessMessage:command: pullstream 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 21->22 IOHT_TCP_CONNECTOR 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 22->21 IOHT_TCP_CARRIER 1463998706:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol [IJSONCLI(710)] unregistered from application: evostreamms 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 21->22 IOHT_TCP_CARRIER 1463998706:3:/thelib/include/netio/epoll/tcpconnector.h:111:OnEvent:Outbound connection established: (Far: ; Near: 10.0.14.143:42620) CTCP(27) TCP(711) [RTSP(712)] 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 22->21 IOHT_TCP_CONNECTOR 1463998706:2:/thelib/src/protocols/rtp/sdp.cpp:514:ParseSDPLineA:Attribute `range` with value `npt=0-` not parsed 1463998706:2:/thelib/src/protocols/rtp/sdp.cpp:486:ParseSDPLineA:Invalid codec: X-KATA 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 21->22 IOHT_UDP_CARRIER 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 22->23 IOHT_UDP_CARRIER 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 23->24 IOHT_UDP_CARRIER 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 24->25 IOHT_UDP_CARRIER 1463998706:3:/thelib/src/application/baseclientapplication.cpp:391:SignalStreamRegistered:Stream INP(12) with name `oem-livetest` from protocol RTSP(712) registered to origin application `evostreamms` 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 25->26 IOHT_TCP_CONNECTOR 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 26->27 IOHT_TIMER 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 27->28 IOHT_TCP_CARRIER 1463998706:3:/thelib/include/netio/epoll/tcpconnector.h:111:OnEvent:Outbound connection established: (Far: 127.0.0.1:8888; Near: 127.0.0.1:53473) CTCP(31) TCP(722) OHTT2(723) [ORPC(724)] 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 28->27 IOHT_TCP_CONNECTOR 1463998706:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol [ORPC(724)] unregistered from application: evostreamms 1463998706:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 27->26 IOHT_TCP_CARRIER THIS HAPPENS AFTER 10 TO 20 SECONDS: 1463998760:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 26->27 IOHT_TCP_CARRIER 1463998760:3:/thelib/src/netio/epoll/tcpacceptor.cpp:187:Accept:Inbound connection accepted: (Far: 127.0.0.1:48035; Near: 127.0.0.1:7777) CTCP(31) TCP(750) IHTT(751) H4C(752) [IJSONCLI(753)] 1463998760:3:/applications/evorouter/src/protocols/cli/cliappprotocolhandler.cpp:1205:ProcessMessage:command: version 1463998760:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 27->26 IOHT_TCP_CARRIER 1463998760:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol [IJSONCLI(753)] unregistered from application: evostreamms 1463998767:2:/applications/evorouter/src/protocols/timer/keepalivetimerprotocol.cpp:110:TimePeriodElapsed:No traffic on stream INP(13) with name `oem-livetest` from protocol RTSP(737). Destroy it 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 26->25 IOHT_TCP_CARRIER 1463998767:3:/thelib/src/application/baseclientapplication.cpp:397:SignalStreamUnRegistered:Stream INP(13) with name `oem-livetest` from protocol RTSP(737) unregistered from origin application `evostreamms` 1463998767:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol [RTSP(737)] unregistered from application: evostreamms 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 25->26 IOHT_TCP_CONNECTOR 1463998767:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol (Bound on: 0.0.0.0:41892) CUDP(3) UDP(738) [IRTP(739)] unregistered from application: evostreamms 1463998767:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol (Bound on: 0.0.0.0:41893) CUDP(28) UDP(740) [RTCP(741)] unregistered from application: evostreamms 1463998767:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol (Bound on: 0.0.0.0:54988) CUDP(30) UDP(742) [IRTP(743)] unregistered from application: evostreamms 1463998767:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol (Bound on: 0.0.0.0:54989) CUDP(29) UDP(744) [RTCP(745)] unregistered from application: evostreamms 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 26->25 IOHT_UDP_CARRIER 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 25->24 IOHT_UDP_CARRIER 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 24->23 IOHT_UDP_CARRIER 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 23->22 IOHT_UDP_CARRIER 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 22->21 IOHT_TIMER 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:119:RegisterIOHandler:Handlers count changed: 21->22 IOHT_TCP_CARRIER 1463998767:3:/thelib/include/netio/epoll/tcpconnector.h:111:OnEvent:Outbound connection established: (Far: 127.0.0.1:8888; Near: 127.0.0.1:53480) CTCP(27) TCP(754) OHTT2(755) [ORPC(756)] 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 22->21 IOHT_TCP_CONNECTOR 1463998767:6:/thelib/src/application/baseclientapplication.cpp:385:UnRegisterProtocol:Protocol [ORPC(756)] unregistered from application: evostreamms 1463998767:4:/thelib/src/netio/epoll/iohandlermanager.cpp:129:UnRegisterIOHandler:Handlers count changed: 21->20 IOHT_TCP_CARRIER