RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
241 stars 215 forks source link

USSD Push is broken using the API - Missing host name #2054

Open croufay opened 7 years ago

croufay commented 7 years ago

When I try to run USSD PUSH using the binary TelScale-Restcomm-JBoss-AS7-8.1.0.1502

` curl -X POST -H "application/json" http://ACae6e420f425248d6a26948c17a9e2acf:PWD@192.168.112-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/UssdPush -d "From=Restcomm" -d "To=111111" -d "Url=http://192.168.1.3:8080/restcomm-rvd/services/apps/AP2f2e81e597af44e9a153b10c81427d87/controller"

CA4ea53e0232194e9ebedb555a9d96eca6 IDcd4a4fab9dfb4b5c9d7eaecd099fc119 Mon, 10 Apr 2017 23:14:30 -0600 Mon, 10 Apr 2017 23:14:30 -0600 ACae6e420f425248d6a26948c17a9e2acf 111111 USSD REST API QUEUED 0.00 USD outbound-api 2012-04-24 /2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls/CA4ea53e0232194e9ebedb555a9d96eca6 /2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls/CA4ea53e0232194e9ebedb555a9d96eca6/Notifications /2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls/CA4ea53e0232194e9ebedb555a9d96eca6/Recordings ` Error Log ` Acquiring Call Info 23:13:04,400 ERROR [org.restcomm.connect.commons.faulttolerance.RestcommSupervisorStrategy] (RestComm-akka.actor.default-dispatcher-17) Restcom mSupervisorStrategy, actor exception handling. Actor path akka://RestComm/user/$r, exception cause org.restcomm.connect.commons.fsm.TransitionF ailedException: java.lang.NullPointerException, default exception handling strategy Resume 23:13:04,400 INFO [org.restcomm.connect.ussd.telephony.UssdCall] (RestComm-akka.actor.default-dispatcher-20) UssdCall's Current State: "queued 23:13:04,401 INFO [org.restcomm.connect.ussd.telephony.UssdCall] (RestComm-akka.actor.default-dispatcher-20) UssdCall Processing Message: "org .restcomm.connect.commons.patterns.Observe 23:13:04,401 INFO [org.restcomm.connect.ussd.telephony.UssdCall] (RestComm-akka.actor.default-dispatcher-20) UssdCall's Current State: "queued 23:13:04,401 INFO [org.restcomm.connect.ussd.interpreter.UssdInterpreter] (RestComm-akka.actor.default-dispatcher-20) ********** UssdInterpre ter's Current State: acquiring call info 23:13:04,402 INFO [org.restcomm.connect.ussd.telephony.UssdCall] (RestComm-akka.actor.default-dispatcher-20) UssdCall Processing Message: "org .restcomm.connect.telephony.api.GetCallInfo 23:13:04,402 INFO [org.restcomm.connect.ussd.interpreter.UssdInterpreter] (RestComm-akka.actor.default-dispatcher-20) ********** UssdInterpre ter's Processing Message: org.restcomm.connect.commons.patterns.Observing 23:13:04,402 INFO [org.restcomm.connect.ussd.interpreter.UssdInterpreter] (RestComm-akka.actor.default-dispatcher-20) ********** UssdInterpre ter's Current State: acquiring call info 23:13:04,403 INFO [org.restcomm.connect.ussd.interpreter.UssdInterpreter] (RestComm-akka.actor.default-dispatcher-20) ********** UssdInterpre ter's Processing Message: org.restcomm.connect.telephony.api.CallResponse 23:13:57,009 INFO [org.restcomm.connect.ussd.interpreter.UssdInterpreter] (RestComm-akka.actor.default-dispatcher-25) ********** UssdInterpr$ ter's Processing Message: org.restcomm.connect.telephony.api.CallResponse 23:13:57,009 ERROR [org.restcomm.connect.ussd.interpreter.UssdInterpreter] (RestComm-akka.actor.default-dispatcher-25) java.lang.NullPointerEx$ eption: org.restcomm.connect.commons.fsm.TransitionFailedException: java.lang.NullPointerException at org.restcomm.connect.commons.fsm.FiniteStateMachine.transition(FiniteStateMachine.java:89) [restcomm-connect.commons-8.1.0.1205.jar$ 8.1.0.1205] at org.restcomm.connect.ussd.interpreter.UssdInterpreter.onReceive(UssdInterpreter.java:500) [restcomm-connect.ussd-8.1.0.1205.jar:8.1$ 0.1205] at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:159) [akka-actor_2.10-2.1.2.jar:] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425) [akka-actor_2.10-2.1.2.jar:] at akka.actor.ActorCell.invoke(ActorCell.scala:386) [akka-actor_2.10-2.1.2.jar:] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230) [akka-actor_2.10-2.1.2.jar:] at akka.dispatch.Mailbox.run(Mailbox.scala:212) [akka-actor_2.10-2.1.2.jar:] at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506) [akka-actor_2.10-2.1.2.jar:] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:262) [scala-library-2.10.1.jar:] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975) [scala-library-2.10.1.jar:] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1478) [scala-library-2.10.1.jar:] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) [scala-library-2.10.1.jar:] Caused by: java.lang.NullPointerException at org.restcomm.connect.ussd.interpreter.UssdInterpreter$DownloadingRcml.execute(UssdInterpreter.java:625) [restcomm-connect.ussd-8.1.$ .1205.jar:8.1.0.1205] at org.restcomm.connect.commons.fsm.FiniteStateMachine.transition(FiniteStateMachine.java:87) [restcomm-connect.commons-8.1.0.1205.jar$ 8.1.0.1205] ... 11 more `
gvagenas commented 7 years ago

Thanks @croufay , will check this

croufay commented 7 years ago

@gvagenas ,

I tested again by replacing the restcomm-connect.ussd-8.1.0.1205.jar with the latest restcomm-connect.ussd-8.2.0-SNAPSHOT.jar and the USSD push worked.

` curl -X POST -H "application/json" http://ACae6e420f425248d6a26948c172.168.1.3:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/UssdPush -d "From=Restcomm" -d "To=111111" -d "Url=http://192.168.1.3:8080/restcomm-rvd/services/apps/AP2f2e81e597af44e9a153b10c81427d87/controller"

CAf53b383168244254aaac3a8c6574ab9c IDcd4a4fab9dfb4b5c9d7eaecd099fc119 Thu, 13 Apr 2017 12:51:22 -0600 Thu, 13 Apr 2017 12:51:22 -0600 ACae6e420f425248d6a26948c17a9e2acf 111111 USSD REST API QUEUED 0.00 USD outbound-api 2012-04-24 /2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls/CAf53b383168244254aaac3a8c6574ab9c /2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls/CAf53b383168244254aaac3a8c6574ab9c/Notifications /2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls/CAf53b383168244254aaac3a8c6574ab9c/Recordings ` Changes made in the past week must have fixed the NullPointer issue, I will test again and if all goes well, replace the jar file in our next upgrade window with the customer. I was able to receive the PUSH message in the SS7 simulator window through the USSD GW.