AccelerateNetworks / NumberSearch

Line of business tooling for VOIP services.
https://acceleratenetworks.com/
GNU Affero General Public License v3.0
11 stars 1 forks source link

[BUG] Ops - Registering email to SMS in Messaging Users results in error page #425

Closed danry25 closed 12 months ago

danry25 commented 12 months ago

What is broken? When I put a phone number and email address in to register in Messaging Users in Ops, I get the error shown below and the number is not registered for messaging service: image

image

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Messaging Users'
  2. Enter a phone number and email under "Register a Phone Number for Messaging to Email Service"
  3. Press Register
  4. See error

Expected behavior The phone number should be registered for messaging service with a destination of the email address provided.

uncheckederror commented 12 months ago

@danry25 do you have logs?

danry25 commented 12 months ago

Sure, here you go:

2023-11-01 15:02:24.459 -07:00 [INF] Executed DbCommand (3ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
SELECT o."OwnedPhoneNumberId", o."Active", o."BillingClientId", o."DateIngested", o."DateUpdated", o."DialedNumber", o."EmergencyInformationId", o."FPBXDestinationId", o."FPBXDomainDescription", o."FPBXDomainId", o."FPBXDomainName", o."FusionPBXClientId", o."IngestedFrom", o."LIDBCNAM", o."Notes", o."OwnedBy", o."SMSRoute", o."SPID", o."SPIDName", o."Status", o."TwilioCarrierName"
FROM "OwnedPhoneNumbers" AS o
2023-11-01 15:02:24.846 -07:00 [INF] Executing ViewResult, running view Index.
2023-11-01 15:02:24.961 -07:00 [INF] Executed ViewResult - view Index executed in 118.5318ms.
2023-11-01 15:02:24.966 -07:00 [INF] Executed action NumberSearch.Ops.Controllers.MessagingController.IndexAsync (NumberSearch.Ops) in 1069.4539ms
2023-11-01 15:02:24.967 -07:00 [INF] Executed endpoint 'NumberSearch.Ops.Controllers.MessagingController.IndexAsync (NumberSearch.Ops)'
2023-11-01 15:02:24.970 -07:00 [INF] Request finished HTTP/1.1 GET http://ops.acceleratenetworks.com/Messaging - - - 200 - text/html;+charset=utf-8 1100.5623ms
2023-11-01 15:02:32.618 -07:00 [INF] Request starting HTTP/1.1 POST http://ops.acceleratenetworks.com/Messaging/ToEmail application/x-www-form-urlencoded 299
2023-11-01 15:02:32.648 -07:00 [INF] Executing endpoint 'NumberSearch.Ops.Controllers.MessagingController.MessagingToEmailAsync (NumberSearch.Ops)'
2023-11-01 15:02:32.658 -07:00 [INF] Route matched with {action = "MessagingToEmail", controller = "Messaging", page = "", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] MessagingToEmailAsync(NumberSearch.Ops.Models.ToEmailRequest) on controller NumberSearch.Ops.Controllers.MessagingController (NumberSearch.Ops).
2023-11-01 15:02:33.912 -07:00 [INF] {"route":"RouteToEmail","epid":14,"epname":"ESMail","eptype":"EMAIL","additional":"redacted@redacted.com","QueryResult":{"code":0,"text":"OK"}}
2023-11-01 15:02:34.321 -07:00 [INF] {"code":-1,"text":"That number is already provisioned/Unavailable."}
2023-11-01 15:02:34.784 -07:00 [INF] {"code":0,"text":"Routed OK!"}
2023-11-01 15:02:35.114 -07:00 [INF] {"route":"RouteToEmail","epid":14,"epname":"ESMail","eptype":"EMAIL","additional":"redacted@redacted.com","QueryResult":{"code":0,"text":"OK"}}
2023-11-01 15:02:35.143 -07:00 [INF] Executed action NumberSearch.Ops.Controllers.MessagingController.MessagingToEmailAsync (NumberSearch.Ops) in 2483.0163ms
2023-11-01 15:02:35.144 -07:00 [INF] Executed endpoint 'NumberSearch.Ops.Controllers.MessagingController.MessagingToEmailAsync (NumberSearch.Ops)'
2023-11-01 15:02:35.148 -07:00 [ERR] An unhandled exception has occurred while executing the request.
Flurl.Http.FlurlHttpException: Call failed with status code 404 (Not Found): GET https://sms.callpipe.com/client?asDialed=2064623200
   at Flurl.Http.FlurlRequest.HandleExceptionAsync(FlurlCall call, Exception ex, CancellationToken token)
   at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)
   at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)
   at Flurl.Http.ResponseExtensions.ReceiveJson[T](Task`1 response)
   at NumberSearch.Ops.Controllers.MessagingController.MessagingToEmailAsync(ToEmailRequest toEmail) in /home/vsts/work/1/s/NumberSearch.Ops/Controllers/MessagingController.cs:line 228
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context)
   at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context)
   at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
2023-11-01 15:02:35.187 -07:00 [INF] Executing endpoint 'NumberSearch.Ops.Controllers.HomeController.Error (NumberSearch.Ops)'
2023-11-01 15:02:35.190 -07:00 [INF] Route matched with {action = "Error", controller = "Home", page = "", area = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult Error() on controller NumberSearch.Ops.Controllers.HomeController (NumberSearch.Ops).
2023-11-01 15:02:35.195 -07:00 [INF] Executing ViewResult, running view Error.
2023-11-01 15:02:35.201 -07:00 [INF] Executed ViewResult - view Error executed in 8.0382ms.
2023-11-01 15:02:35.202 -07:00 [INF] Executed action NumberSearch.Ops.Controllers.HomeController.Error (NumberSearch.Ops) in 11.0715ms
2023-11-01 15:02:35.203 -07:00 [INF] Executed endpoint 'NumberSearch.Ops.Controllers.HomeController.Error (NumberSearch.Ops)'
2023-11-01 15:02:35.203 -07:00 [INF] Request finished HTTP/1.1 POST http://ops.acceleratenetworks.com/Messaging/ToEmail application/x-www-form-urlencoded 299 - 500 - text/html;+charset=utf-8 2585.9242ms

LongcodeShowRouting says that 2064623200 is still routed to EPID 265 sms.callpipe.com and not to the email address I attempted to register.

uncheckederror commented 12 months ago

@danry25 I think this is fixed, please try it again.

danry25 commented 12 months ago

Looks like its working now: image