diff --git a/.phrozn/entries/serverapi.twig b/.phrozn/entries/serverapi.twig index 5fc7355..de6d221 100755 --- a/.phrozn/entries/serverapi.twig +++ b/.phrozn/entries/serverapi.twig @@ -41,10 +41,92 @@ Connection: Keep-Alive from=6505551234&message_type=sms&message=test&version=2&phone_number=16505551212&action=incoming -
An incoming MMS message:
+An incoming MMS message with an image/jpeg
part and a text/plain
part with message 'Test':
-TODO +-+POST /sg/kalsms HTTP/1.1 +X-Kalsms-Signature: OgpiQet9guVhEp+0klrONR8qGNs= +Content-Length: 13087 +Content-Type: multipart/form-data; boundary=i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Host: 192.168.70.1:3000 +Connection: Keep-Alive + +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="from" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + ++16505551234 +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="message" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Test +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="message_type" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +mms +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="mms_parts" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[{"type":"application/smil","filename":"01smil","cid":"<0000>","name":"part0"},{"type":"text/plain","filename":"Text01.txt","cid":"<569>","name":"part1"},{"type":"image/jpeg","filename":"Image0001.jpg","cid":"<570>","name":"part2"}] +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="version" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +3 +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="phone_number" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +16505551212 +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="action" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +incoming +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="part0"; filename="01smil" +Content-Type: application/smil; charset=UTF-8 +Content-Transfer-Encoding: binary + +<smil> + <head> + <layout> + <root-layout height="160" width="128"/> + <region fit="meet" height="70%" id="Image" left="0%" top="30%" width="100%"/> + <region fit="scroll" height="30%" id="Text" left="0%" top="0%" width="100%"/> + </layout> + </head> + <body> + <par dur="8000ms"> + <text region="Text" src="cid:569"/> + <img region="Image" src="cid:570"/> + </par> + </body> +</smil> + +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="part1"; filename="Text01.txt" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: binary + +Test +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="part2"; filename="Image0001.jpg" +Content-Type: image/jpeg +Content-Transfer-Encoding: binary + +BINARY IMAGE DATA +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO--Checking for outgoing SMS messages:
@@ -213,8 +295,8 @@ Additional parameters sent in POST requests with action=incoming and message_typ - (Additional fields with the content of each MMS part. Text parts - are encoded in UTF-8.) + In addition, the request contains form fields with the content of each MMS part, + with names as listed in themms_parts
field. Text parts are encoded in UTF-8. diff --git a/serverapi.html b/serverapi.html index ea6dfdb..1e62ac4 100755 --- a/serverapi.html +++ b/serverapi.html @@ -73,10 +73,92 @@ Connection: Keep-Alive from=6505551234&message_type=sms&message=test&version=2&phone_number=16505551212&action=incoming
An incoming MMS message:
+An incoming MMS message with an image/jpeg
part and a text/plain
part with message 'Test':
-TODO ++POST /sg/kalsms HTTP/1.1 +X-Kalsms-Signature: OgpiQet9guVhEp+0klrONR8qGNs= +Content-Length: 13087 +Content-Type: multipart/form-data; boundary=i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Host: 192.168.70.1:3000 +Connection: Keep-Alive + +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="from" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + ++16505551234 +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="message" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Test +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="message_type" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +mms +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="mms_parts" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[{"type":"application/smil","filename":"01smil","cid":"<0000>","name":"part0"},{"type":"text/plain","filename":"Text01.txt","cid":"<569>","name":"part1"},{"type":"image/jpeg","filename":"Image0001.jpg","cid":"<570>","name":"part2"}] +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="version" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +3 +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="phone_number" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +16505551212 +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="action" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +incoming +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="part0"; filename="01smil" +Content-Type: application/smil; charset=UTF-8 +Content-Transfer-Encoding: binary + +<smil> + <head> + <layout> + <root-layout height="160" width="128"/> + <region fit="meet" height="70%" id="Image" left="0%" top="30%" width="100%"/> + <region fit="scroll" height="30%" id="Text" left="0%" top="0%" width="100%"/> + </layout> + </head> + <body> + <par dur="8000ms"> + <text region="Text" src="cid:569"/> + <img region="Image" src="cid:570"/> + </par> + </body> +</smil> + +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="part1"; filename="Text01.txt" +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: binary + +Test +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO +Content-Disposition: form-data; name="part2"; filename="Image0001.jpg" +Content-Type: image/jpeg +Content-Transfer-Encoding: binary + +BINARY IMAGE DATA +--i66xAht5IMn1Tfk7tL9DgY8ZHZxq0d0RGB6_wkjO--Checking for outgoing SMS messages:
@@ -245,8 +327,8 @@ Additional parameters sent in POST requests with action=incoming and message_typ - (Additional fields with the content of each MMS part. Text parts - are encoded in UTF-8.) + In addition, the request contains form fields with the content of each MMS part, + with names as listed in themms_parts
field. Text parts are encoded in UTF-8.