Subsequent chapters present how to send and receive messages through Jasmin :doc:`/apis/ja-http/index` and some more advanced use cases, such as manipulating receipts and complex routings, will look like.
Sending a SMS is done through the :doc:`/apis/ja-http/index`:
.. literalinclude:: /apis/ja-http/example_send_gsm0338.py :language: python
.. literalinclude:: /apis/ja-http/example_send_gsm0338.php :language: php
.. literalinclude:: /apis/ja-http/example_send_gsm0338.rb :language: ruby
c.f. :doc:`/apis/ja-http/index` for more details about sending SMS with receipt enquiry, long content etc ...
Receiving a SMS is done through the :doc:`/apis/ja-http/index`, this a PHP script pointed by Jasmin for every received SMS (using routing):
.. literalinclude:: example_receive.php :language: php
In the above example, there's an error handling where the message is not ACKed if there's a database connection problem, if it occurs, the script will return "Error connecting to DB" when Jasmin HTTP thrower is waiting for a "ACL/Jasmin", this will lead to a message re-queue and later re-delivery to the same script, this behaviour is explained in :ref:`deliverSmHttpThrower_process`.
Another example of an interactive SMS application:
.. literalinclude:: example_receive_send.php :language: php
c.f. :doc:`/apis/ja-http/index` for more details.