Skip to content

'SmsStatus' is not added as parameter for statusCallBack #2577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
anhntnguyen opened this issue Oct 13, 2017 · 4 comments
Open

'SmsStatus' is not added as parameter for statusCallBack #2577

anhntnguyen opened this issue Oct 13, 2017 · 4 comments

Comments

@anhntnguyen
Copy link
Contributor

When we use statusCallBack for SMS, 'SmsStatus' is not added as a parameter.

@anhntnguyen
Copy link
Contributor Author

Issue is created on Jira here: https://telestax.atlassian.net/browse/RESTCOMM-1168

@anhntnguyen anhntnguyen reopened this Oct 16, 2017
josamp added a commit to josamp/Restcomm-Connect that referenced this issue Nov 24, 2017
josamp added a commit to josamp/Restcomm-Connect that referenced this issue Nov 24, 2017
josamp added a commit to josamp/Restcomm-Connect that referenced this issue Nov 24, 2017
Using the RVD SMS Verb with "Status callback" URL set the POST request sent by RestComm does not contain the "SmsSid" and "SmsStatus" info. Below the Http POST that the RestComm Sends in this scenario:
" 
POST / HTTP/1.1
http.protocol.content-charset: UTF-8
Content-Length: 336
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Host: 192.168.1.134:20999
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.7.0_151)
Accept-Encoding: gzip,deflate

CallSid=ID4cefd84a0722493b8757e73fe250d99d-CAab1e7d40ec0d4547a3cc213c0a491e7a&InstanceId=ID4cefd84a0722493b8757e73fe250d99d&AccountSid=ACae6e420f425248d6a26948c17a9e2acf&From=rui&To=8888&CallStatus=in-progress&ApiVersion=2012-04-24&Direction=inbound&CallerName=null&ForwardedFrom=null&CallTimestamp=2017-11-18T12%3A36%3A07.702%2B01%3A00
"

According to doc "http://documentation.telestax.com/connect/rcml/sms-rcml.html#sms" the SMS Verb with  "Status callback" URL should sent the "SmsSid" and "SmsStatus" in the Webhook. Not sure if the behavior is the expected per design but in this test the RestComm sends the Call info in the Status callback instead of the SMS info. 

Checking with Debug logs it points that RestComm is using the "smsResponse" method from class "BaseVoiceInterpreter.java" to get the call parameters (from class "VoiceInterpreter.java") and send them to the Callback URL.

Using the commited code to add the parameters "SmsSid" and "SmsStatus" to this POST method sent by RestComm from the SMS verb and the new Status callback POST request sent with the above code is:
"
POST / HTTP/1.1
http.protocol.content-charset: UTF-8
Content-Length: 395
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Host: 192.168.1.134:20999
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.7.0_151)
Accept-Encoding: gzip,deflate

CallSid=IDd5f6fb448d1d4ecf99e749b57eb5e5dd-CA833a49556c074b8d97f9402b395d5536&InstanceId=IDd5f6fb448d1d4ecf99e749b57eb5e5dd&AccountSid=ACae6e420f425248d6a26948c17a9e2acf&From=rui&To=8888&CallStatus=in-progress&ApiVersion=2012-04-24&Direction=inbound&CallerName=null&ForwardedFrom=null&CallTimestamp=2017-11-20T00%3A02%3A33.646%2B01%3A00&SmsSid=SM520a6c0d66064cfa9919255ef5685a7d&SmsStatus=failed
"
@josamp
Copy link

josamp commented Nov 24, 2017

Verified that using the RVD SMS Verb with "Status callback" URL set the POST request sent by RestComm does not contain the "SmsSid" and "SmsStatus" info.

According to doc "http://documentation.telestax.com/connect/rcml/sms-rcml.html#sms" the SMS Verb with "Status callback" URL should sent the "SmsSid" and "SmsStatus" in the Webhook. Not sure if the behavior is the expected per design but in this test the RestComm sends the Call info in the Status callback instead of the SMS info.

Have commit a proposal code change to add "SmsSid" and "SmsStatus" in this case.

@gsaslis
Copy link
Contributor

gsaslis commented Jan 25, 2018

Hi @josamp!
Thanks for offering to help on this.
It looks like though you made some commits on your own fork, but never opened a Pull Request here, right?

I would invite you to read our Open Source Playbook to get acquainted with the process of contributing to one of the Restcomm OSS projects.

Looking forward to your PR!!

@josamp
Copy link

josamp commented Jan 25, 2018

Hello gsaslis,

Thanks for the feedback. I've now performed the PR for this commit.

Let me know if all ok with the PR now!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants