Sorry I put transaction id & mms version twice, should be only one each

On Jan 18, 2008 11:09 PM, Ady Wicaksono <[EMAIL PROTECTED]> wrote:

> Here an example (on PHP):
>
>      $message  = "E90622";
>          $message .=
> "6170706c69636174696f6e2f766e642e7761702e6d6d732d6d657373616765"; //
> application/vnd.wap.mms-message
>          $message .= "00"; // Null Terminated
>          $message .= "AF84";
>
>          //---------- X-Mms-Message-Type ----------
>          /*
>                 0x8C    X-Mms-Message-Type
>                 0x82    'm-notification-ind'
>          */
>          $message .= "8C" . "82"; // m-notification-ind
>
>          /*
>                 0x98    X-Mms-Transaction-ID
>
>                 0x34    '4'
>                 0x35    '5'
>                 0x41    'A'
>                 0x36    '6'
>                 0x37    '7'
>                 0x32    '2'
>                 0x33    '3'
>                 0x37    '7'
>
>                 0x00    Terminating Zero
>          */
>          //---------- X-Mms-Transaction-Id ----------
>      $rand = "somerandom";
>          $message .="98" . hex_encode("$rand") . "00";
>
>          //---------- X-Mms-Version ----------
>          // 0x8D        X-Mms-MMS-Version
>          // 0x90        ' 1.0'
>          $message .= "8D" . "90"; // 1.0
>          //---------- X-Mms-Transaction-Id ----------
>          $message .="98" . hex_encode("$pin") . "00";
>
>          //---------- X-Mms-Version ----------
>          // 0x8D        X-Mms-MMS-Version
>          // 0x90        ' 1.0'
>          $message .= "8D" . "90"; // 1.0
>
>          //---------- Subject ----------------
>          /*     0x96    Subject
>                 0x4D    'M'
>                 0x4D    'M'
>                 0x53    'S'
>                 0x00    Terminating Zero */
>          $message .= "96";
>      $sbj      = "subjectMMS";
>          $message .= hex_encode($sbj) . "00";
>
>          //---------- X-Mms-Message-Class ----------
>          /*
>                 0x8A    X-Mms-Message-Class
>                 0x80    'Personal'
>           */
>          $message .= "8A80"; // 80 = personal, 81 = ad, 82=info, 83 = auto
>
>          //---------- X-Mms-Message-Size ----------
>          /*
>                 0x8E    X-Mms-Message-Size
>                 0x04    4 bytes
>                 0x00
>                 0x00
>                 0x1E
>                 0xD3    7891 Bytes
>           */
>          $message .= "8E020B05";
>
>          //---------- X-Mms-Expiry ----------
>          /*
>                 0x88    X-Mms-Expiry
>                 0x06    Field Size
>                 0x80    Absolute Date Format ( 0x81 = Relative Date Format
> )
>                 0x04    Size of Time field
>                 0x45
>                 0xA7
>                 0xC3
>                 0xB7    1168622519 Seconds from 1-1-1970
>           */
>           $message .= "88058103015180";
>
>          //---------- X-MMS-Content-Location ----------
>          /*
>                 0x83    X-Mms-Content-Location
>                 0x68    'h'
>                 0x74    't'
>                 0x74    't'
>                 0x70    'p'
>                 0x3A    ':'
>                 0x6D    '/'
>                 0x6D    '/'
>
>                 ...
>
>                 0x00    Terminating Zero
>           */
>       $mms_url = "http://blablabla/bla.mms";;
>          $message .= "83" .hex_encode($mms_url). "00";
>          $udh       = "0605040B8423F0";
>          $text      = $message;
>          $udh  = preg_replace("/(..)/","%$1",$udh);
>          $text = preg_replace("/(..)/","%$1",$text);
>
> // Send it to kannel
> // Put UDH and Text on parameter udh & text like this to your sendsms URL
> // udh=$udh&text=$text
>
>
>
> On Jan 18, 2008 10:07 PM, Andrew B < [EMAIL PROTECTED]> wrote:
>
> > Ady Wicaksono wrote:
> > > you might want to try mbuni (www.mbuni.org <http://www.mbuni.org>)
> > > meanwhile make sure that your .mms is correct, please notes
> > > this .mms files should be delivered by your webserver with right
> > > content-type and also this file is not a XML/text files, it's a binary
> > > file generated from SMIL/XML mms files format
> > >
> > >
> > >
> > > On Jan 17, 2008 10:16 PM, Andrew B <[EMAIL PROTECTED]
> > > <mailto:[EMAIL PROTECTED] >> wrote:
> > >
> > >     Hi,
> > >     I'm trying to use kannel (specifically the test_ppg portion of it)
> > to
> > >     send out m-notification-ind messages to phones, that is, I am
> > >     trying to
> > >     send MMS notifications.  I am not trying to have kannel act as an
> > >     MMSC,
> > >     but simply I am trying to get kannel to send out the notifications
> > >     (which are, as I understand it, simply WAP push messages with an
> > MMS
> > >     header?)
> > >
> > >     I have tried various combinations of things to get it to work, but
> > >     all
> > >     have failed.
> > >
> > >     My current MMS header looks like this:
> > >
> > >
> > 8C829831323334008D908A808E02FFFF8805810301518083687474703A2F2F666F6F2E636F6D2F6261722E6D6D7300
> >
> > >
> > >     Which I have been led to believe encodes the following:
> > >     8c82 => X-Mms-Message-Type: m-notification-ind
> > >     983132333400 => X-Mms-Transaction-Id: 1234
> > >     8D90 => X-Mms-Version: 1.0
> > >     8A80 => X-Mms-Message-Class: Personal
> > >     8E02FFFF => X-Mms-Message-Size: 65535 Bytes
> > >     88058103015180 => X-Mms-Message-Expiry: 24 hrs; type = relative
> > >     83687474703A2F2F666F6F2E636F6D2F6261722E6D6D7300 =>
> > >     X-Mms-Content-Location: http://foo.com/bar.mms
> > >     <http://foo.com/bar.mms>
> > >
> > >     One phone I have actually loads this as a picture message, but
> > refuses
> > >     to open it, most phones never even hit the web-server hosting the
> > MMS
> > >     message (hence why I don't need the MMSC, I'm just SENDING MMS
> > >     message
> > >     notifications with kannel, the messages are hosted on a regular
> > >     website)
> > >
> > >     Thank you all for any insight into this, it's been troubling me
> > >     for weeks...
> > >     --Andrew
> > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > >
> > > Ady Wicaksono
> > > Email:
> > > ady.wicaksono at gmail.com <http://gmail.com>
> > > http://adywicaksono.wordpress.com/
> > Yeah, my MMS file is correct, and valid (it was created using Nokia's
> > Multimedia Factory or whatever it's called)
> > My main issue is how to encode 3 of the fields in the m-notification-ind
> >
> > message...
> >
> > 8D90 => X-Mms-Version: 1.0
> > 8E02FFFF => X-Mms-Message-Size: 65535 Bytes
> > 88058103015180 => X-Mms-Message-Expiry: 24 hrs; type = relative
> >
> >
> > The standards make me think that the version tag should be 8D10 for
> > version 1.0, but maybe there's some byte swapping going on that I don't
> > know about (speaking of which, is the binary encoding standard for all
> > this big, or little endian?
> >
> > Secondly, for the message size, the standard says it's a long int, but
> > one example I saw said that the first octet after the 8E was how many
> > octets were used for the size (so 8E02FFFF means message size is 2
> > octets: FFFF or 65535. on my phone, it says that the message is a
> > negative size... (the standards also state that this flag, while
> > required, isn't really important.
> > and I am utterly confused on the message expiry tag... 88 05 apparently
> > means it uses 5 octets, the 81 means that it's relative time... and the
> > rest means 24 hours...
> >
> > I know this is a valid m-notification-ind message... I just want to know
> > why, and those are the only 3 fields I'm not 100% positive about.
> >
> > --Andrew
> >
> >
>
>
> --
> Regards,
>
> Ady Wicaksono
> Email:
> ady.wicaksono at gmail.com
> http://adywicaksono.wordpress.com/




-- 
Regards,

Ady Wicaksono
Email:
ady.wicaksono at gmail.com
http://adywicaksono.wordpress.com/

Reply via email to