Hi,

Yes, I have used the full url.

$fields[udh]  into `udhdata`
$fields[text] into `msgdata`

and other relevant fields.

Yet message does not come to the phone or phone does not understand it.
However, if i past the URL directly on the sendsms http interface, the
message get delivered right.

Am worried if i was supposed to insert $fields[text] into `msgdata`
directly.


On Sun, Jan 3, 2010 at 11:15 PM, Alejandro Guerrieri <
alejandro.guerri...@gmail.com> wrote:

> Wap push uses udh data, try using the full url my code generates.
>
> Regards,
>
> Alex
>
>
> On Sun, Jan 3, 2010 at 10:45 PM, Sam <nu.e...@gmail.com> wrote:
>
>> Hi,
>>
>> I have tried to use Alex php code here http://www.blogalex.com/wp-
>> content/uploads/2008/09/send_wap_push.php.txt
>>
>> by inserting the content of $fields[text] into `msgdata` field of the
>> SQLbox table but this is not working.
>>
>>
>> <?php
>>   $fields = array (
>>     'from' => '9912345678',
>>     'to' => '9987654321',
>>     'smsc' => 'mysmsc',
>>     'link' => 'www.my-funny-link.com/myfile.mid',
>>     'title' => 'Hi, look at this'
>>   );
>>
>>   $kannel = array (
>>     'host' => 'localhost',
>>     'port' => 13013,
>>     'user' => 'foo',
>>     'pass' => 'bar'
>>   );
>>
>>   $result = sendwappush ( $fields, $kannel );
>>   print "SENT<br>$result<br>";
>>
>>
>> /*
>>   sendwappush function.
>>   Copyleft 2004 by Alejandro Guerrieri
>>   This code is open source and GPL licensed
>> */
>>   function send_wap_push ( $fields, $kannel ) {
>>     $fields[udh]  = '%06%05%04%0B%84%23%F0';
>>     $fields[text] = '%1B%06%01%AE%02%05%6A%00%45%C6%0C%03'.
>>       hex_encode($fields['link'], '%').
>>       '%00%01%03'.
>>       hex_encode($fields['title'], '%').
>>       '%00%01%01';
>>     unset ( $fields['title'], $fields['link'] );
>>
>>     while(list($k,$v) = each($fields)) {
>>       if ( $v != "" ) {
>>         $string .= "&$k=$v";
>>       }
>>     }
>>     $request = 'http://'.$kannel['host'].':'.$kannel[port].
>>       '/cgi-bin/sendsms'.
>>       '?user='.$kannel['user'].
>>       '&pass='.$kannel['pass'].
>>       $string;
>>     $result = @file( $request );
>>     return 'ok';
>>   }
>>
>>   function hex_encode( $text, $joiner='' ) {
>>     for ($l=0; $l<strlen($text); $l++) {
>>       $letter = substr($text, $l, 1);
>>       $ret .= sprintf("%s%02X", $joiner, ord($letter));
>>     }
>>     return $ret;
>>   }
>> ?>
>>
>>
>>
>> 2010/1/3 Nikos Balkanas <nbalka...@gmail.com>
>>
>>  Hi,
>>>
>>> With SQLbox you'll have to push it like sms. For a php example for simple
>>> pushes please search archives for Alejandro Guerrieri's code.
>>>
>>> BR,
>>> Nikos
>>>
>>> ----- Original Message -----
>>> *From:* Sam <nu.e...@gmail.com>
>>> *To:* users@kannel.org
>>> *Sent:* Sunday, January 03, 2010 11:23 PM
>>> *Subject:* Re: sqlbox and wap push
>>>
>>> Hi,
>>>
>>> Please how do i make SQLBOX to handle a simple Service Load Wap push like
>>> the following to a mobile?
>>>
>>>
>>>
>>>  <?xml version="1.0"?>
>>> <!DOCTYPE sl PUBLIC "-//WAPFORUM//DTD SL 1.0//EN"
>>>                     "www.wapforum.org/DTD/sl.dtd">
>>> <sl href="http://domain.com/images2.jpg"/>
>>>
>>>
>>>
>>>
>>> N.B. Giving that the the appropriate UDH has been defined.
>>>
>>> TIA
>>>
>>> --Sam.
>>>
>>>
>>>
>>> 2009/12/9 Nikos Balkanas <nbalka...@gmail.com>
>>>
>>>>  I don't have an example. Use Alex's link. And don't spam. 1 email is
>>>> plenth.
>>>>
>>>> BR,
>>>> Nikos
>>>>
>>>>  ----- Original Message -----
>>>> *From:* Sam <nu.e...@gmail.com>
>>>> *To:* Nikos Balkanas <n...@amdtelecom.net>
>>>> *Cc:* users@kannel.org
>>>>   *Sent:* Wednesday, December 09, 2009 11:10 AM
>>>> *Subject:* Re: sqlbox and wap push
>>>>
>>>> The goal is to make it work with sqlbox. Thus i would need to convert
>>>> to wbxml. This is where i need your example.
>>>>
>>>>
>>>> 2009/12/9 Nikos Balkanas <n...@amdtelecom.net>
>>>>
>>>>>  Hi,
>>>>>
>>>>> Use Alex's link. Otherwise it is too lengthy to describe the protocol.
>>>>> If you are interested the spec is:
>>>>>
>>>>> WAP-249-PPGService-20010713-a
>>>>> An example would be meaningless. It is different for each message.
>>>>> Wapbox will do the same thing for you, but it doesn't work with SQLbox.
>>>>>
>>>>> BR,
>>>>> Nikos
>>>>>
>>>>> ----- Original Message -----
>>>>> *From:* Sam <nu.e...@gmail.com>
>>>>> *To:* Nikos Balkanas <nbalka...@gmail.com>
>>>>> *Cc:* users@kannel.org
>>>>> *Sent:* Wednesday, December 09, 2009 10:39 AM
>>>>> *Subject:* Re: sqlbox and wap push
>>>>>
>>>>> Thanks Nikos,
>>>>>
>>>>> I understand the UDH stuff, however how do i convert to wbxml? Please
>>>>> could you do me an example?
>>>>>
>>>>> Also, would this code (
>>>>> http://www.blogalex.com/wp-content/uploads/2008/09/send_wap_push.php.txt)
>>>>> help in anyway?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> --Sam
>>>>>
>>>>>
>>>>>
>>>>> 2009/12/9 Nikos Balkanas <nbalka...@gmail.com>
>>>>>
>>>>>>  Yes.
>>>>>>
>>>>>> You will have to do some work, though.
>>>>>>
>>>>>> 1) Use the appropriate udh for wap-push:
>>>>>>
>>>>>> &udh=%06%05%04%0B%84%23%F0
>>>>>>
>>>>>> in your sendsms url (url-encoded)
>>>>>>
>>>>>> 2) You have to convert your text first to wbxml and then urlencode it
>>>>>> as well in your URL.
>>>>>>
>>>>>> BR,
>>>>>> Nikos
>>>>>>
>>>>>> ----- Original Message -----
>>>>>> *From:* Sam <nu.e...@gmail.com>
>>>>>> *To:* users@kannel.org
>>>>>> *Sent:* Wednesday, December 09, 2009 9:43 AM
>>>>>> *Subject:* sqlbox and wap push
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Please can i use sqlbox for wap push?
>>>>>>
>>>>>> --Sam
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to