diff options
author | Ulf Wiger <ulf@feuerlabs.com> | 2015-08-11 20:25:09 +0200 |
---|---|---|
committer | Ulf Wiger <ulf@feuerlabs.com> | 2015-08-11 20:25:09 +0200 |
commit | 54974ae9ead2200104cb35b5e34fff8030a06cc9 (patch) | |
tree | 4a737e2a5d63556d3f93bc7f276e43272076e85b /deps/gsms | |
parent | beaa827117c8ec897e7e110e885b041643ddd750 (diff) | |
download | rvi_core-54974ae9ead2200104cb35b5e34fff8030a06cc9.tar.gz |
extended test suite + python script fix
Diffstat (limited to 'deps/gsms')
-rw-r--r-- | deps/gsms/README.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/deps/gsms/README.md b/deps/gsms/README.md index 9fb01ab..631eb46 100644 --- a/deps/gsms/README.md +++ b/deps/gsms/README.md @@ -30,3 +30,50 @@ After change it should look like dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait +# Session behaviors + +The gsms_plivo module is an example of a session behavior, designed to send and receive +SMSes via the http://plivo.com Voice/SMS service. To use it, you need to sign up for a +Plivo account, but for testing purposes, you can use the gsms_plivo_sim module to simulate +a Plivo service locally. + +To test the Plivo behavior locally, you can try the following: + +In one terminal window: + + $ make shell + rebar get-deps + ... + rebar compile + ... + Eshell V5.10.4 (abort with ^G) + 1> gsms_plivo_sim:simtest(). + {ok,<0.41.0>} + 2> + +This starts a simulator instance on port 9100 with two predefined accounts (services). +An example of a service: + + {s1, [{type, plivo_sim}, + {numbers, ["111"]}, + {uri, "http://localhost:9200"}, + {account, "acct1"}, + {auth, "auth1"}]} + +The 'account' option corresponds to the Plivo "Auth ID", and 'auth' to the "Auth Token". +The 'numbers' list is needed in order for the simulator to route SMSes from one client to +another. The 'uri' denotes the client's callback URI. + +To start clients 1 and 2 respectively: + + $ make shell + rebar get-deps + ... + rebar compile + ... + Eshell V5.10.4 (abort with ^G) + 1> gsms_plivo:simtest(1). % or simtest(2) + <0.41.0> + 2> + +Note that the clients have dbg trace enabled. Modify or copy the code to disable. |