Re: Push headers

Aarno Syvänen <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Actually you can do two things:
        a) you can compose and send a binary sms using smsbox
        b) you can send push xml document  using a push initiator.  
Test/test_ppg.c is an example.

B) has easier, actually readable,  content (xml document) but  
requires an push initiator

Aarno

On 12 Jan 2006, at 20:58, M Amedeo Alaimo wrote:

> Alright since I posted this I have come to the discovery that i  
> want to send my wap push using the sendsms program.
>
> Here is my UDH, which I believe is correct.
> %06%05%04%0B%84%23%F0
>
> Here is my push content, including Headers, and the SI Layer
> %05%06%01%AE%81%EA%02%05%6A%00%45%C6%0C%03wap.yahoo.com%00%01%03yeah 
> %00%01%01
>
> I am wondering if there is something wrong with my push content....
>
> here is the code i am using - maybe its more readable.
> my $text  = "%05"; # transid
> $text .= "%06"; # PDU Type (push)
> #$text .= "%04%03"; # length of content-type
> $text .= "%01";
> $text .= '%AE%81%EA'; # content-type: application/vnd.wap.sic
> #$text .= '%AE%02%05';
> $text .= "%02"; # wbxml_version
> $text .= "%05"; # si_public_id
> $text .= "%6A"; # charset= (sibxml->charset)
> $text .= "%00"; # string table length
> $text .= "%45"; # <si>
> $text .= '%C6'; # <indication..
> $text .= "%0C%03".uri_escape( $url )."%00"; # href=url
> $text .= "%01"; # end indication>
> $text .= "%03".uri_escape( $title )."%00";
> $text .= "%01"; # </indication>
> $text .= "%01"; # </si>
>
> I have also created a wbXML binary file from a si content file, and  
> have tried to load the file into a variable and send it over  
> sendsms ( unsuccessfully i might add. )
>
> What happens when i send this message  ( the udh plus the hex  
> encoded si ) to my provider is this....
>
> BEGIN
> MSN: ****
> TO: ****
> time: 2006-01-12 19:52:27
> message: ACK/
> udh:
> smsc: smscDN
> coding: -1
> smsc-id: 8731553e-86c5-4610-b962-a2f13a088428::smscDN
> smscReply: ACK/
> billing:
> account:
> serviceName: playsms
> dlr-type: 8
> END
> BEGIN
> MSN: ****
> TO: ****
> time: 2006-01-12 19:52:38
> message: id:1j0j9u00vo024u00lk44c01fvq6g sub:001 dlvrd:001 submit  
> date:0601121955 done date:0601121955 stat:UNDELIV err:00b  
> text:^F^E^D ?#?^E^F^A???^B^Ej^@E? idd:null
> udh:
> smsc: smscDN
> coding: -1
> smsc-id: 81e34cf4-455a-4700-a0a6-591292ca8696::smscDN
> smscReply: id:1j0j9u00vo024u00lk44c01fvq6g sub:001 dlvrd:001 submit  
> date:0601121955 done date:0601121955 stat:UNDELIV err:00b  
> text:^F^E^D^K?#?^E^F^A???^B^Ej^@E?^L idd:null
> billing:
> account:
> serviceName: playsms
> dlr-type: 2
> END
>
> Also, for another time or not.  I am in need of a TLV Patch or some  
> pointers, for getting the carrier information from our provider.
>
> Thanks,
>
> Amedeo
> ---------- Forwarded message ----------
> From: M Amedeo Alaimo <[email protected]>
> Date: Jan 10, 2006 1:04 PM
> Subject: Push headers
> To: [email protected]
>
> Our provider does not want us to send them multipart wap pushes.
> This is what we send them UDH - WTP Payload and Headers - and A WB- 
> XML Binary SI.
>
> This is what I am doing right now
>
> I am sending this as a post to my PPG in kannel
>
> "dlr-mask=31&dlr-url=http%3A%2F%2F127.0.0.1%3A80%2Fkannel%2Fdlr%2F% 
> 3FMSN%3D%25p%26TO%3D%25P%26
> time%3D%25t%26message%3D%25a%26udh%3D%25u%26smsc%3D%25i%26coding%3D% 
> 25c%26smsc-id%3D%25I
> %3A%3A%25i%26smscReply%3D%25A%26billing%3D%25B%26account%3D%25o% 
> 26serviceName%3D%25n%26
> dlr-type%3D%25d&to=5712657448&from=108019&dlr-mask=31&udh=%06%05%04% 
> 0B%84%23%F0&
> text=%40%06%04%01%AE%81%04%02%05%6A%00%45%C6%0b%03
> http://wap.yahoo.com%00%11%038.98203058537277\@vodafone.pt
> %00%08%0A%C3%07%20%01%10%21%20%02%23%10%C3%04%20%02%06%30%01%03yeah% 
> 00%01%01"
>
> My headers are as follows
> authorization  => "Basic Zm9vOmJhcg==\n",
> "content-type" => "application/xml",
>
> Now I know that the content type is inccorect.  I obtained the  
> encoded xml from the sendsms.php in the contrib dir of the cvs  
> version of
> gateway.
>
> The message mayb be wrong, but for now wapbox tells me this
> <?xml version="1.0"?><!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP  
> 1.0//EN" "http://www.wapforum.org/DTD/pap_1.0.dtd"><pap><badmessage- 
> response code="2000" desc="Not understood due to malformed syntax"  
> bad-message-fragment="application/xml"></badmessage-response></pap>
> AN2006-01-10 12:54:33 [27691] [14] WARNING: PPG:  
> headers_acceptable: got unacceptable push headers
> 2006-01-10 12:54:33 [27691] [14] WARNING: PPG: Unparsable push  
> headers, the request unacceptable
> 2006-01-10 12:54:33 [27691] [14] DEBUG: PPG:  
> send_bad_message_response: telling pi
>
>
> Thanks!
>
>
>
> -- 
> M Amedeo Alaimo
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.