diff options
Diffstat (limited to 'deps/gsms/README.md')
-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. |