| 17 | ---- |
| 18 | == Formato da Mensagem SMS: == |
| 19 | |
| 20 | === Pilha do protocolo WAP Push SMS: === |
| 21 | |
| 22 | Corpo |
| 23 | | |
| 24 | WSP+Corpo |
| 25 | | |
| 26 | WDP+WSP+Corpo |
| 27 | | |
| 28 | SMS_HEADER+WDP+WSP+Corpo |
| 29 | |
| 30 | |
| 31 | |
| 32 | === SMS_HEADER- O gateway SMS deve anexar esse cabeçalho à mensagem === |
| 33 | |
| 34 | 00 =Length of SMSC - 00 means Use the SMSC stored in phone.[[BR]] |
| 35 | 51 = binary 01010001,[[BR]] |
| 36 | bit 7=0 means replay path don't exists,[[BR]] |
| 37 | bit 6=1 means User Data field starts with a header,[[BR]] |
| 38 | bit 5=0 means status report is NOT requested,[[BR]] |
| 39 | bits 4,3=10 means Validity Period Format is 1 octet,[[BR]] |
| 40 | bit 2=0 means Don't Reject duplicates[[BR]] |
| 41 | bits 1,0=01 means PDU is an SMS-SUBMIT[[BR]] |
| 42 | 00 = phone set the message reference number itself.[[BR]] |
| 43 | 0A = Address-Length. Length of phone number (10)[[BR]] |
| 44 | 81 = Type-of-number + Numbering Plan[[BR]] |
| 45 | 1429129520 = Destination Phone number 4192215902[[BR]] |
| 46 | 0004A737 = Trail[[BR]] |
| 47 | |
| 48 | |
| 49 | === Udh(WDP-Wireless Datagram Protocol) === |
| 50 | |
| 51 | 06 =Length[[BR]] |
| 52 | 05 =Identifier port number[[BR]] |
| 53 | 04 =Port number length[[BR]] |
| 54 | 0B84 =Destination port. This value is for Windows Mobile. If the client is JavaME, replace by C351.[[BR]] |
| 55 | C002 =Origination port[[BR]] |
| 56 | |
| 57 | ***************************************************** |
| 58 | ****Message Header(WSP-Wireless Session Protocol)**** |
| 59 | ***************************************************** |
| 60 | 01 =Push ID |
| 61 | 06 =PDU type(Push) |
| 62 | 03 =Headers length (content type + headers) |
| 63 | CE =Content type code is the constant CONTENT_TYPE_CODE_NOTIFICATION |
| 64 | AF =X-WAP-Application-ID |
| 65 | 85 =Id for urn: x-wap-application:push.syncml |
| 66 | |
| 67 | ******************** |
| 68 | ****Message body**** |
| 69 | ******************** |
| 70 | 70F45FF17B5ABD16CE29FA27D2F870C2 =MD5 Digest |
| 71 | 031 =Binary 000000110001, bits 0000001100 means "version 1.2", bits 01 means "Uimode background" |
| 72 | 8 =Binary 1000, bit 1 means "server initiator", bits 000 means "future use" |
| 73 | 000000 =Future use |
| 74 | 0000 =Session ID |
| 75 | 08 =Server identifier length |
| 76 | 66756E616D626F6C=The server identifier string "funambol" |
| 77 | 1 =Num syncs |
| 78 | 0 =Future use |
| 79 | 6 =Sync type means "two-way" |
| 80 | 0 =Future use |
| 81 | 000306 =Content-type - application/vnd.omads-email+xml - OMA Data Sync Email Data Obj(XML) |
| 82 | 04 =Server uri length |
| 83 | 6D61696C =The server uri string "mail" |