mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support sip query catalog message, parse xml to map, nvr
This commit is contained in:
parent
769efa87c3
commit
1e0474e470
2 changed files with 380 additions and 50 deletions
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
|
||||
#include <srs_kernel_consts.hpp>
|
||||
#include <srs_rtsp_stack.hpp>
|
||||
|
@ -88,6 +89,11 @@ public:
|
|||
std::string www_authenticate;
|
||||
std::string authorization;
|
||||
|
||||
std::string chid;
|
||||
|
||||
std::map<std::string, std::string> xml_body_map;
|
||||
std::map<std::string, std::string> device_list_map;
|
||||
|
||||
public:
|
||||
std::string serial;
|
||||
std::string realm;
|
||||
|
@ -131,6 +137,7 @@ public:
|
|||
virtual srs_error_t parse_request(SrsSipRequest** preq, const char *recv_msg, int nb_buf);
|
||||
protected:
|
||||
virtual srs_error_t do_parse_request(SrsSipRequest* req, const char *recv_msg);
|
||||
virtual srs_error_t parse_xml(std::string xml_msg, std::map<std::string, std::string> &json_map);
|
||||
|
||||
private:
|
||||
//response from
|
||||
|
@ -146,10 +153,12 @@ public:
|
|||
virtual void resp_keepalive(std::stringstream& ss, SrsSipRequest *req);
|
||||
|
||||
//request: request sent by the sip-server, wait for sip-agent response
|
||||
virtual void req_invite(std::stringstream& ss, SrsSipRequest *req, std::string ip, int port, uint32_t ssrc);
|
||||
virtual void req_invite(std::stringstream& ss, SrsSipRequest *req, std::string ip,
|
||||
int port, uint32_t ssrc);
|
||||
virtual void req_ack(std::stringstream& ss, SrsSipRequest *req);
|
||||
virtual void req_bye(std::stringstream& ss, SrsSipRequest *req);
|
||||
virtual void req_401_unauthorized(std::stringstream& ss, SrsSipRequest *req);
|
||||
virtual void req_query_catalog(std::stringstream& ss, SrsSipRequest *req);
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue