destination.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Kamailio osp module.
  3. *
  4. * This module enables Kamailio 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 Kamailio, a free SIP server.
  15. *
  16. * Kamailio 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. * Kamailio is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; if not, write to the Free Software
  28. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  29. */
  30. #ifndef _OSP_MOD_DESTINATION_H_
  31. #define _OSP_MOD_DESTINATION_H_
  32. #include <time.h>
  33. #include "osp_mod.h"
  34. typedef struct _osp_dest {
  35. char validafter[OSP_STRBUF_SIZE];
  36. char validuntil[OSP_STRBUF_SIZE];
  37. char callid[OSP_STRBUF_SIZE];
  38. char called[OSP_STRBUF_SIZE];
  39. char calling[OSP_STRBUF_SIZE];
  40. char source[OSP_STRBUF_SIZE];
  41. char srcdev[OSP_STRBUF_SIZE];
  42. char host[OSP_STRBUF_SIZE];
  43. char destdev[OSP_STRBUF_SIZE];
  44. char networkid[OSP_STRBUF_SIZE];
  45. unsigned char token[OSP_TOKENBUF_SIZE];
  46. unsigned int callidsize;
  47. unsigned int tokensize;
  48. unsigned int timelimit;
  49. int lastcode;
  50. time_t authtime;
  51. time_t time100;
  52. time_t time180;
  53. time_t time200;
  54. int type;
  55. unsigned long long transid;
  56. int supported;
  57. int used;
  58. int reported;
  59. unsigned int destinationCount;
  60. char origcalled[OSP_STRBUF_SIZE];
  61. } osp_dest;
  62. osp_dest* ospInitDestination(osp_dest* dest);
  63. int ospSaveOrigDestination(osp_dest* dest);
  64. int ospSaveTermDestination(osp_dest* dest);
  65. int ospCheckOrigDestination(void);
  66. osp_dest* ospGetNextOrigDestination(void);
  67. osp_dest* ospGetLastOrigDestination(void);
  68. osp_dest* ospGetTermDestination(void);
  69. void ospRecordEvent(int clientcode, int servercode);
  70. void ospDumpDestination(osp_dest* dest);
  71. void ospDumpAllDestination(void);
  72. void ospConvertAddress(char* src, char* dst, int buffersize);
  73. #endif /* _OSP_MOD_DESTINATION_H_ */