globals.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * ser osp module.
  3. *
  4. * This module enables ser to communicate with an Open Settlement
  5. * Protocol (OSP) server. The Open Settlement Protocol is an ETSI
  6. * defined standard for Inter-Domain VoIP pricing, authorization
  7. * and usage exchange. The technical specifications for OSP
  8. * (ETSI TS 101 321 V4.1.1) are available at www.etsi.org.
  9. *
  10. * Uli Abend was the original contributor to this module.
  11. *
  12. * Copyright (C) 2001-2005 Fhg Fokus
  13. *
  14. * This file is part of ser, a free SIP server.
  15. *
  16. * ser is free software; you can redistribute it and/or modify
  17. * it under the terms of the GNU General Public License as published by
  18. * the Free Software Foundation; either version 2 of the License, or
  19. * (at your option) any later version
  20. *
  21. * For a license to use the ser software under conditions
  22. * other than those described here, or to purchase support for this
  23. * software, please contact iptel.org by e-mail at the following addresses:
  24. * [email protected]
  25. *
  26. * ser is distributed in the hope that it will be useful,
  27. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  28. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  29. * GNU General Public License for more details.
  30. *
  31. * You should have received a copy of the GNU General Public License
  32. * along with this program; if not, write to the Free Software
  33. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  34. */
  35. #include <stdio.h>
  36. #include <osp/osp.h>
  37. #include "osp_mod.h"
  38. unsigned int _osp_sp_number;
  39. char* _osp_sp_uris[OSP_DEF_SPS];
  40. unsigned long _osp_sp_weights[OSP_DEF_SPS] = {
  41. OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
  42. OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
  43. OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
  44. OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT
  45. };
  46. char* _osp_device_ip = NULL;
  47. char* _osp_device_port = NULL;
  48. unsigned char* _osp_private_key = NULL;
  49. unsigned char* _osp_local_certificate = NULL;
  50. unsigned char* _osp_ca_certificate = NULL;
  51. int _osp_crypto_hw = OSP_DEF_HW;
  52. int _osp_validate_callid = OSP_DEF_CALLID;
  53. int _osp_token_format = OSP_DEF_TOKEN;
  54. int _osp_ssl_lifetime = OSP_DEF_SSLLIFE;
  55. int _osp_persistence = OSP_DEF_PERSISTENCE;
  56. int _osp_retry_delay = OSP_DEF_DELAY;
  57. int _osp_retry_limit = OSP_DEF_RETRY;
  58. int _osp_timeout = OSP_DEF_TIMEOUT;
  59. int _osp_max_dests = OSP_DEF_DESTS;
  60. int _osp_use_rpid = OSP_DEF_USERPID;
  61. int _osp_redir_uri = OSP_DEF_REDIRURI;
  62. char _osp_PRIVATE_KEY[OSP_KEYBUF_SIZE];
  63. char _osp_LOCAL_CERTIFICATE[OSP_KEYBUF_SIZE];
  64. char _osp_CA_CERTIFICATE[OSP_KEYBUF_SIZE];
  65. OSPTPROVHANDLE _osp_provider = -1;