**>From: "Zohar" <[EMAIL PROTECTED]> **>To: <[EMAIL PROTECTED]> **>Subject: post headers **>Date: Sun, 8 Jun 2003 07:18:10 +0200 **> **>Hi, **>When using the "post-url" method in the "sms-service" group, how do I specify which headers are sent (e.g., "X-Kannel-From", "X-Kannel-UDH", etc.) , or are all (available?) headers being sent always?
The smsbox will look at the SMS and internal Kannel state information to determine what headers to put into the HTTP POST. The mandatory headers are: Content-Type: [ DC_7BIT | DC_8BIT | DC_UCS2 ] [DC_7BIT] = Content-Type: text/plain [DC_8BIT] = Content-Type: application/octet-stream [DC_UCS2] = Content-Type: text/plain; charset=UTF-16BE Content-Length: [ decimal_number ] X-Kannel-To: [ MSISDN ] X-Kannel-Time: [ YYYY-MM-DD HH:MM:SS ] X-Kannel-Time: 2003-02-27 13:48:03 X-Kannel-Service: [ sms-service_name ] X-Kannel-Service: OTP_responder If your sms-service includes the configuration: send-sender = true you will also receive the Sender's MSISDN via the "X-Kannel-From" header. If the SMS has a UDH then that will appear as a series or 2 digit HEX (%02X) numbers of the X-Kannel-UDH header. X-Kannel-UDH: [ TWO_DIGIT_HEX_NUMBERS ] RING TONE = X-Kannel-UDH: 06050415811581 LOGO = X-Kannel-UDH: 06050415821582 PICTURE MSG = X-Kannel-UDH: 060504158A158A GROUP GRAPHIC = X-Kannel-UDH: 06050415831583 (* Thanks to "Shanavaz E A" <[EMAIL PROTECTED]>. I hope there wasn't an NDA violation for releasing this info. ) If the Message Class is set: X-Kannel-MClass: [ decimal_number_0-4 ] MC_UNDEF = X-Kannel-MClass: 0 MC_CLASS0 = Non-Specific = X-Kannel-MClass: 1 MC_Class1 = ME-Specific = X-Kannel-MClass: 2 MC_Class2 = SIM-Specific = X-Kannel-MClass: 3 MC_Class3 = TE-Specific = X-Kannel-MClass: 4 If the Protocol ID is set: X-Kannel-PID: [ decimal_number_0-255 ] X-Kannel-PID: 0 If the Return Path Indicator is set: X-Kannel-RPI: [ decimal_number_0-1 ] X-Kannel-RPI: 1 If the Message Waiting Indicator is set: X-Kannel-MWI: [ decimal_number_0-8 ] MWI_UNDEF = X-Kannel-MWI: 0 MWI_VOICE_ON = X-Kannel-MWI: 1 MWI_FAX_ON = X-Kannel-MWI: 2 MWI_EMAIL_ON = X-Kannel-MWI: 3 MWI_OTHER_ON = X-Kannel-MWI: 4 MWI_VOICE_OFF = X-Kannel-MWI: 5 MWI_FAX_OFF = X-Kannel-MWI: 6 MWI_EMAIL_OFF = X-Kannel-MWI: 7 MWI_OTHER_OFF = X-Kannel-MWI: 8 If the message is compressed: X-Kannel-Compress: [ decimal_number_0-1 ] X-Kannel-Compress: 1 If the Validity period is set: X-Kannel-Validity: [ decimal_number_0-255 ] X-Kannel-Validity = 0 to 143: (VP + 1) x 5 minutes (up to 12 hrs) X-Kannel-Validity = 144 to 167: 12 hrs ((VP-143) x 30 minutes) X-Kannel-Validity = 168 to 196: (VP - 166) x 1 day X-Kannel-Validity = 197 to 255: (VP - 192) x 1 week If the SMS is deferred: X-Kannel-Deferred: [ decimal_number_0-1 ] X-Kannel-Deferred: 1 These headers work also when submitting an SMS if accept-x-kannel-headers is set to "true". Hopefully, I'll have enough time to finish my revisions for Kannel's userguide before a new official release is minted. Regards, Davy Chan