facebookarchive / CommunityCellularManager

Tool for deploying, managing and controlling your Community Cellular Networks
Other
87 stars 36 forks source link

osmocom: sending SMS with more than 160 chars fails #92

Open eprueves opened 6 years ago

eprueves commented 6 years ago

In osmocom-based client, sending SMS with more than 160 chars fails. In the snippet included, SMS echo test sends back a '\x05' character.

https://gist.github.com/eprueves/0d75a84f7ed155c1f77c79f4d57a10d2

issue may be related to the parsing of the SMS since 'vbts_text' is empty

2018-02-22 06:51:11.421577 [NOTICE] mod_python.c:212 Invoking py module: VBTS_Parse_SMS
2018-02-22 06:51:11.421577 [DEBUG] mod_python.c:283 Call python script 
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Parsing:
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_text=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_protocol_id=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_message_reference=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_dest_address=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_dest_address_type=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_message_type=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_message_type=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_dest_address=919
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_originator_address=639360101902
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_originator_address_type=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_user_data=
2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_data_coding_scheme=
kheimerl commented 6 years ago

Agree, looks like everything is empty.

On Thu, Feb 22, 2018 at 12:00 AM, Claire Barela notifications@github.com wrote:

In osmocom-based client, sending SMS with more than 160 chars fails. In the snippet included, SMS echo test sends back a '\x05' character.

https://gist.github.com/eprueves/0d75a84f7ed155c1f77c79f4d57a10d2

issue may be related to the parsing of the SMS since 'vbts_text' is empty

2018-02-22 06:51:11.421577 [NOTICE] mod_python.c:212 Invoking py module: VBTS_Parse_SMS 2018-02-22 06:51:11.421577 [DEBUG] mod_python.c:283 Call python script 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Parsing: 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_text= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_protocol_id= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_message_reference= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_dest_address= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_dest_address_type= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_message_type= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_message_type= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_dest_address=919 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_originator_address=639360101902 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_rp_originator_address_type= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_user_data= 2018-02-22 06:51:11.421577 [INFO] switch_cpp.cpp:1365 Setting vbts_tp_data_coding_scheme=

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/CommunityCellularManager/issues/92, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_rn_rfMe3h085IpRzbH9wwyAxxkl4lks5tXR6qgaJpZM4SO4N7 .

eprueves commented 6 years ago

Upon further inspection, when parsing the SMS, message.getBody() is empty for SMS > 160 chars.

https://github.com/facebookincubator/CommunityCellularManager/blob/master/client/scripts/freeswitch/VBTS_Parse_SMS.py#L16

Hence, this will be also empty since it is also using the same method https://github.com/facebookincubator/CommunityCellularManager/blob/master/client/core/sms/freeswitch/_osmocom.py#L41