3 ms·
Flowroute: DIDs -> select number -> Choose a DID Action -> Set callback URL -> Apply action -> check SMS Callback, SMS DLR callback (?) -> enter URL complying w
by vonunov 4y ago
Flowroute: DIDs -> select number -> Choose a DID Action -> Set callback URL -> Apply action -> check SMS Callback, SMS DLR callback (?) -> enter URL complying with https://developer.flowroute.com/api/numbers/v2.0/set-a-messaging-callback-url-for-phone-number/ https://developer.flowroute.com/api/numbers/v2.0/set-a-messa...
(I had to have it exactly as specified with /numbers/ starting from the webroot and not in a subdirectory),
see also https://developer.flowroute.com/api/messages/v2.1/receive-an-sms/ https://developer.flowroute.com/api/messages/v2.1/receive-an...
Using SMS webhook v2.0 in Flowroute Preferences -> API Control
In Arch Linux I installed "community/nginx-mod-echo 0.62-5" and restarted nginx
nginx.conf:
load_module "/usr/lib/nginx/modules/ngx_http_echo_module.so";
http {
log_format postdata $request_body;
}
sites-available/example.com.conf:
server {
location /numbers/1NPANXXxxxx/relationships/sms_dlr_callback {
access_log /var/log/nginx/example.com/postdata.log postdata;
echo_read_request_body;
}
}
Reload nginx, then I just did `tail -f postdata.log` and in near realtime received output like
"{\x22body\x22: \x22Your OpenAI API verification code is: 438301\x22, \x22to\x22: \x221903866xxxx\x22, \x22from\x22: \x2218559090331\x22, \x22id\x22: \x22mdr2-9e551f88de31449096782f9a9f32080f\x22}"