Solved...
I misse-type a variable I send to my function. Sorry On 2/13/08, Alvaro Cornejo <[EMAIL PROTECTED]> wrote: > > Hi All > > After some time I can restart trying to get the wap push stuff to work. > > I followed instructions from Juan and Mike and was able to have kannel > send the sms with wappush info and get it on the phone. > > However, if I tell the cellphone to get the content, I get an " Sorry, > connection to server lost ". Never the last, if I do enter the same URL > directly from the same cel. I´m able to get the content. > > What can be wrong? > > here are my logs: > > 2008-02-13 10:23:39 [13531] [11] DEBUG: HTTP: Creating HTTPClient for > `10.10.5.2'. > 2008-02-13 10:23:39 [13531] [11] DEBUG: HTTP: Created HTTPClient area > 0x993c790. > 2008-02-13 10:23:39 [13531] [14] INFO: PPG: Accept request </wappush> from > <10.10.5.2> > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: http_read_thread: pap > multipart accepted > 2008-02-13 10:23:39 [13531] [14] INFO: client address was <+525513206766>, > accepted > 2008-02-13 10:23:39 [13531] [14] DEBUG: PAP COMPILER: doing semantic > analysis for address type a phone number > 2008-02-13 10:23:39 [13531] [14] DEBUG: PAP COMPILER: network orbearer > missing, reverting to GSM+SMS > 2008-02-13 10:23:39 [13531] [14] INFO: reverting to default bearer and > network > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: http_read_thread: pap control > entity compiled ok > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: transform_message: push > message content and headers valid > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: push machine 2 created > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: store_push_data: push machine > 2 appended to unit push list > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: send_push_response: telling > pi > 2008-02-13 10:23:39 [13531] [14] DEBUG: HTTP: Resetting HTTPClient for > `10.10.5.2'. > 2008-02-13 10:23:39 [13531] [14] INFO: PPG: handle_push_message: push > message accepted for processing > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: OTA request for unit push > 2008-02-13 10:23:39 [13531] [9] DEBUG: OTA: event arrived > 2008-02-13 10:23:39 [13531] [14] INFO: PPG: unconfirmed push delivered to > OTA > 2008-02-13 10:23:39 [13531] [14] DEBUG: PPG: destroying push machine 2 > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP (UNIT): event arrived > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP_UNIT: Connectionless push > accepted > 2008-02-13 10:23:39 [13531] [10] DEBUG: HTTP: Destroying HTTPClient area > 0x993c790. > 2008-02-13 10:23:39 [13531] [10] DEBUG: HTTP: Destroying HTTPClient for > `10.10.5.2'. > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP: Mapping > `application/vnd.wap.sic', WSP 1.2 to 0x002e. > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP: Mapping `Authorization', WSP > 1.3 to 0x0007. > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP: Mapping `Content-Length', WSP > 1.3 to 0x000d. > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP: Mapping `Content-Type', WSP > 1.3 to 0x0011. > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP: Mapping `Encoding-Version', > WSP 1.3 to 0x0043. > 2008-02-13 10:23:39 [13531] [2] DEBUG: WDP (wapbox): delivering 1 segments > to bearerbox > 2008-02-13 10:23:39 [13531] [2] DEBUG: WSP (UNIT): delivering to wdp > 2008-02-13 10:23:39 [13531] [9] DEBUG: OTA: made connectionless session > service request > 2008-02-13 10:23:39 [13531] [0] WARNING: Received other message than > wdp/admin, ignoring! > > > > [EMAIL PROTECTED] ~]# ./wap-push-test.php > HTTP/1.1 202 Accepted > Server: Kannel/cvs-20071108 > Date: Wed, 13 Feb 2008 16:23:39 GMT > Content-Length: 403 > Content-Type: application/xml > > <?xml version="1.0"?><!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN" " > http://www.wapforum.org/DTD/pap_1.0.dtd"><pap><push-response > push-id="12346" sender-name="srv.smsglobal.com.mx; WAP/1.3 > (Kannel/cvs-20071108)" reply-time="2008-02-13T16:23:39Z" > sender-address="/wappush"><response-result code ="1001" desc="The request > has been accepted for processing"></response-result></push-response></pap> > [EMAIL PROTECTED] ~]# > > > my script: > > $host = 'localhost'; > $port = '8080'; > $url = "http://$host:$port"; > > $ppg_user = 'foo'; > $ppg_pass = 'bar'; > > // $wap_push_id = get_rand_numbers(5); > $wap_push_id = "12346"; > > $body = "--multipart-boundary\r\n". > "Content-type: application/xml\r\n\r\n". > '<?xml version="1.0"?>'."\r\n". > '<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN"'."\r\n". > '"http://www.wapforum.org/DTD/pap_1.0.dtd" >'."\r\n". > '<pap>'."\r\n". > '<push-message push-id="'.$wap_push_id.'">'."\r\n\t". > '<address > address-value="WAPPUSH='.$country_code.$phone.'/[EMAIL PROTECTED] > "/>'."\r\n\t". > '<quality-of-service delivery-method="unconfirmed" > network="GSM" bearer="SMS"/>'. > "\r\n</push-message>\r\n". > "</pap>\r\n\r\n". > "--multipart-boundary\r\n". > "Content-type: text/vnd.wap.si\r\n\r\n". > '<?xml version="1.0"?>'."\r\n". > '<!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN"'."\r\n". > '"http://www.wapforum.org/DTD/si.dtd">'."\r\n". > "<si>\r\n". > '<indication action="signal-high" si-id="'.$wap_push_id.'" > href="'. $push_url .'">'.$text.'</indication>'."\r\n". > "</si>\r\n"."--multipart-boundary--\r\n"; > > $post = "POST /wappush HTTP/1.1\r\n"."Host: $host:$port\r\n". > "Authorization: Basic > ".base64_encode("$ppg_user:$ppg_pass")."\r\n". > "X-Kannel-SMSC: $smsc_id\r\n".'Content-Type: multipart/related; > boundary=multipart-boundary; type="application/xml"'."\r\n". > "Content-Length: ".strlen($body)."\r\n"."\r\n".$body; > > // $url = iconv("ISO-8859-1","UTF-8",$url); > // $post = iconv("ISO-8859-1","UTF-8",$post); > $ch = curl_init(); > curl_setopt ($ch, CURLOPT_URL, $url); > curl_setopt($ch, CURLOPT_HEADER, 1); > curl_setopt($ch, CURLOPT_TIMEOUT, 15); > curl_setopt ($ch,CURLOPT_CUSTOMREQUEST , $post); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); > $reply = curl_exec($ch); > curl_close ($ch); > > print_r($reply); > > > my wap config: > > #################################### > # TEST WAP > > group = wapbox > bearerbox-host = localhost > log-file = "/var/log/kannel/wapbox.log" > access-log = "/var/log/kannel/wapaccess.log" > log-level = 0 > syslog-level = none > > group = ppg > ppg-url = /wappush > ppg-port = 8080 > concurrent-pushes = 100 > users = 1024 > ppg-allow-ip = "*.*.*.*" > trusted-pi = true > service-name = ppg1 > default-smsc = route1 > > group = wap-push-user > wap-push-user = wappush > ppg-username = foo > ppg-password = bar > allow-ip = "*.*.*.*" > > ################################## > > > > > -- > > |-----------------------------------------------------------------------------------------------------------------| > Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier > celular y > Nextel en México y en mas de 180 paises. Use aplicaciones 2 vias via SMS y > GPRS online > Visitenos en www.smsglobal.com.mx y www.pravcom.com > -- |-----------------------------------------------------------------------------------------------------------------| Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier celular y Nextel en México y en mas de 180 paises. Use aplicaciones 2 vias via SMS y GPRS online Visitenos en www.smsglobal.com.mx y www.pravcom.com
