added OMA-EMN support to Kannel PPG

Paul Flanagan pflanno at gmail.com
Wed Aug 15 17:07:06 CEST 2007


Hi there
I needed a way to test a PAP interface I wrote to send OMA Email
Notifications as defined in
http://www.openmobilealliance.org/release_program/emn_v10.html

so I added OMA-EMN support to kannel.

OMA Email Notification (EMN) enables the mobile e-mail client to be notified
of a new e-mail via wappush.
Attached is diff of gateway/gw/wap_push_ppg.c and 2 new files. Code is
closely based on wap_push_sl_compiler.c

It works fine but after much testing with SonyEricsson K800i I discovered
that I had to remove all headers from the wap push except for
*X-Wap-Application-Id: x-wap-application:emn.ua
*(X-Wap-Application-Id: x-wap-application:emn.ua header is definitely
required by all Nokia phones that support OMA EMN)

It seems that there is no way to configure kannel to leave out certain
headers. Most HTTP headers from the PAP request are converted to WSP headers
e.g. HTTP authorization headers.
In addition to HTTP headers, it seems that the following 2 headers are
always encoded

Content-length
Encoding-Version

Again, OMA-EMN did not work on SE phones if those headers were present.
I realise that this is probably a bug in the phone that it cannot handle
those headers but it would be great if there was a way to configure kannel
to leave out those headers.
To work-around that problem  I unconditionally remove these headers by
adding the following lines to wap_push_ppg.c before the call to
pap_compile()

http_header_remove_all(push_headers, "Content-Length");
http_header_remove_all(push_headers, "Encoding-Version");

That works but it's not a nice solution.
I believe above headers (Content-Length, Encoding-Version) are optional.
It's pointless to send HTTP authorization headers to the phone.
Adding a configuration setting to tell kannel not to add certain headers
into the WAPPUSH is probably the best solution.
I want to get your opinion on this. Am I missing something here? I didn't
see anywhere in the WSP spec where it says those headers are required.

I can send on a diff of the code I've written but I thought I'd wait until I
handle the header problem in a better way

This issue similar to issue raised in following thread
http://www.mail-archive.com/devel@kannel.org/msg06941.html
except in this case, it just doesn't just increase the number of SMS
messages required to carry the wappush, it breaks the OMA EMN functionaly.


Regards
Paul Flanagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.kannel.org/pipermail/devel/attachments/20070815/d5a537e5/attachment.html 


More information about the devel mailing list