[asterisk-scf-commits] asterisk-scf/release/sip.git branch "authexten" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jul 21 10:33:43 CDT 2011


branch "authexten" has been updated
       via  d5456aa0f5700ef9d53821e9695411fa2e0801fd (commit)
       via  e2a3f36be58aaf8457b09f2aadd7d4e897176532 (commit)
       via  b18bdac4a5042928247a0a708b7e62fe4cec801f (commit)
       via  2b0ba42f2e557f5f5f3e5dba3b41f87a0937d8db (commit)
       via  c1891fda67849e50c553ccbba326ab431c8fa293 (commit)
       via  abc64b8ab827c6e1a59a6440f0c82ed4662cd8cb (commit)
       via  5cc1decf6fbf407a4d477f74f7832af9bf1df66d (commit)
       via  f3ac2038009f50b1ff84d203999dc79f2a0aea56 (commit)
       via  e19711fb128b2538bd793dd6993fa1a89a99909e (commit)
       via  4f79a16c7cb94d0b6aa5ed13c3bfdc81fc764641 (commit)
       via  6577d75e59c8b2f4241103f48fd114da433c8597 (commit)
       via  26ec91cf1ad7ae654b38a57e355d85cd7b2a6495 (commit)
       via  c36e88cc66b3a9f5e5cce710df4359e88079d9d9 (commit)
       via  fc8f71159530653f06e3217ec733058ce033d4fb (commit)
       via  7d43289b0a830b2c545b4509ca3df7d8dd510186 (commit)
       via  b41a0dc88850f05a29d0adbf62016e22e625a26e (commit)
       via  1b8c6f710bab05f5864611477838d6b56c673eb5 (commit)
       via  e528d7be81f34ac1789b74ad7415de949a1c19ed (commit)
       via  b61e242edd548a82eb5a492c7ffb16835746ceaa (commit)
       via  32c65526dd56d0bc7e03148dfd407bfa40423fff (commit)
       via  f256218dea09a6d6e3e177b35d333b6881bc6ed7 (commit)
       via  ba77572c9c5e5d5abdff517a1f4e144440d5906f (commit)
       via  bd53a89af2c3104984d46c118e2b7b158155f25c (commit)
       via  c58ab8b3d3623ccd57d63077f902eda632faaf7d (commit)
       via  59ccbfc493c091ebfe6d2a71d61026d9abf5a77c (commit)
       via  ef373b282be4a218a92e9981fc0c3163c181603b (commit)
       via  0a84ba53e4041c3d0afcab7caf954529b60b6f63 (commit)
       via  768256f0d324d42905eb9f3832c054193cd750b2 (commit)
       via  162d8a50bf6df93a6bc24d06e9042b5026c088ee (commit)
       via  41e944174785ff3370b4e165d491e8ff92cc0827 (commit)
       via  f860396ac01e1581dfe5f56ca30434c8b01b4270 (commit)
       via  be2641c8edb8a41556c4a0d9c2d86fb023917792 (commit)
       via  1ea02fa8ec59f386d62f04a0ef3c1adb77fd5319 (commit)
       via  3fa68dd21a3f9a62ca80400e48832d0e6225a2ea (commit)
       via  c977ec5bbe15874cd222c0b181c8c75419975224 (commit)
       via  4f75a2866c33895ced0757ea9f12e31fc40ba093 (commit)
       via  fc2f64b78c4c57c4c3b8fea3233a9fd3f52147f6 (commit)
       via  1de67641a3e4c2c0bfcfa244a455543af8797ac0 (commit)
       via  0d651e8263be7bee4cbbf00f8e58f4b09e15f447 (commit)
       via  a6453ee3997ea4797c32ebd103a14f60bd6930d5 (commit)
       via  85f9eed8c9e2add8d2cb62a7a5b84f5ec9e67bd5 (commit)
       via  4cc73e761cbe287f3d79572a07054d22316e665a (commit)
       via  7e5c7f003fefb179ba7d4861a6bbea00b74ff064 (commit)
       via  575abed0a58ba2e9f321b8ccc121a32356c7288d (commit)
       via  b0d2423c8b01c4432c7289f9648213e16406174a (commit)
       via  1dda9776c5a1f55037ac61f5290593e25a5677cb (commit)
       via  34797f06098f619838f094d9af7ec1a8c3ad4724 (commit)
       via  b49bbffd540cb56846df38c934fb05b14fbb61dd (commit)
       via  14ca1270f07e4bd0ce0debd064cd5a4c9c8a0372 (commit)
       via  8e234734142c206ccdf66647e05567b10d5cfd72 (commit)
       via  a04d0359ca706f2a8ce2a3b21464c9ba6e062785 (commit)
       via  289eae68054b0f290bdab7f0e14660493548dadf (commit)
       via  3246440509df7b0d357d507039ab408e03a7a355 (commit)
       via  c486b08a719eca0b3bb87bb5faa81602e4c65ab6 (commit)
       via  5f4c5725e89df126109a572417fd3f6ac36b3d8b (commit)
       via  384cb9af005a7ca75d7599aa2f356e9904024a90 (commit)
       via  cfa23a3f19760c5266a9f4be0ad9302c977bfe8a (commit)
       via  a6bfcd47c9f662ac6dd4a2318d96579737a12837 (commit)
       via  09511d65f232bb4d04758c6e124a8649f20ad19b (commit)
       via  57993cd407779a00004dc426cb282f06bccb5bd5 (commit)
       via  413750665895171f8eae4c8d86ff672b04a8f7cd (commit)
       via  b874caeeddf70e7b3911a4312494c8ae6de1ffd4 (commit)
       via  89e5e5522e81f9f9be4351eb6aab5f346a35586d (commit)
       via  448088a4f28ccdf90471cb60642d28bd4fdfd589 (commit)
       via  abbaa0220ce9faf1e97fd4845ee7f78076436193 (commit)
       via  0ffdaa56376184435e2ebb6b59dac42fbde51ab9 (commit)
       via  47ce4d4e87b887297289ff6511bde2feb807a476 (commit)
       via  e2736843dca94388a5ad562b7096a53451e2d037 (commit)
       via  9394b46cf8c83c0cfa83e73a34886aeb9f63913b (commit)
       via  66b54622b2edd8c6f41fb76950e81121813804e2 (commit)
       via  66c548481a50dbbaaa4f886d41af64cc39a5bfa3 (commit)
       via  b694e978ae5146b198914f8e114fff6333a75662 (commit)
       via  1f56ea5e07117170b407e17cc298ea9a79b60860 (commit)
       via  706a6986e046909d0035038412d759ba1e6c199c (commit)
       via  1624b232fe8cd35ab4a88ae0aa7d74498d98e3c9 (commit)
       via  591d2f8183dbed4dce5734ae09e5c2d2cb2de8c3 (commit)
       via  ae5e868cf90a06e489748299eca32564f248d52b (commit)
       via  1a6d54ba8e42b022e2dea6c696ab26ebac0345a2 (commit)
       via  c5ed036baf4b2eea39a2496e8c8267be96766dc2 (commit)
       via  433163526c9c788f53fb52ae4b389e3c77f7dc31 (commit)
       via  fa87159c9237db447843c6523f1daa7da2a67607 (commit)
       via  9ab8adb83f3038c03b8c1619bebcabbffc4e352e (commit)
       via  cb2abe96f218864eb0088c343b3a91ffa6e578e8 (commit)
       via  480dca6e1d5a251dd2ab680f776b46f37a052660 (commit)
       via  871d682ad8f89f934e68326fa6b3d861479321da (commit)
       via  2e6f61b3697981bb4a1af0a4f2738ff786668269 (commit)
       via  f8ba9bd5baffb67df87d1726c8635bb7d5d63ff2 (commit)
       via  49064db0f2c505427f826c7fc9608e39d3a2ffe2 (commit)
       via  72fce78916b051f6d76a4e61de9fb5d26eec10de (commit)
       via  51d7a0addacb9eae0fc88bea5b010a0559b4b887 (commit)
       via  df0ebe1c9b2b5eb5b99f1a5e4140dd13b3a14622 (commit)
       via  397eed56f8c9621c4e6a3fc9910405d5acca69af (commit)
       via  e8b826ae01d1de3261627a3f75ab1bca6b337ce4 (commit)
       via  c75f3b9b6d21058d881faf51736b4221522cc7d3 (commit)
       via  d9ad2557af844f4241a8e9c42cdf7da57d63ac98 (commit)
       via  c5eff00eb9e4e64bac262fbc8f0ff7631c9b5cf8 (commit)
       via  5aa5e56f84e645b9c5238215ef4fdeb0eba28f20 (commit)
       via  dd490ab030f402537f7edac3d1fcd443bc602e68 (commit)
      from  68f3e523c1a9ab857a1031926d7dff2760d26df1 (commit)

Summary of changes:
 .gitmodules                                        |    9 -
 CMakeLists.txt                                     |    7 +-
 cmake                                              |    1 -
 config/Sip.config                                  |    4 +-
 config/SipConfigurator.py                          |  134 ++-
 config/test_sip.conf                               |    2 +
 local-slice/SipConfigurationIf.ice                 |  406 --------
 logger                                             |    1 -
 slice                                              |    1 -
 .../SipSessionManager/SipConfigurationIf.ice       |  493 +++++++++
 .../SipSessionManager}/SipStateReplicationIf.ice   |   41 +-
 {local-slice => slice}/SipIf.ice                   |    0
 src/CMakeLists.txt                                 |  127 ++-
 src/DebugUtil.h                                    |   33 +
 src/{PJSipLoggingModule.h => NATOptions.h}         |   30 +-
 src/PJSipLoggingModule.cpp                         |    1 +
 src/PJSipManager.cpp                               |  290 ++++--
 src/PJSipManager.h                                 |   80 +-
 src/PJSipModule.h                                  |    4 +-
 src/PJSipRegistrarModule.cpp                       |  831 +++++++++++++++
 src/PJSipRegistrarModule.h                         |  203 ++++
 src/PJSipRegistrarModuleConstruction.cpp           |  104 ++
 src/PJSipSessionModule.cpp                         |  303 ++++--
 src/PJSipSessionModule.h                           |   30 +-
 src/PJSipSessionModuleConstruction.cpp             |   44 +-
 src/PJUtil.h                                       |   37 +
 src/STUNModule.cpp                                 |  157 +++
 src/STUNModule.h                                   |  101 ++
 src/STUNTransport.cpp                              |  416 ++++++++
 src/STUNTransport.h                                |   44 +
 src/STUNTransportConfig.cpp                        |  131 +++
 src/STUNTransportConfig.h                          |   52 +
 src/SipConfiguration.cpp                           |  261 ++++--
 src/SipConfiguration.h                             |    2 +-
 src/SipEndpoint.cpp                                |  352 +++++--
 src/SipEndpoint.h                                  |  105 ++-
 src/SipEndpointFactory.cpp                         |   28 +-
 src/SipEndpointFactory.h                           |    9 +-
 src/SipModule.h                                    |   68 ++
 src/SipRegistrarListener.cpp                       |  113 ++
 src/SipRegistrarListener.h                         |   46 +
 src/SipSession.cpp                                 | 1090 +++++++++++++++++---
 src/SipSession.h                                   |   68 +-
 src/SipSessionManagerApp.cpp                       |   67 +-
 src/SipSessionManagerEndpointLocator.cpp           |   14 +-
 src/SipStateReplicator.h                           |   13 +-
 src/SipStateReplicatorApp.cpp                      |   13 +-
 src/SipStateReplicatorListener.cpp                 |  190 ++++-
 src/TCPTransport.cpp                               |  111 ++
 src/TCPTransport.h                                 |   41 +
 src/TLSTransport.cpp                               |   93 ++
 src/TLSTransport.h                                 |   43 +
 src/Transports.cpp                                 |   71 ++
 src/Transports.h                                   |   74 ++
 src/UDPTransport.cpp                               |  117 +++
 src/UDPTransport.h                                 |   41 +
 56 files changed, 5959 insertions(+), 1188 deletions(-)
 delete mode 100644 .gitmodules
 delete mode 160000 cmake
 delete mode 100644 local-slice/SipConfigurationIf.ice
 delete mode 160000 logger
 delete mode 160000 slice
 create mode 100644 slice/AsteriskSCF/Configuration/SipSessionManager/SipConfigurationIf.ice
 rename {local-slice => slice/AsteriskSCF/Replication/SipSessionManager}/SipStateReplicationIf.ice (81%)
 rename {local-slice => slice}/SipIf.ice (100%)
 create mode 100644 src/DebugUtil.h
 copy src/{PJSipLoggingModule.h => NATOptions.h} (50%)
 create mode 100644 src/PJSipRegistrarModule.cpp
 create mode 100644 src/PJSipRegistrarModule.h
 create mode 100644 src/PJSipRegistrarModuleConstruction.cpp
 create mode 100644 src/PJUtil.h
 create mode 100644 src/STUNModule.cpp
 create mode 100644 src/STUNModule.h
 create mode 100644 src/STUNTransport.cpp
 create mode 100644 src/STUNTransport.h
 create mode 100644 src/STUNTransportConfig.cpp
 create mode 100644 src/STUNTransportConfig.h
 create mode 100644 src/SipModule.h
 create mode 100644 src/SipRegistrarListener.cpp
 create mode 100644 src/SipRegistrarListener.h
 mode change 100644 => 100755 src/SipSession.cpp
 create mode 100644 src/TCPTransport.cpp
 create mode 100644 src/TCPTransport.h
 create mode 100644 src/TLSTransport.cpp
 create mode 100644 src/TLSTransport.h
 create mode 100644 src/Transports.cpp
 create mode 100644 src/Transports.h
 create mode 100644 src/UDPTransport.cpp
 create mode 100644 src/UDPTransport.h


- Log -----------------------------------------------------------------
commit d5456aa0f5700ef9d53821e9695411fa2e0801fd
Merge: 68f3e52 e2a3f36
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Jul 21 10:31:59 2011 -0500

    Merge branch 'master' into authexten
    
    Conflicts:
    	src/CMakeLists.txt
    	src/PJSipManager.cpp
    	src/PJSipManager.h
    	src/PJSipModule.h
    	src/SipSessionManagerApp.cpp

diff --cc src/CMakeLists.txt
index 9ac151e,88354c0..c5b8ec6
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@@ -5,63 -5,82 +5,84 @@@ if(OPENSSL_FOUND
  endif()
  
  include_directories(${logger_dir}/include)
- include_directories(${ice-util-cpp_dir}/include)
- include_directories(${API_INCLUDE_DIR})
+ include_directories(${astscf-ice-util-cpp_dir}/include)
  
- asterisk_scf_slice_include_directories(${API_SLICE_DIR})
+ astscf_component_init(SipSessionManager)
+ astscf_component_add_files(SipSessionManager SipSessionManagerApp.cpp)
+ astscf_component_add_files(SipSessionManager SipSessionManagerEventPublisher.cpp)
+ astscf_component_add_files(SipSessionManager SipSessionManagerEventPublisher.h)
+ astscf_component_add_files(SipSessionManager SipSessionManagerEndpointLocator.cpp)
+ astscf_component_add_files(SipSessionManager SipSessionManagerEndpointLocator.h)
+ astscf_component_add_files(SipSessionManager SipEndpointFactory.cpp)
+ astscf_component_add_files(SipSessionManager SipEndpointFactory.h)
+ astscf_component_add_files(SipSessionManager SipEndpoint.cpp)
+ astscf_component_add_files(SipSessionManager SipEndpoint.h)
+ astscf_component_add_files(SipSessionManager SipSession.cpp)
+ astscf_component_add_files(SipSessionManager SipSession.h)
+ astscf_component_add_files(SipSessionManager PJSipManager.cpp)
+ astscf_component_add_files(SipSessionManager PJSipManager.h)
+ astscf_component_add_files(SipSessionManager PJSipModule.cpp)
+ astscf_component_add_files(SipSessionManager PJSipModule.h)
+ astscf_component_add_files(SipSessionManager PJSipSessionModule.cpp)
+ astscf_component_add_files(SipSessionManager PJSipSessionModuleConstruction.cpp)
+ astscf_component_add_files(SipSessionManager PJSipSessionModule.h)
+ astscf_component_add_files(SipSessionManager PJSipLoggingModule.cpp)
+ astscf_component_add_files(SipSessionManager PJSipLoggingModuleConstruction.cpp)
+ astscf_component_add_files(SipSessionManager PJSipLoggingModule.h)
+ astscf_component_add_files(SipSessionManager PJSipRegistrarModule.cpp)
+ astscf_component_add_files(SipSessionManager PJSipRegistrarModuleConstruction.cpp)
+ astscf_component_add_files(SipSessionManager PJSipRegistrarModule.h)
++astscf_component_add_files(SipSessionManager AuthManager.cpp)
++astscf_component_add_files(SipSessionManager AuthManager.h)
+ astscf_component_add_files(SipSessionManager SipConfiguration.cpp)
+ astscf_component_add_files(SipSessionManager SipConfiguration.h)
+ astscf_component_add_files(SipSessionManager SipStateReplicatorListener.cpp)
+ astscf_component_add_files(SipSessionManager SipStateReplicator.h)
+ astscf_component_add_files(SipSessionManager Transports.cpp)
+ astscf_component_add_files(SipSessionManager Transports.h)
+ astscf_component_add_files(SipSessionManager UDPTransport.cpp)
+ astscf_component_add_files(SipSessionManager UDPTransport.h)
+ astscf_component_add_files(SipSessionManager TCPTransport.cpp)
+ astscf_component_add_files(SipSessionManager TCPTransport.h)
+ astscf_component_add_files(SipSessionManager TLSTransport.cpp)
+ astscf_component_add_files(SipSessionManager TLSTransport.h)
+ astscf_component_add_files(SipSessionManager PJUtil.h)
+ astscf_component_add_files(SipSessionManager DebugUtil.h)
+ astscf_component_add_files(SipSessionManager SipModule.h)
+ astscf_component_add_files(SipSessionManager STUNModule.cpp)
+ astscf_component_add_files(SipSessionManager STUNModule.h)
+ astscf_component_add_files(SipSessionManager STUNTransport.cpp)
+ astscf_component_add_files(SipSessionManager STUNTransport.h)
+ astscf_component_add_files(SipSessionManager STUNTransportConfig.cpp)
+ astscf_component_add_files(SipSessionManager STUNTransportConfig.h)
+ astscf_component_add_files(SipSessionManager NATOptions.h)
+ astscf_component_add_files(SipSessionManager SipRegistrarListener.cpp)
+ astscf_component_add_files(SipSessionManager SipRegistrarListener.h)
+ astscf_component_add_slices(SipSessionManager PROJECT SipIf.ice)
+ astscf_component_add_slices(SipSessionManager PROJECT AsteriskSCF/Replication/SipSessionManager/SipStateReplicationIf.ice)
+ astscf_component_add_slices(SipSessionManager PROJECT AsteriskSCF/Configuration/SipSessionManager/SipConfigurationIf.ice)
+ astscf_component_add_ice_libraries(SipSessionManager IceStorm)
+ astscf_component_add_boost_libraries(SipSessionManager core)
+ astscf_component_add_slice_collection_libraries(SipSessionManager ASTSCF)
+ astscf_component_build_icebox(SipSessionManager)
+ target_link_libraries(SipSessionManager logging-client astscf-ice-util-cpp ${OPENSSL_LIBRARIES})
  
- asterisk_scf_component_init(SipSessionManager)
- asterisk_scf_component_add_file(SipSessionManager SipSessionManagerApp.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipSessionManagerEventPublisher.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipSessionManagerEventPublisher.h)
- asterisk_scf_component_add_file(SipSessionManager SipSessionManagerEndpointLocator.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipSessionManagerEndpointLocator.h)
- asterisk_scf_component_add_file(SipSessionManager SipEndpointFactory.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipEndpointFactory.h)
- asterisk_scf_component_add_file(SipSessionManager SipEndpoint.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipEndpoint.h)
- asterisk_scf_component_add_file(SipSessionManager SipSession.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipSession.h)
- asterisk_scf_component_add_file(SipSessionManager PJSipManager.cpp)
- asterisk_scf_component_add_file(SipSessionManager PJSipManager.h)
- asterisk_scf_component_add_file(SipSessionManager PJSipModule.cpp)
- asterisk_scf_component_add_file(SipSessionManager PJSipModule.h)
- asterisk_scf_component_add_file(SipSessionManager PJSipSessionModule.cpp)
- asterisk_scf_component_add_file(SipSessionManager PJSipSessionModuleConstruction.cpp)
- asterisk_scf_component_add_file(SipSessionManager PJSipSessionModule.h)
- asterisk_scf_component_add_file(SipSessionManager PJSipLoggingModule.cpp)
- asterisk_scf_component_add_file(SipSessionManager PJSipLoggingModuleConstruction.cpp)
- asterisk_scf_component_add_file(SipSessionManager PJSipLoggingModule.h)
- asterisk_scf_component_add_file(SipSessionManager AuthManager.cpp)
- asterisk_scf_component_add_file(SipSessionManager AuthManager.h)
- asterisk_scf_component_add_file(SipSessionManager SipConfiguration.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipConfiguration.h)
- asterisk_scf_component_add_file(SipSessionManager SipStateReplicatorListener.cpp)
- asterisk_scf_component_add_file(SipSessionManager SipStateReplicator.h)
- asterisk_scf_component_add_slice(SipSessionManager ../local-slice/SipIf.ice)
- asterisk_scf_component_add_slice(SipSessionManager ../local-slice/SipStateReplicationIf.ice)
- asterisk_scf_component_add_slice(SipSessionManager ../local-slice/SipConfigurationIf.ice)
- asterisk_scf_component_add_ice_libraries(SipSessionManager IceStorm)
- asterisk_scf_component_add_boost_libraries(SipSessionManager core)
- asterisk_scf_component_build_icebox(SipSessionManager)
- target_link_libraries(SipSessionManager logging-client ice-util-cpp ${OPENSSL_LIBRARIES})
  pjproject_link(SipSessionManager pjsip)
  pjproject_link(SipSessionManager pjmedia)
+ pjproject_link(SipSessionManager pjnath)
  pjproject_link(SipSessionManager pjlib-util)
  pjproject_link(SipSessionManager pjlib)
- asterisk_scf_component_install(SipSessionManager)
+ astscf_component_install(SipSessionManager)
  
- asterisk_scf_component_init(SipStateReplicator)
- asterisk_scf_component_add_file(SipStateReplicator SipStateReplicatorApp.cpp)
- asterisk_scf_component_add_file(SipStateReplicator SipStateReplicator.h)
- asterisk_scf_component_add_slice(SipStateReplicator ../local-slice/SipStateReplicationIf.ice)
- asterisk_scf_component_add_slice(SipStateReplicator ../local-slice/SipIf.ice)
- asterisk_scf_component_add_slice(SipStateReplicator ../local-slice/SipConfigurationIf.ice)
- asterisk_scf_component_add_ice_libraries(SipStateReplicator IceStorm)
- asterisk_scf_component_add_ice_libraries(SipStateReplicator IceBox)
- asterisk_scf_component_add_boost_libraries(SipStateReplicator thread date_time)
- asterisk_scf_component_build_icebox(SipStateReplicator)
- target_link_libraries(SipStateReplicator logging-client)
- target_link_libraries(SipStateReplicator asterisk-scf-api)
- target_link_libraries(SipStateReplicator ice-util-cpp)
- asterisk_scf_component_install(SipStateReplicator)
+ astscf_component_init(SipStateReplicator)
+ astscf_component_add_files(SipStateReplicator SipStateReplicatorApp.cpp)
+ astscf_component_add_files(SipStateReplicator SipStateReplicator.h)
+ astscf_component_add_slices(SipStateReplicator PROJECT SipIf.ice)
+ astscf_component_add_slices(SipStateReplicator PROJECT AsteriskSCF/Replication/SipSessionManager/SipStateReplicationIf.ice)
+ astscf_component_add_slices(SipStateReplicator PROJECT AsteriskSCF/Configuration/SipSessionManager/SipConfigurationIf.ice)
+ astscf_component_add_ice_libraries(SipStateReplicator IceStorm)
+ astscf_component_add_boost_libraries(SipStateReplicator thread date_time)
+ astscf_component_add_slice_collection_libraries(SipStateReplicator ASTSCF)
+ astscf_component_build_icebox(SipStateReplicator)
+ target_link_libraries(SipStateReplicator logging-client astscf-ice-util-cpp)
+ astscf_component_install(SipStateReplicator)
diff --cc src/PJSipManager.cpp
index 084ecb6,0b096f8..eab06d5
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@@ -16,70 -16,43 +16,81 @@@
  
  #include "PJSipManager.h"
  #include <AsteriskSCF/logger.h>
+ #include <AsteriskSCF/System/ExceptionsIf.h>
  
  #include <boost/lexical_cast.hpp>
+ #include <boost/shared_ptr.hpp>
+ #include <boost/thread/locks.hpp>
+ #include <vector>
+ 
+ #include "PJUtil.h"
+ #include "STUNModule.h"
+ #include "UDPTransport.h"
+ #include <boost/lexical_cast.hpp>
  
  using namespace AsteriskSCF::System::Logging;
 +using namespace AsteriskSCF::System::Hook::V1;
 +using namespace AsteriskSCF::SIP::ExtensionPoint::V1;
 +using namespace AsteriskSCF::Core::Discovery::V1;
+ using namespace AsteriskSCF::System::V1;
+ using namespace std;
  
  namespace
  {
- Logger lg = getLoggerFactory().getLogger("AsteriskSCF.SipSessionManager");
+ Logger logger = getLoggerFactory().getLogger("AsteriskSCF.SipSessionManager");
+ const std::string RegistrarId("SipRegistrar");
  }
  
 -
  namespace AsteriskSCF
  {
  
  namespace SipSessionManager
  {
  
+ using namespace AsteriskSCF::SIP::Registration::V1;
+ 
 +void PJSipManager::addAuthHook(const AuthHookPrx &hook, int priority, const RequestTypeSeq &types)
 +{
 +    if (mSessionModule)
 +    {
 +        mSessionModule->addAuthHook(hook, priority, types);
 +    }
 +    if (mLoggingModule)
 +    {
 +        mLoggingModule->addAuthHook(hook, priority, types);
 +    }
 +}
 +
 +void PJSipManager::removeAuthHook(const AuthHookPrx &hook)
 +{
 +    if (mSessionModule)
 +    {
 +        mSessionModule->removeAuthHook(hook);
 +    }
 +    if (mLoggingModule)
 +    {
 +        mLoggingModule->removeAuthHook(hook);
 +    }
 +}
 +
 +void PJSipManager::clearAuthHooks()
 +{
 +    if (mSessionModule)
 +    {
 +        mSessionModule->clearAuthHooks();
 +    }
 +    if (mLoggingModule)
 +    {
 +        mLoggingModule->clearAuthHooks();
 +    }
 +}
 +
  static void *monitorThread(void *endpt)
  {
-     pjsip_endpoint *endpoint = static_cast<pjsip_endpoint *> (endpt);
+     PJSipManager* endpoint = reinterpret_cast<PJSipManager*> (endpt);
      for (;;)
      {
-         // No timeout is a bad idea in the long run, but for now,
-         // let's just go with it.
- 	    pj_time_val timeout = {0, 10};
-         pjsip_endpt_handle_events(endpoint, &timeout);
+         endpoint->handleEvents();
      }
  
      return NULL;
diff --cc src/PJSipManager.h
index 8fec6e7,8c1bbc2..f18bc9c
--- a/src/PJSipManager.h
+++ b/src/PJSipManager.h
@@@ -39,18 -40,22 +42,21 @@@ namespace AsteriskSC
  namespace SipSessionManager
  {
  
- /**
-  * This class is responsible for providing
-  * access to the pjsip_endpt for the Asterisk
-  * SCF SIP component.
+ class PJSipManager;
+ typedef boost::shared_ptr<PJSipManager> PJSipManagerPtr;
+ 
+ /*
+  * This class is responsible for providing access to the pjsip_endpoint for the Asterisk SCF SIP component.
   *
-  * In addition, it provides some common functions
-  * that many SIP services will use.
+  * In addition, it provides some common functions that many SIP services will use.
   */
- class PJSipManager
+ class PJSipManager : public boost::enable_shared_from_this<PJSipManager>
  {
  public:
-     PJSipManager(const Ice::CommunicatorPtr &ic);
 -
+     static PJSipManagerPtr create(const Ice::PropertiesPtr& properties);
+ 
+     virtual ~PJSipManager();
+ 
      /**
       * Get a handle to the PJSipEndpoint for operations
       * that may require it
@@@ -84,26 -100,34 +101,37 @@@
       * for logging incoming and outgoing SIP messages
       */
      void registerLoggingModule();
 +    void addAuthHook(const AsteriskSCF::SIP::ExtensionPoint::V1::AuthHookPrx &hook, int priority, const AsteriskSCF::SIP::ExtensionPoint::V1::RequestTypeSeq &types);
 +    void removeAuthHook(const AsteriskSCF::SIP::ExtensionPoint::V1::AuthHookPrx &hook);
 +    void clearAuthHooks();
  
      /**
-      * Create a UDP transport.
+      * Register the PJSIPRegistrar, responsible
+      * for keeping track of bindings of contact URIs to
+      * addresses of record.
       */
-     pjsip_transport *createUDPTransport(std::string, int);
+     void registerRegistrarModule(
+             const AsteriskSCF::SIP::Registration::V1::RegistrarListenerPrx& defaultListener,
+             const AsteriskSCF::Discovery::SmartProxy<AsteriskSCF::Replication::SipSessionManager::V1::SipStateReplicatorPrx>& stateReplicator,
+             Ice::ObjectAdapterPtr& adapter);
  
-     /**
-      * Create a TCP transport.
-      */
-     pjsip_tpfactory *createTCPTransport(std::string, int);
  
+     //
+     // TODO: move this transport collection stuff to a transport manager or something.
+     // PJSipManager does not need it.
+     //
      /**
-      * Create a TLS transport.
-      */
-     pjsip_tpfactory *createTLSTransport(std::string, int, pjsip_tls_setting*);
+      * Add a transport the module. 
+      **/
+     void addTransport(const std::string& id, const TransportPtr& transport);
+     TransportPtr getTransport(const std::string& id);
+ 
+     void addModule(const std::string& id, const SipModulePtr& module);
+     SipModulePtr getModule(const std::string& moduleName);
+ 
+     void handleEvents();
+ 
  private:
-     static PJSipManager *mInstance;
      pjsip_endpoint *mEndpoint;
      PJSipSessionModulePtr mSessionModule;
      PJSipLoggingModulePtr mLoggingModule;
diff --cc src/PJSipModule.h
index e954ac4,175dd33..be85772
--- a/src/PJSipModule.h
+++ b/src/PJSipModule.h
@@@ -16,17 -16,12 +16,17 @@@
  
  #pragma once
  
+ #include <pjlib.h>
  #include <string>
 +#include <boost/shared_ptr.hpp>
 +
  #include <pjsip.h>
  #include <pjsip_ua.h>
- #include <pjlib.h>
  
  #include <SipStateReplicationIf.h>
 +#include <AsteriskSCF/System/Hook/HookIf.h>
 +#include <AsteriskSCF/SIP/SIPExtensionPointIf.h>
 +#include "AuthManager.h"
  
  namespace AsteriskSCF
  {
diff --cc src/PJSipSessionModuleConstruction.cpp
index 1efdfea,8bf443b..adcbb8a
--- a/src/PJSipSessionModuleConstruction.cpp
+++ b/src/PJSipSessionModuleConstruction.cpp
@@@ -18,8 -19,15 +19,16 @@@
  #include <AsteriskSCF/ThreadPool/ThreadPool.h>
  
  #include "PJSipSessionModule.h"
 +#include "AuthManager.h"
  
+ using namespace AsteriskSCF::System::Logging;
+ 
+ namespace
+ {
+ Logger lg = getLoggerFactory().getLogger("AsteriskSCF.SipSessionManager");
+ const std::string SessionCreationExtensionPointId("SipSessionCreationExtensionPoint");
+ }
+ 
  namespace AsteriskSCF
  {
  
@@@ -160,8 -174,25 +180,26 @@@ PJSipSessionModule::PJSipSessionModule(
      pjsip_replaces_init_module(endpt);
      pjsip_timer_init_module(endpt);
      pjsip_endpt_register_module(endpt, &mModule);
 +    createAuthManager(endpt);
  }
  
+ PJSipSessionModule::~PJSipSessionModule()
+ {
+     try
+     {
+         mPoolQueue->shutdown();
+         mSessionCreationExtensionPointService->unregister();
+         mAdapter->remove(mAdapter->getCommunicator()->stringToIdentity(SessionCreationExtensionPointId));
+     }
+     catch (const AsteriskSCF::System::WorkQueue::V1::ShuttingDown&)
+     {
+         lg(Warning) << "Attempted to shut down a Queue that is already shut down.";
+     }
+     catch (const Ice::Exception& ex)
+     {
+         lg(Warning) << "Caught exception trying to destroy the PJSipSessionModule: " << ex.what();
+     }
+ }
+ 
  }; //end namespace SipSessionManager
  }; //end namespace AsteriskSCF
diff --cc src/SipSessionManagerApp.cpp
index 9bdbed5,eef459f..5722809
--- a/src/SipSessionManagerApp.cpp
+++ b/src/SipSessionManagerApp.cpp
@@@ -52,10 -53,9 +53,11 @@@ using namespace AsteriskSCF::Core::Rout
  using namespace AsteriskSCF::Core::Discovery::V1;
  using namespace AsteriskSCF::System::Component::V1;
  using namespace AsteriskSCF::System::Logging;
 +using namespace AsteriskSCF::System::Hook::V1;
  using namespace AsteriskSCF::SessionCommunications::V1;
 +using namespace AsteriskSCF::SIP::ExtensionPoint::V1;
  using namespace AsteriskSCF::System::Configuration::V1;
+ using namespace AsteriskSCF::SIP::Registration::V1;
  
  namespace
  {
@@@ -67,38 -67,6 +69,38 @@@ namespace AsteriskSC
  namespace SipSessionManager
  {
  
 +class SipAuthExtensionPoint : public AuthExtensionPoint
 +{
 +public:
-     SipAuthExtensionPoint(PJSipManager *manager)
++    SipAuthExtensionPoint(const PJSipManagerPtr& manager)
 +        : mPJSipManager(manager)
 +    {
 +    }
 +    
 +    void addAuthHook(
 +            const AuthHookPrx &hook,
 +            int priority,
 +            const RequestTypeSeq &requestTypes,
 +            const Ice::Current&)
 +    {
 +        mPJSipManager->addAuthHook(hook, priority, requestTypes);
 +    }
 +    
 +    void removeAuthHook(const AuthHookPrx &hook, const Ice::Current&)
 +    {
 +        mPJSipManager->removeAuthHook(hook);
 +    }
 +    
 +    void clearAuthHooks(const Ice::Current&)
 +    {
 +        mPJSipManager->clearAuthHooks();
 +    }
 +private:
-     PJSipManager *mPJSipManager;
++    PJSipManagerPtr mPJSipManager;
 +};
 +
 +typedef IceUtil::Handle<SipAuthExtensionPoint> SipAuthExtensionPointPtr;
 +
  /**
   * This private class initializes the startup and controls the shutdown of the component.
   */
@@@ -168,13 -126,13 +161,15 @@@ private
      AsteriskSCF::Discovery::SmartProxy<LocatorRegistryPrx> mRoutingServiceLocatorRegistry;
      boost::shared_ptr<SipSessionManagerEventPublisher> mEventPublisher;
      Routing::V1::EndpointLocatorPtr mEndpointLocator;
 +    SipAuthExtensionPointPtr mAuthService;
+     RegistrarListenerPtr mRegistrarListener;
  };
  
  static const string ComponentServiceId("SipChannelComponent");
  static const string EndpointLocatorObjectId("SipChannelEndpointLocator");
  static const string ReplicaServiceId("SipChannelReplica");
 +static const string AuthServiceId("SipAuthExtensionPoint");
+ static const string RegistrarListenerId("SipRegistrarListener");
  
  /**
   * This class provides implementation for the ComponentService interface, which

-----------------------------------------------------------------------


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list