Jump to content
KAZOOcon: hackathon signup and details here! ×

SMS API responds with error 500 while trying to send Message/SMS


Anruag

Recommended Posts

Hi. We are trying to send SMS (onnet or offnet) with SMS API and it responds with error 500. We want to know how to enable SMS on the account, because the logs shows that the SMS is not enabled on reseller account. Are we missing something?

{LOGS INFO}

13:21:00.756 [debug] |14e6e4b58e3fbc16bed18b8f1d30f121|api_util:1641(<0.23083.12>) generating
 error 500 account response
13:21:00.757 [debug] |14e6e4b58e3fbc16bed18b8f1d30f121|api_util:1741(<0.23083.12>) setting re
sp body: {"data":{"message":"service temporarily unavailable"},"error":"500","message":"accou
nt","status":"error","timestamp":"2022-08-15T13:21:00Z","version":"crossbar_websocket.0.1","n
ode":"sigF3HnIHx4Bf_TpwI_QUA","request_id":"14e6e4b58e3fbc16bed18b8f1d30f121","auth_token":"e
yJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjhhN2QyYzA2MzVhZGVkMGNkNWY2MDI2NTIwMGM5OWVhIn0.ey
Jpc3MiOiJrYXpvbyIsImlkZW50aXR5X3NpZyI6IkRESDhjSk8tUFlsWWVENWNSRlJmVzlWZDFKWVdYMG0wOFdZZy10MUw
zREkiLCJhY2NvdW50X2lkIjoiNTg3ZWY1NzE2YzBjODk3NGJjOWNiNjliMWY0Y2ZlNDIiLCJvd25lcl9pZCI6Ijc0MTAz
NDk0NjM0YmU2NzI3ZDg2ZmVhYzY2YzlhNzE3IiwibWV0aG9kIjoiY2JfdXNlcl9hdXRoIiwiZXhwIjoxNjYwNTczMjQ3f
Q.NQHrcyU1Yn05u-41ZTmESuyuK1f59CYsC9TDIMlBwZEtYwu_QLRdxG0ekVOoKWUcCtILHsgtDvL4TrN44VkUCzQoRWB
T0SbCNomaLFUyrmZ1grRXf7uCjJADqJluEswGmDnus02qoNdSul3JuE_FSB0AFBhls25eqp1pr5kMSl2VbWXrgdVOerB9
nL6kkFDr-k-rIL8My3y6FJsjTw27Be_krt_zLsKHgdsmpk7hlgb6GBFHu_mdAdToAXR72_9N4fWpQun6Alb8FMbL4J-qx
thTXjx2w2XMZxKZzWdDzw9n6mgoJIl86EcngJ5VfntTokxNvRYbaX5uou3bd5PwFg"}
13:21:00.757 [debug] |14e6e4b58e3fbc16bed18b8f1d30f121|api_util:1745(<0.23083.12>) ensured CO
RS headers are on the response

16:08:40.222 [debug] |ec2f85fdef74fb4b2ad31a04a116223d|gen_listener:1693(<0.1267.0>) new heap
13:21:00.756 [warning] |14e6e4b58e3fbc16bed18b8f1d30f121|cb_sms:281(<0.23083.12>) sms service
s not enabled for reseller 587ef5716c0c8974bc9cb69b1f4cfe42 of account 417a7cbcb843900443cb8d
77c569573a
13:21:00.756 [debug] |14e6e4b58e3fbc16bed18b8f1d30f121|api_util:1066(<0.23083.12>) validating
 data failed
13:21:00.756 [debug] |14e6e4b58e3fbc16bed18b8f1d30f121|api_resource:701(<0.23083.12>) failed
to validate resource
13:21:00.756 [info] |14e6e4b58e3fbc16bed18b8f1d30f121|api_util:1738(<0.23083.12>) stopping ex
ecution here with status code 500
13:21:00.756 [debug] |14e6e4b58e3fbc16bed18b8f1d30f121|api_util:1641(<0.23083.12>) generating
 error 500 account response

 

Link to comment
Share on other sites

I'm guessing from post history you are running the open source platform. Depending on the carrier you are using and how much you have integrated the carrier to the platform. You are probably better off using the carrier API to do SMS. 

Are you on open source? 

Who is your carrier? 

Do you have SMS enabled with your carrier? 

Are you using a third party app for SMS or something you build? 

Link to comment
Share on other sites

Are you on open source? Yes, we are on opensource environment
Who is your carrier? Telnyx Carrier
Do you have SMS enabled with your carrier? Yes, SMS is enabled on our Telnyx carrier
Are you using a third party app for SMS or something you build? We do not have third party app for SMS yet.

Link to comment
Share on other sites

I am trying some tests to make it send the message correctly. The logs shows similar to this (with debug)

 

15:27:02.624 [debug] |Ci~qQUKL7a|kz_amqp_channel:245(<0.10237.78>) published to im(direct 333B) exchange (routing key sms.outbound.Ci~qQUKL7a) via <0.4190.21>
15:27:02.626 [debug] |7f98b0f8025a9d988ad65997c680fcde|kz_services_plan:318(<0.10239.78>) fetching plan 21013770bd8a23de0187944eb217fd8b/plan_simple_1
15:27:02.629 [debug] |7f98b0f8025a9d988ad65997c680fcde|kz_services_plans:196(<0.10239.78>) adding plan 21013770bd8a23de0187944eb217fd8b/plan_simple_1 for bookkeeper default_bookkeeper
15:27:02.632 [debug] |7f98b0f8025a9d988ad65997c680fcde|kz_services_plan:318(<0.10239.78>) fetching plan 21013770bd8a23de0187944eb217fd8b/plan_simple_1
15:27:02.632 [debug] |7f98b0f8025a9d988ad65997c680fcde|kz_services_plans:196(<0.10239.78>) adding plan 21013770bd8a23de0187944eb217fd8b/plan_simple_1 for bookkeeper default_bookkeeper
15:27:02.645 [debug] |7f98b0f8025a9d988ad65997c680fcde|kz_im_onnet:250(<0.10239.78>) not routing #{account =>
  <hidden-information/>
  
  
    reseller_id => <<"21013770bd8a23de0187944eb217fd8b">>,
              route => undefined}

  

It is trying the send in offnet number. Looking how to configure offnet text messaging or to force onnet

Link to comment
Share on other sites

  • 2 months later...

Kazoo is using doodle and kazoo_im applications from onnet and offnet sms it seems.

onnet messaging is working as expected but offnet messaging is throwing an error :  offnet rejected request for account '{account_id}' : no_connections

In system_config -> kazoo_im document, some details are missing about the AMQP connector it seems. 

Link to comment
Share on other sites

  • 2600Hz Employees

From what I remember, you have to have an SMSC that communicates over AMQP to hook up for this, which I don't think most folks have access to. I believe we built one for a customer at one point but nothing active on it in years that i know of...

Link to comment
Share on other sites

×
×
  • Create New...