12 #ifndef _SipLineMgr_h_ 13 #define _SipLineMgr_h_ 21 #include "os/OsServerTask.h" 28 #define MAX_LINES 32 // Max number of lines 29 #define MAX_CREDENTIALS 32 // Max number of credentials per line 31 #define BASE_PHONESET_LINE_KEY "PHONESET_LINE." // Base key for device lines 32 #define BASE_USER_LINE_KEY "USER_LINE." // Base key for user lines 33 #define USER_DEFAULT_OUTBOUND_LINE "USER_DEFAULT_OUTBOUND_LINE" // Default outbound line 35 #define LINE_REGISTRATION_PROVISION "PROVISION" // Registration value: Provision 36 #define LINE_REGISTRATION_REGISTER "REGISTER" // Registration value: Register 37 #define LINE_ALLOW_FORWARDING_ENABLE "ENABLE" // Allow Forwarding value: Enable 38 #define LINE_ALLOW_FORWARDING_DISABLE "DISABLE" // Allow Forwarding value: Disable 39 #define LINE_CONTACT_TYPE_LOCAL "LOCAL" // Use local contact/IP 40 #define LINE_CONTACT_TYPE_NAT_MAPPED "NAT_MAPPED" // Use NAT-derived contact/IP 42 #define LINE_PARAM_LINEID "LINEID" // lineID 43 #define LINE_PARAM_URL "URL" // Line Parameter: identity/url 44 #define LINE_PARAM_REGISTRATION "REGISTRATION" // Line Parameter: registration method 45 #define LINE_PARAM_ALLOW_FORWARDING "ALLOW_FORWARDING" // Line Parameter: allow call forwarding 46 #define LINE_PARAM_CONTACT_TYPE "CONTACT_TYPE" // Contact type (LOCAL or NAT_MAPPED) 47 #define LINE_PARAM_CREDENTIAL "CREDENTIAL." // Line Parameter: credential sub key 48 #define LINE_PARAM_CREDENTIAL_REALM "REALM" // Credential Parameter: realm 49 #define LINE_PARAM_CREDENTIAL_USERID "USERID" // Credential Parameter: userid 50 #define LINE_PARAM_CREDENTIAL_PASSTOKEN "PASSTOKEN" // Credential Parameter: Pass token 52 #define DEFAULT_LINE_PARAM_PHONESET_LINE "PHONESET_LINE" // Outbound Line Param: Device line 53 #define DEFAULT_LINE_PARAM_BASE_USER_LINE "USER_LINE." // Outbound Line Param: User line 92 void setOwner(
const UtlString& owner);
95 UtlBoolean doEnable = TRUE);
104 UtlBoolean onStartup = FALSE,
105 const UtlString& lineId =
"");
137 const UtlString strRealm,
138 const UtlString strUserID,
139 const UtlString strPasswd,
140 const UtlString type);
143 const UtlString strRealm );
150 void* observerData = NULL );
153 void* pObserverData = NULL );
178 UtlBoolean
loadLine(OsConfigDb* pConfigDb, UtlString strSubkey,
SipLine& line);
197 const UtlString& toUrl,
198 const UtlString& localContact,
224 UtlString realmList[],
225 UtlString userIdList[],
226 UtlString typeList[],
227 UtlString passTokenList[] );
267 const UtlBoolean& isIncomingRequest = FALSE,
268 const UtlBoolean& fromTempList = FALSE )
const;
276 OsConfigDb *pConfigDb,
280 UtlString strPassToken,
292 OsConfigDb* pConfigDb,
314 UtlBoolean mIsStarted;
315 UtlString mAuthenticationScheme;
316 UtlString mAuthenticationRealm;
317 OsConfigDb* mpAuthenticationDb;
318 OsConfigDb* mpAuthorizationUserIds;
319 OsConfigDb* mpAuthorizationPasswords;
324 Url mDefaultContactUri;
326 UtlHashBag mMessageObservers;
327 OsRWMutex mObserverMutex;
336 #endif // _SipLineMgr_h_ UtlBoolean getUserForLine(const Url &identity, UtlString &User) const
Definition: SipLineMgr.cpp:1360
UtlBoolean getLines(int maxLines, int &actualLines, SipLine *lines[]) const
returns The line identified by the designated To and Local Contact
Definition: SipLineMgr.cpp:463
void setStateForLine(const Url &identity, int state)
Definition: SipLineMgr.cpp:1304
UtlBoolean buildAuthenticatedRequest(const SipMessage *response, const SipMessage *request, SipMessage *newAuthRequest)
Definition: SipLineMgr.cpp:696
UtlBoolean enableLine(const Url &identity)
Definition: SipLineMgr.cpp:311
LINE_CONTACT_TYPE
Line contact type: Use the local address or a NAT-derived address (e.g.
Definition: SipLine.h:35
void purgeLines(OsConfigDb *pConfigDb)
param: (in) pConfigDb - Configuration database to loaded from. param: (in) strSubKey - ROOT sub key o...
Definition: SipLineMgr.cpp:1447
void StartLineMgr()
Definition: SipLineMgr.cpp:97
#define HTTP_DIGEST_AUTHENTICATION
Definition: HttpMessage.h:96
void addMessageObserver(OsMsgQ &messageQueue, void *observerData=NULL)
Definition: SipLineMgr.cpp:1013
UtlBoolean getContactTypeForLine(const Url &identity, LINE_CONTACT_TYPE &eContactType) const
const UtlString & getOwner() const
param: (in) pConfigDb - Configuration database to be cleared.
Definition: SipLineMgr.cpp:408
UtlBoolean addCredentialForLine(const Url &identity, const UtlString strRealm, const UtlString strUserID, const UtlString strPasswd, const UtlString type)
Definition: SipLineMgr.cpp:1140
void getDefaultOutboundLine(UtlString &rOutBoundLine)
Definition: SipLineMgr.cpp:425
void storeLine(OsConfigDb *pConfigDb, UtlString strSubKey, SipLine line)
Definition: SipLineMgr.cpp:1589
void disableLine(const Url &identity, UtlBoolean onStartup=FALSE, const UtlString &lineId="")
Definition: SipLineMgr.cpp:349
void notifyChangeInLineProperties(Url &identity)
param: messageQueue - All observers dispatching to this message queue
Definition: SipLineMgr.cpp:376
void setDefaultContactUri(const Url &contactUri)
Definition: SipLineMgr.cpp:1114
UtlBoolean getEnableForLine(const Url &identity) const
Definition: SipLineMgr.cpp:1270
UtlBoolean isUserIdDefined(const SipMessage *request) const
Definition: SipLineMgr.cpp:685
UtlBoolean getVisibilityForLine(const Url &identity) const
Definition: SipLineMgr.cpp:1331
Definition: SipLineEvent.h:21
Specialization of HttpMessage to contain and manipulate SIP messages.
Definition: SipMessage.h:343
void removeFromTempList(SipLine *line)
Definition: SipLineMgr.cpp:1109
UtlBoolean setContactTypeForLine(const Url &identity, LINE_CONTACT_TYPE eContactType)
void lineHasBeenUnregistered(const Url &identity)
Definition: SipLineMgr.cpp:295
void addToList(SipLine *line)
Definition: SipLineMgr.cpp:1094
void addToTempList(SipLine *line)
Definition: SipLineMgr.cpp:1104
UtlBoolean removeMessageObserver(OsMsgQ &messageQueue, void *pObserverData=NULL)
Definition: SipLineMgr.cpp:1033
void setUserForLine(const Url &identity, const UtlString User)
Definition: SipLineMgr.cpp:1377
void enableAllLines()
Definition: SipLineMgr.cpp:1729
void deleteLine(const Url &identity)
Definition: SipLineMgr.cpp:254
void removeFromList(SipLine *line)
Definition: SipLineMgr.cpp:1100
int getNumLines() const
Definition: SipLineMgr.cpp:475
SipLineMgr(const char *authenticationScheme=HTTP_DIGEST_AUTHENTICATION)
Definition: SipLineMgr.cpp:54
UtlBoolean getCredentialListForLine(const Url &identity, int maxEnteries, int &actualEnteries, UtlString realmList[], UtlString userIdList[], UtlString typeList[], UtlString passTokenList[])
Definition: SipLineMgr.cpp:1205
void setDefaultOutboundLine(const Url &outboundLine)
Definition: SipLineMgr.cpp:414
void setAutoEnableForLine(const Url &identity, UtlBoolean isAutoEnable=TRUE)
Definition: SipLineMgr.cpp:1256
UtlBoolean loadCredential(OsConfigDb *pConfigDb, UtlString strSubKey, SipLine &line)
param: (in) pConfigDb - Configuration database to saved to. param: (in) strSubKey - ROOT sub key of c...
Definition: SipLineMgr.cpp:1658
void setFirstLineAsDefaultOutBound()
Definition: SipLineMgr.cpp:439
UtlBoolean deleteCredentialForLine(const Url &identity, const UtlString strRealm)
Definition: SipLineMgr.cpp:1171
Definition: SipLineMgr.h:67
UtlBoolean getLine(const UtlString &toUrl, const UtlString &localContact, SipLine &sipline) const
Definition: SipLineMgr.cpp:482
UtlBoolean getCanonicalUrlForLine(const Url &identity, UtlString &sipUrl) const
Definition: SipLineMgr.cpp:1425
void setCallHandlingForLine(const Url &identity, UtlBoolean useCallHandling=TRUE)
Definition: SipLineMgr.cpp:1227
virtual ~SipLineMgr()
Definition: SipLineMgr.cpp:77
UtlBoolean handleMessage(OsMsg &eventMessage)
Definition: SipLineMgr.cpp:108
void setVisibilityForLine(const Url &identity, UtlBoolean Visibility=TRUE)
Definition: SipLineMgr.cpp:1346
UtlBoolean loadLine(OsConfigDb *pConfigDb, UtlString strSubkey, SipLine &line)
param: (in) pConfigDb - Configuration database to save to. param: (in) strSubKey - ROOT sub key of co...
Definition: SipLineMgr.cpp:1490
void setOwner(const UtlString &owner)
Definition: SipLineMgr.cpp:401
void setUserEnteredUrlForLine(const Url &identity, UtlString sipUrl)
Definition: SipLineMgr.cpp:1390
UtlBoolean initializeRefreshMgr(SipRefreshMgr *refreshMgr)
Definition: SipLineMgr.cpp:1119
UtlBoolean getUserEnteredUrlForLine(const Url &identity, UtlString &sipUrl) const
Definition: SipLineMgr.cpp:1404
int getNumOfCredentialsForLine(const Url &identity) const
Definition: SipLineMgr.cpp:1190
UtlBoolean addLine(SipLine &line, UtlBoolean doEnable=TRUE)
Definition: SipLineMgr.cpp:226
void notifyChangeInOutboundLine(Url &identity)
Definition: SipLineMgr.cpp:389
Definition: SipLineList.h:33
URL parser and constructor.
Definition: Url.h:90
UtlBoolean getCallHandlingForLine(const Url &identity) const
Definition: SipLineMgr.cpp:1240
void storeCredential(OsConfigDb *pConfigDb, UtlString strSubKey, UtlString strRealm, UtlString strUserId, UtlString strPassToken, UtlString strType)
Definition: SipLineMgr.cpp:1699
Definition: SipRefreshMgr.h:46
SipLineMgr & operator=(const SipLineMgr &rhs)
int getStateForLine(const Url &identity) const
Definition: SipLineMgr.cpp:1288
SipLine * getLineforAuthentication(const SipMessage *request, const SipMessage *response, const UtlBoolean &isIncomingRequest=FALSE, const UtlBoolean &fromTempList=FALSE) const
Definition: SipLineMgr.cpp:541
void queueMessageToObservers(SipLineEvent &event)
Definition: SipLineMgr.cpp:1068