Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avaya (IX) Messaging API

Status
Not open for further replies.

SharkySeph

Technical User
Jun 28, 2019
40
US
Hello all!

Has anybody had any success leveraging Avaya Messaging's (IX Messaging's/ESNA Officelinx's) REST API for creating mailboxes? I can get the authentication and query stuff working, but any POST request fails with a 500 error and I cannot find any logging on the server that is even remotely helpful in what could be going on.

Thanks!
 
Chapter 36 UC WEB API CONFIGURATION

You will need to look at the following locations. It may be on your consolidated server or on your dedicated web servers depending on your configuration.
D:\UC\Logs\UCWebApi\UCWebApi_2023-04-20.log
D:\UC\Logs\DBDriver\w3wp_DBDriver_2023-04-20.log
 
Avaya does not mention this in any of their documentation. By default Configuration->Advanced->Maximum Number of Logon Sessions is set to 3. You need to up it to 20 sessions.
 
Here is the response I see in the w3wp dbdriver file. Some redactions placed. I can't tell what failed.

2023-08-30 14:00:30.4730 [T74] INFO HlpProfile::LoginX, begin, Username: apiadmin, Address: X.X.X.X
2023-08-30 14:00:30.4730 [T74] INFO HlpEEAME::InternalMailboxLogon, begin, param: MailboxID=0, CompanyID=0, MbxNumberUsername=apiadmin, AssignedUsername=, MbxPasswordType=MPT_ALL, PreviewOnly=False, Populate=True, Mailbox=null, LogonResult=RET_OK
2023-08-30 14:00:30.4886 [T74] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:30.5042 [T74] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:30.5042 [T74] INFO HlpEEAME::InternalMailboxLogon, pop3 User Name provided, MbxNumberUsername: apiadmin, MbxPasswordType: MPT_MAIL
2023-08-30 14:00:30.5199 [T74] ERROR HlpEEAME::InternalMailboxLogon, mailbox has not been found
2023-08-30 14:00:30.5355 [T74] INFO HlpReports::ReportMailboxActivityAdd, begin, MbxActivity: maID=0, maCallID=, maDate=20230830, maDateTime=20230830140030, maActivity=408, maActivitySub=1, maCompanyID=0, maMailboxID=0, maMailboxNumber=apiadmin, maCallerIDName=, maCallerIDNumber=, maPortNumber=0, maDuration=0, maDigitsInput=, maLocation=LOCT_INOFFICE, maLocStatus=AV_AVAILABLE, maNameRecognized=, maAttempts=0, maConfidence=0, maGreetingType=GT_NONE, maWakeupTime=, maAddress=, maAddressType=ADDR_TYPE_ALL, maData=login: fail, maVSName=, maDepartmentID=0, maRecognizedDestId=0, maRecognizedDestType=0, maRecognizedNumOrName=, last_updated=1/1/0001 12:00:00 AM,
2023-08-30 14:00:30.5355 [T74] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:30.5511 [T74] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:30.5667 [T74] INFO HlpReports::ReportMailboxActivityAdd, end: RET_OK
2023-08-30 14:00:30.5667 [T74] INFO HlpEEAME::InternalMailboxLogon, end: RET_NOREC, param: MailboxID=0, CompanyID=0, MbxNumberUsername=apiadmin, AssignedUsername=, MbxPasswordType=MPT_MAIL, PreviewOnly=False, Populate=True, Mailbox=null, LogonResult=RET_NOREC
2023-08-30 14:00:30.5667 [T74] INFO HlpUser::Login, begin, request: Username=apiadmin, Password: SHHHHHH, Address=X.X.X.X, User=ID=0, Name=, FullName=, AccountDisabled=False, EditConfig=False, EditUser=False, AddEditPBX=False, AddEdit=False, AddMailboxesRange=False, AddMailbox=False, EditMailbox=False, Log=False, Backup=False, Report=False, Install=False, RelatedCompany=0, DomainAccount=, SuccessAddress=, SuccessTime=, FailAddress=, FailTime=, FailAttempts=, Description=, Password=, Language=LNG_NONE, FirstName=, LastName=, UserPassNumAttempts=0, UserLockedTime=, UserPassChangedDate=, LoginDelayUntil=, SessionID=, Auditor=False,
2023-08-30 14:00:30.5824 [T74] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:30.5980 [T74] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:30.6136 [T74] INFO HlpUser::Login, maxLoginAttempts: 6, loginDelay: 15, lastSuccessAddress: X.X.X.X, lastSuccessTime: 8/30/2023 1:45:17 PM, lastFailAddress: , lastFailTime:
2023-08-30 14:00:30.6293 [T74] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:30.6449 [T74] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:30.6605 [T74] INFO HlpUser::Login, end: RET_OK, request.User: ID=35, Name=apiadmin, FullName=API Admin, AccountDisabled=False, EditConfig=True, EditUser=True, AddEditPBX=True, AddEdit=True, AddMailboxesRange=True, AddMailbox=True, EditMailbox=True, Log=True, Backup=True, Report=True, Install=True, RelatedCompany=0, DomainAccount=, SuccessAddress=X.X.X.X, SuccessTime=8/30/2023 1:45:17 PM, FailAddress=, FailTime=, FailAttempts=, Description=API Admin, Password=, Language=LNG_ENGLISH, FirstName=, LastName=, UserPassNumAttempts=0, UserLockedTime=, UserPassChangedDate=202308301029, LoginDelayUntil=, SessionID=, Auditor=False,
2023-08-30 14:00:30.6761 [T74] INFO HlpProfile::LoginX, end: Result=RET_OK, Profile=(id=35, username=apiadmin, profileType=Admin, firstname=, lastname=, MailboxSettings: (), AdminSettings: (ID=35, Name=apiadmin, FullName=API Admin, AccountDisabled=False, EditConfig=True, EditUser=True, AddEditPBX=True, AddEdit=True, AddMailboxesRange=True, AddMailbox=True, EditMailbox=True, Log=True, Backup=True, Report=True, Install=True, RelatedCompany=0, DomainAccount=, SuccessAddress=X.X.X.X, SuccessTime=8/30/2023 1:45:17 PM, FailAddress=, FailTime=, FailAttempts=, Description=API Admin, Password=, Language=LNG_ENGLISH, FirstName=, LastName=, UserPassNumAttempts=0, UserLockedTime=, UserPassChangedDate=202308301029, LoginDelayUntil=, SessionID=, Auditor=False, ))
2023-08-30 14:00:30.6917 [T74] INFO HlpUser::GetSecretCode, admin has been found
2023-08-30 14:00:30.6917 [T74] INFO Helper::AddTUID, begin, request: (TUID: SHHHHHH, Expiry: 9/6/2023 2:00:30 PM, ProfileID: 35, ProfileType: Admin)
2023-08-30 14:00:30.7074 [T74] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:30.7074 [T74] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:30.7386 [T74] INFO Helper::AddTUID, maxLogonSessions: 3, tokens: 2, sessions: 0, tokens+sessions: 2, proceed: True
2023-08-30 14:00:30.7386 [T74] INFO Helper::AddTUID, end: RET_OK
2023-08-30 14:00:36.5367 [T75] INFO HlpUser::GetSecretCode, admin has been found
2023-08-30 14:00:36.5523 [T75] INFO Helper::CheckTUID, begin, TUID: REDACTED
2023-08-30 14:00:36.5523 [T75] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:36.5679 [T75] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:36.5836 [T75] INFO Helper::CheckTUID, end: RET_OK
2023-08-30 14:00:36.5992 [T75] INFO Helper::DisableTUID, begin, request: (tuid=SHHHHHH, reason=NoReason, login=Username=apiadmin, Address=, User=ID=35, Name=apiadmin, FullName=API Admin, AccountDisabled=False, EditConfig=True, EditUser=True, AddEditPBX=True, AddEdit=True, AddMailboxesRange=True, AddMailbox=True, EditMailbox=True, Log=True, Backup=True, Report=True, Install=True, RelatedCompany=0, DomainAccount=, SuccessAddress=X.X.X.X, SuccessTime=8/30/2023 5:45:17 PM, FailAddress=, FailTime=, FailAttempts=, Description=, Password=, Language=LNG_NONE, FirstName=, LastName=, UserPassNumAttempts=0, UserLockedTime=, UserPassChangedDate=, LoginDelayUntil=, SessionID=, Auditor=False, , )
2023-08-30 14:00:36.6148 [T75] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:36.6304 [T75] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:36.6461 [T75] INFO HlpVoiceServer::ServerRole, begin
2023-08-30 14:00:36.6461 [T75] INFO HlpVoiceServer::ServerRole, end: ROLE_PRIMARYCOMMON
2023-08-30 14:00:36.6773 [T75] INFO Helper::DisableTUID, end: RET_OK
 
The UCWebApi file seems like even less info:

2023-08-30 14:00:30.4574 [T74] INFO CustomThrottlingHandler::SetIdentity, endPoint: /ucwebapi/api/1.0/login/native, clientIP: X.X.X.X
2023-08-30 14:00:30.4574 [T74] INFO LoginController::NativeLogin, begin, username: apiadmin
2023-08-30 14:00:30.4730 [T74] INFO LocalHelper::ValidateNativeLoginX, begin, username: apiadmin
2023-08-30 14:00:30.6761 [T74] INFO LocalHelper::ValidateNativeLoginX, end: apiadmin logged in successfully
2023-08-30 14:00:30.7542 [T74] INFO LoginController::NativeLogin, token.loginStats: successAddress=X.X.X.X, successTime=8/30/2023 1:45:17 PM, failAddress=, failTime=, failAttempts=
2023-08-30 14:00:30.7542 [T74] INFO LoginController::NativeLogin, end: System.Web.Http.Results.OkNegotiatedContentResult`1[UCWebApi.EsnaJWT]
2023-08-30 14:00:30.7542 [T74] INFO StrictTransportSecurityAttribute::OnActionExecuted, binding: https
2023-08-30 14:00:36.4586 [T69] INFO CustomThrottlingHandler::SetIdentity, endPoint: /ucwebapi/api/1.0/mailboxes, clientIP: X.X.X.X
2023-08-30 14:00:36.5211 [T75] INFO CustomThrottlingHandler::SetIdentity, endPoint: /ucwebapi/api/1.0/logout/, clientIP: X.X.X.X
2023-08-30 14:00:36.5211 [T75] INFO AuthWebApiUsingJWTAttribute::IsAuthorized, begin, RequestUri: GET 2023-08-30 14:00:36.5836 [T75] INFO AuthWebApiUsingJWTAttribute::IsAuthorized, end: True
2023-08-30 14:00:36.5992 [T75] INFO LogoutController::Invalidate, begin
2023-08-30 14:00:36.5992 [T75] INFO JWTHelper::Invalidate, begin
2023-08-30 14:00:36.6929 [T75] INFO JWTHelper::Invalidate, end: RET_OK
2023-08-30 14:00:36.6929 [T75] INFO LogoutController::Invalidate, end
2023-08-30 14:00:36.6929 [T75] INFO StrictTransportSecurityAttribute::OnActionExecuted, binding: https
 
Do you have valid SSL certificates on your web servers? It looks like you are able to successfully authenticate with apiadmin.

Update the MaxLogonSessions from 3 to 20.
2023-08-30 14:00:30.7386 [T74] INFO Helper::AddTUID, maxLogonSessions: 3, tokens: 2, sessions: 0, tokens+sessions: 2, proceed: True

This indicates whatever number you are passing is not found in the voicemail system. I would say the issue is with your API configuration.
2023-08-30 14:00:30.5199 [T74] ERROR HlpEEAME::InternalMailboxLogon, mailbox has not been found
 
So I found out what was causing it, but there really wasn't any indication on the server as to the issue. The issue was the code was nesting the JSON inside of another JSON creating an invalid POST.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top