sip_config.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef __JNI_SIP_CONFIG_H_
  2. #define __JNI_SIP_CONFIG_H_
  3. #include "base/strings.hpp"
  4. #define SIP_REG_DOMAIN "sip_reg_domain"
  5. #define SIP_REG_ACCOUNT "sip_reg_account"
  6. #define SIP_REG_PASSWORD "sip_reg_password"
  7. #define SIP_REG_PORT "sip_reg_port"
  8. #define SIP_REG_DOOR_ACCOUNT "sip_reg_door_account"
  9. #define SIP_REG_WUYEADDRESS "sip_reg_wuyeaddress"
  10. #define SIP_AUTO_ANSWER "sip_auto_answer"
  11. #define SIP_ENABLE_VIDEO "sip_enable_video"
  12. #define SIP_ENABLE_ICE "sip_enable_ice"
  13. #define SIP_STUN_TURN_SERVER "sip_stun_turn_server"
  14. #define SIP_DTMF "sip_dtmf_method"
  15. #define SIP_UNLOCK_TEXT "sip_unlock_text"
  16. #define SIP_REG_URI "sip_reg_uri"
  17. #define SIP_JHWS_TOKEN "sip_jhws_token"
  18. #define SIP_JHWS_USERSID "sip_jhws_usersid"
  19. #define SIP_JHWS_USERSPASSWORD "sip_jhws_userspassword"
  20. #define SIP_JHWS_COMMUNITYCODE "sip_jhws_communitycode"
  21. #define SIP_JHWS_FLOORCODE "sip_jhws_floorcode"
  22. #define SIP_JHWS_ROOMCODE "sip_jhws_roomcode"
  23. #define SIP_JHWS_ROOMID "sip_jhws_roomid"
  24. #define SIP_JHWS_COMMUNITYID "sip_jhws_communityid"
  25. #define SIP_JHWS_UNITID "sip_jhws_unitid"
  26. #define SIP_JHWS_UPDATETIME "sip_jhws_updatetime"
  27. #if 1
  28. #define SIP_REG_DOMAIN_DEFAULT "172.28.100.100"
  29. #define SIP_REG_ACCOUNT_DEFAULT "4000117370"
  30. #define SIP_REG_PASSWORD_DEFAULT "4000117370"
  31. #define SIP_REG_DOOR_ACCOUNT_DEFAULT "4000510200"
  32. #define SIP_REG_PORT_DEFAULT 5060
  33. #else
  34. #define SIP_REG_URI_DEFAULT "sip:RM-414-1-1-1-1-7@test.jhws.top"
  35. #define SIP_REG_SERVER_DEFAULT "sip:test.jhws.top"
  36. #define SIP_REG_NAME_DEFAULT "RM-414-1-1-1-1-7"
  37. #define SIP_REG_PASSWORD_DEFAULT ""
  38. #define SIP_REG_DOOR_URI_DEFAULT "sip:OD-414-1-1-1-0-1@jhws.top"
  39. #define SIP_REG_PORT_DEFAULT 58583
  40. #endif
  41. inline std::string URI(const std::string& account) {
  42. return base::format("sip:%s@jhws.top", account.c_str());
  43. }
  44. inline std::string URI(const std::string& account,
  45. const std::string& domain) {
  46. return base::format("sip:%s@%s", account.c_str(), domain.c_str());
  47. }
  48. inline std::string URI(const std::string& account,
  49. const std::string& domain, int port) {
  50. return base::format("sip:%s@%s:%d", account.c_str(), domain.c_str(), port);
  51. }
  52. #endif