garronej / chan-dongle-extended-pages

https://garronej.github.io/chan-dongle-extended-pages/
8 stars 5 forks source link

Not getting value of ${STATUS_REPORT_ID} #3

Closed munirfromdhaka closed 2 years ago

munirfromdhaka commented 2 years ago

Hello, I installed the chan-dongle-extended in Ubuntu 21:10 version. when I send sms, its send ok but issue with SMS delivery status. Function ${STATUS_REPORT_ID} get no value. How can I relate a SMS report to a sent SMS as there are nothing in common between sent SMS and SMS report.

My dialplan

[messages] exten =>_!X., 1,Set(SEND_TIME=${SHELL(dongle send --imei 863617022531328 -n ${EXTEN:-11} --text-base64 ${BASE64ENCODE( ${MESSAGE(body)})})}) exten => !X.,n,Hangup()

[from-dongle] ;Check that the message have been received exten = sms-status-report,1,NoOp(sms-status-report) same = n,NoOp(STATUS_REPORT_DISCHARGE_TIME=${STATUS_REPORT_DISCHARGE_TIME}) same = n,NoOp(STATUS_REPORT_IS_DELIVERED=${STATUS_REPORT_IS_DELIVERED}) same = n,NoOp(STATUS_REPORT_SEND_TIME=${STATUS_REPORT_ID}) same = n,NoOp(STATUS_REPORT_STATUS=${STATUS_REPORT_STATUS}) same = n,Hangup()

Help is aspirated

asterisk log

-- Executing [01714092924@messages:1] Set("Message/ast_msg_queue", "SEND_TIME=1644833537542 -- ") in new stack -- Executing [01714092924@messages:2] Hangup("Message/ast_msg_queue", "") in new stack == Spawn extension (messages, 01714092924, 2) exited non-zero on 'Message/ast_msg_queue' == Manager 'chan_dongle_extended' logged on from 127.0.0.1 == Manager 'chan_dongle_extended' logged on from 127.0.0.1 -- Called sms-status-report@from-dongle -- Executing [sms-status-report@from-dongle:1] NoOp("Local/sms-status-report@from-dongle-00000000;2", "sms-status-report") in new stack -- Executing [sms-status-report@from-dongle:2] NoOp("Local/sms-status-report@from-dongle-00000000;2", "STATUS_REPORT_DISCHARGE_TIME=2022-02-14T10:12:00.000Z") in new stack -- Executing [sms-status-report@from-dongle:3] NoOp("Local/sms-status-report@from-dongle-00000000;2", "STATUS_REPORT_IS_DELIVERED=true") in new stack -- Executing [sms-status-report@from-dongle:4] NoOp("Local/sms-status-report@from-dongle-00000000;2", "STATUS_REPORT_SEND_TIME=") in new stack -- Executing [sms-status-report@from-dongle:5] NoOp("Local/sms-status-report@from-dongle-00000000;2", "STATUS_REPORT_STATUS=COMPLETED_RECEIVED") in new stack -- Executing [sms-status-report@from-dongle:6] Hangup("Local/sms-status-report@from-dongle-00000000;2", "") in new stack == Spawn extension (from-dongle, sms-status-report, 6) exited non-zero on 'Local/sms-status-report@from-dongle-00000000;2' == Manager 'chan_dongle_extended' logged off from 127.0.0.1 == Manager 'chan_dongle_extended' logged off Untitled-1 from 127.0.0.1

garronej commented 2 years ago

Hi @munirfromdhaka,
Sorry there is an error in the documentation,
What acts as STATUS_REPORT_ID is infact STATUS_REPORT_SEND_TIME.
(With the send time you can match the status report) Here you have the code: https://github.com/garronej/chan-dongle-extended/blob/4428553bd738d6334b1f46886163482f244f8a09/src/lib/dialplan.ts#L65
I have updated the documentation: https://garronej.github.io/chan-dongle-extended-pages/

Best

munirfromdhaka commented 2 years ago

Hi, Now I'm getting SMS deliver report correctly. I tested with few dongles and deliver report are ok as expected. Thanks a lot. You can my modem more useful.