Hi All I had wap working fine sometime ago with version 1.4.1 and migrate to 1.4.3 but didn't used wap since then.
Now that I need to test wap again, wapbox dies after sending a wappush. Can someone giveme a hand on this? In bearerbox there is an "Msg packet invalid / Failed to unpack data" but there is no more info... BEARERBOX LOG: 2009-04-02 20:33:25 [19363] [33] ERROR: Msg packet was invalid. 2009-04-02 20:33:25 [19363] [33] ERROR: Failed to unpack data! 2009-04-02 20:33:25 [19363] [34] DEBUG: send_msg: sending msg to box: <10.10.5.2> 2009-04-02 20:33:25 [19363] [34] DEBUG: Thread 34 (gw/bb_boxc.c:boxc_sender) terminates. 2009-04-02 20:33:25 [19363] [33] DEBUG: Thread 33 (gw/bb_boxc.c:function) terminates. 2009-04-02 20:33:25 [19363] [32] DEBUG: send_msg: sending msg to box: <10.10.5.2> 2009-04-02 20:33:25 [19363] [32] DEBUG: boxc_sender: sent message to <10.10.5.2> 2009-04-02 20:33:25 [19363] [31] DEBUG: boxc_receiver: got ack WAP BOX LOG: 2009-04-02 20:33:03 [19398] [0] INFO: Added logfile `/var/log/kannel/wapbox.log' with level `0'. 2009-04-02 20:33:03 [19398] [0] INFO: Starting to log to file /var/log/kannel/wapbox.log level 0 2009-04-02 20:33:03 [19398] [0] DEBUG: syslog parameter is none 2009-04-02 20:33:03 [19398] [0] INFO: Logging accesses to '/var/log/kannel/wapaccess.log'. 2009-04-02 20:33:03 [19398] [0] INFO: Started access logfile `/var/log/kannel/wapaccess.log'. 2009-04-02 20:33:03 [19398] [0] INFO: ------------------------------------------------------------ 2009-04-02 20:33:03 [19398] [0] INFO: Kannel wapbox version cvs-20071108 starting up. 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 1 (wap/wsp_session.c:main_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 2 (wap/wsp_unit.c:main_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 3 (wap/wsp_push_client.c:main_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 4 (wap/timers.c:watch_timers) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 5 (wap/wtp_init.c:main_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 6 (wap/wtp_resp.c:main_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 7 (gw/wap-appl.c:main_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 8 (gw/wap-appl.c:return_replies_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 9 (gw/wap_push_ota.c:main_thread) 2009-04-02 20:33:03 [19398] [0] INFO: HTTP: Opening server at port 8080. 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 10 (gwlib/fdset.c:poller) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 11 (gwlib/http.c:server_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 12 (gw/wap_push_ppg.c:ota_read_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 13 (gw/wap_push_ppg.c:http_read_thread) 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 14 (gw/wap_push_ppg.c:pap_request_thread) 2009-04-02 20:33:03 [19398] [0] INFO: Connected to bearerbox at localhost port 13002. 2009-04-02 20:33:03 [19398] [0] DEBUG: Started thread 15 (gw/heartbeat.c:heartbeat_thread) 2009-04-02 20:33:03 [19398] [2] DEBUG: Thread 2 (wap/wsp_unit.c:main_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [3] DEBUG: Thread 3 (wap/wsp_push_client.c:main_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [4] DEBUG: Thread 4 (wap/timers.c:watch_timers) maps to pid 19398. 2009-04-02 20:33:03 [19398] [5] DEBUG: Thread 5 (wap/wtp_init.c:main_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [6] DEBUG: Thread 6 (wap/wtp_resp.c:main_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [7] DEBUG: Thread 7 (gw/wap-appl.c:main_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [1] DEBUG: Thread 1 (wap/wsp_session.c:main_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [8] DEBUG: Thread 8 (gw/wap-appl.c:return_replies_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [9] DEBUG: Thread 9 (gw/wap_push_ota.c:main_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [10] DEBUG: Thread 10 (gwlib/fdset.c:poller) maps to pid 19398. 2009-04-02 20:33:03 [19398] [11] DEBUG: Thread 11 (gwlib/http.c:server_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [12] DEBUG: Thread 12 (gw/wap_push_ppg.c:ota_read_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [13] DEBUG: Thread 13 (gw/wap_push_ppg.c:http_read_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [14] DEBUG: Thread 14 (gw/wap_push_ppg.c:pap_request_thread) maps to pid 19398. 2009-04-02 20:33:03 [19398] [15] DEBUG: Thread 15 (gw/heartbeat.c:heartbeat_thread) maps to pid 19398. 2009-04-02 20:33:25 [19398] [11] DEBUG: HTTP: Creating HTTPClient for `10.10.5.2'. 2009-04-02 20:33:25 [19398] [11] DEBUG: HTTP: Created HTTPClient area 0x974a0d8. 2009-04-02 20:33:25 [19398] [14] INFO: PPG: Accept request </wappush> from <10.10.5.2> 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: http_read_thread: pap multipart accepted 2009-04-02 20:33:25 [19398] [14] INFO: client address was <+525538957623>, accepted 2009-04-02 20:33:25 [19398] [14] DEBUG: PAP COMPILER: doing semantic analysis for address type a phone number 2009-04-02 20:33:25 [19398] [14] DEBUG: PAP COMPILER: network orbearer missing, reverting to GSM+SMS 2009-04-02 20:33:25 [19398] [14] INFO: reverting to default bearer and network 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: http_read_thread: pap control entity compiled ok 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: transform_message: push message content and headers valid 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: push machine 0 created 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: store_push_data: push machine 0 appended to unit push list 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: send_push_response: telling pi 2009-04-02 20:33:25 [19398] [14] DEBUG: HTTP: Resetting HTTPClient for `10.10.5.2'. 2009-04-02 20:33:25 [19398] [14] INFO: PPG: handle_push_message: push message accepted for processing 2009-04-02 20:33:25 [19398] [10] DEBUG: HTTP: Destroying HTTPClient area 0x974a0d8. 2009-04-02 20:33:25 [19398] [10] DEBUG: HTTP: Destroying HTTPClient for `10.10.5.2'. 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: OTA request for unit push 2009-04-02 20:33:25 [19398] [14] INFO: PPG: unconfirmed push delivered to OTA 2009-04-02 20:33:25 [19398] [14] DEBUG: PPG: destroying push machine 0 2009-04-02 20:33:25 [19398] [9] DEBUG: OTA: event arrived 2009-04-02 20:33:25 [19398] [9] DEBUG: OTA: made connectionless session service request 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP (UNIT): event arrived 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP_UNIT: Connectionless push accepted 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP: Mapping `application/vnd.wap.sic', WSP 1.2 to 0x002e. 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP: Mapping `Authorization', WSP 1.3 to 0x0007. 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP: Mapping `Content-Length', WSP 1.3 to 0x000d. 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP: Mapping `Content-Type', WSP 1.3 to 0x0011. 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP: Mapping `Encoding-Version', WSP 1.3 to 0x0043. 2009-04-02 20:33:25 [19398] [2] DEBUG: WDP (wapbox): delivering 1 segments to bearerbox 2009-04-02 20:33:25 [19398] [2] DEBUG: WSP (UNIT): delivering to wdp 2009-04-02 20:33:25 [19398] [0] INFO: Bearerbox told us to die 2009-04-02 20:33:25 [19398] [0] INFO: Kannel wapbox terminating. 2009-04-02 20:33:25 [19398] [15] DEBUG: Thread 15 (gw/heartbeat.c:heartbeat_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 5 (wap/wtp_init.c:main_thread) to terminate 2009-04-02 20:33:25 [19398] [5] DEBUG: Thread 5 (wap/wtp_init.c:main_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: wtp_initiator_shutdown: 0 init_machines left 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 6 (wap/wtp_resp.c:main_thread) to terminate 2009-04-02 20:33:25 [19398] [6] DEBUG: Thread 6 (wap/wtp_resp.c:main_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: wtp_resp_shutdown: 0 resp_machines left 2009-04-02 20:33:25 [19398] [0] DEBUG: 0 items left in the tid cache 2009-04-02 20:33:25 [19398] [4] DEBUG: Thread 4 (wap/timers.c:watch_timers) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 3 (wap/wsp_push_client.c:main_thread) to terminate 2009-04-02 20:33:25 [19398] [3] DEBUG: Thread 3 (wap/wsp_push_client.c:main_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: wsp_push_client_shutdown: 0 push client machinesleft 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 2 (wap/wsp_unit.c:main_thread) to terminate 2009-04-02 20:33:25 [19398] [2] DEBUG: Thread 2 (wap/wsp_unit.c:main_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 1 (wap/wsp_session.c:main_thread) to terminate 2009-04-02 20:33:25 [19398] [1] DEBUG: Thread 1 (wap/wsp_session.c:main_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: WSP: 0 session machines left. 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 7 (gw/wap-appl.c:main_thread) to terminate 2009-04-02 20:33:25 [19398] [7] DEBUG: Thread 7 (gw/wap-appl.c:main_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 8 (gw/wap-appl.c:return_replies_thread) to terminate 2009-04-02 20:33:25 [19398] [8] DEBUG: Thread 8 (gw/wap-appl.c:return_replies_thread) terminates. 2009-04-02 20:33:25 [19398] [9] DEBUG: Thread 9 (gw/wap_push_ota.c:main_thread) terminates. 2009-04-02 20:33:25 [19398] [14] DEBUG: Thread 14 (gw/wap_push_ppg.c:pap_request_thread) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: Waiting for 11 (gwlib/http.c:server_thread) to terminate 2009-04-02 20:33:25 [19398] [12] DEBUG: Thread 12 (gw/wap_push_ppg.c:ota_read_thread) terminates. 2009-04-02 20:33:25 [19398] [13] DEBUG: HTTP: No clients with requests, quitting. 2009-04-02 20:33:25 [19398] [13] DEBUG: Thread 13 (gw/wap_push_ppg.c:http_read_thread) terminates. 2009-04-02 20:33:25 [19398] [11] DEBUG: Thread 11 (gwlib/http.c:server_thread) terminates. 2009-04-02 20:33:25 [19398] [10] DEBUG: Thread 10 (gwlib/fdset.c:poller) terminates. 2009-04-02 20:33:25 [19398] [0] DEBUG: PPG: 0 push session machines left. 2009-04-02 20:33:25 [19398] [0] DEBUG: PPG: 0 unit pushes left 2009-04-02 20:33:25 [19398] [0] DEBUG: Immutable octet strings: 810. answer to my wappush: [r...@srvcom1 feat]# ./wap-push-test.php HTTP/1.1 202 Accepted Server: Kannel/cvs-20071108 Date: Fri, 03 Apr 2009 02:33:25 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="13973" sender-name="srvcom1.smsglobal.com.mx; WAP/1.3 (Kannel/cvs-20071108)" reply-time="2009-04-03T02:33:25Z" sender-address="/wappush"><response-result code ="1001" desc="The request has been accepted for processing"></response-result></push-response></pap> KANNEL CONFIG #CORE BEARERBOX group = core admin-port = 13000 smsbox-port = 13001 wapbox-port = 13002 dlr-storage = mysql # usar en vez del MYSQL-DLR # dlr-storage = internal admin-password = foo status-password = bar #box-allow-ip = "*.*.*.*" box-allow-ip = "*.*.*.*" box-deny-ip = "*.*.*.*" log-file = "/var/log/kannel/bearerbox.log" log-level = 0 access-log = "/var/log/kannel/beareraccess.log" store-type = spool store-location = /var/log/kannel/spool 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 group = wap-push-user wap-push-user = wappush ppg-username = foo ppg-password = bar allow-ip = "*.*.*.*" CODE TO SEND WAP PUSH: $push_url = "http://localhost/downloads/SMS_logo1.jpg"; $smsc_id = 't2-3'; $text = 'Prueba envio Imagen via WAP'; $host = 'localhost'; $port = '8080'; $url = "http://$host:$port"; $ppg_user = 'foo'; $ppg_pass = 'bar'; // el wap_push_id debe ser UNICO entre los push pendientes. $wap_push_id = get_rand_numbers(5); $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); KANNEL INFO Kannel bearerbox version `1.4.3'. Build `Feb 13 2009 17:32:59', compiler `4.1.2 20070626 (Red Hat 4.1.2-13)'. System Linux, release 2.6.20-1.2962.fc6, version #1 SMP Tue Jun 19 19:27:14 EDT 2007, machine i686. Hostname srvcom, IP 10.10.5.2. Libxml version 2.6.29. Using OpenSSL 0.9.8b 04 May 2006. Compiled with MySQL 5.0.27, using MySQL 5.0.27. Using native malloc.
