This show I am not an expert in PHP... YOU ARE RIGHT Alvaro !!

after commented this line:
*$dlr_url = str_replace('//', '/', $dlr_url);*

It seems SMS is sent but where is suppose to arrive the DLR ? what is its
purpose?

Fakesmsc output:
*2009-10-21 08:56:39 [5656] [0] DEBUG: Got message 5: <+687850850 +687783548
text TEST - playSMS>*


Smsbox log:
*2009-10-21 08:58:56 [14601] [2] DEBUG: HTTP: Creating HTTPClient for
`127.0.0.1'.
2009-10-21 08:58:56 [14601] [2] DEBUG: HTTP: Created HTTPClient area
0x9879420.
2009-10-21 08:58:56 [14601] [3] INFO: smsbox: Got HTTP request
</var/www/kannel/sendsms> from <127.0.0.1>
2009-10-21 08:58:56 [14601] [3] INFO: sendsms used by <playsms>
2009-10-21 08:58:56 [14601] [3] INFO: sendsms sender:<playsms:+687850850>
(127.0.0.1) to:<+687783548> msg:<TEST - playSMS>
2009-10-21 08:58:56 [14601] [3] DEBUG: Stored UUID
a07afe9c-c0ca-47f2-b473-c9bba4eaad5d
2009-10-21 08:58:56 [14601] [3] DEBUG: message length 14, sending 1 messages
2009-10-21 08:58:56 [14601] [3] DEBUG: Status: 202 Answer: <Sent.>
2009-10-21 08:58:56 [14601] [3] DEBUG: Delayed reply - wait for bearerbox
2009-10-21 08:58:56 [14601] [0] DEBUG: Got ACK (0) of
a07afe9c-c0ca-47f2-b473-c9bba4eaad5d
2009-10-21 08:58:56 [14601] [0] DEBUG: HTTP: Destroying HTTPClient area
0x9879420.
2009-10-21 08:58:56 [14601] [0] DEBUG: HTTP: Destroying HTTPClient for
`127.0.0.1'.
2009-10-21 08:58:56 [14601] [4] INFO: Starting delivery report <playsms>
from <+687850850>
2009-10-21 08:58:56 [14601] [4] INFO: Starting delivery report <playsms>
from <+687850850>
2009-10-21 08:58:56 [14601] [9] DEBUG: Queue contains 0 pending requests.
2009-10-21 08:58:56 [14601] [9] DEBUG: Parsing URL `
http://61.5.221.52/playsms/plugin/gateway/kannel/dlr.php?type=8&slid=118&uid=1
':
2009-10-21 08:58:56 [14601] [9] DEBUG:   Scheme: http://
2009-10-21 08:58:56 [14601] [9] DEBUG:   Host: 61.5.221.52
2009-10-21 08:58:56 [14601] [9] DEBUG:   Port: 80
2009-10-21 08:58:56 [14601] [9] DEBUG:   Username: (null)
2009-10-21 08:58:56 [14601] [9] DEBUG:   Password: (null)
2009-10-21 08:58:56 [14601] [9] DEBUG:   Path:
/playsms/plugin/gateway/kannel/dlr.php
2009-10-21 08:58:56 [14601] [9] DEBUG:   Query: type=8&slid=118&uid=1
2009-10-21 08:58:56 [14601] [9] DEBUG:   Fragment: (null)
2009-10-21 08:58:56 [14601] [9] DEBUG: HTTP: Opening connection to `
61.5.221.52:80' (fd=28).
2009-10-21 08:58:56 [14601] [9] DEBUG: Socket connecting
2009-10-21 08:58:56 [14601] [9] DEBUG: Queue contains 0 pending requests.
2009-10-21 08:58:56 [14601] [9] DEBUG: Parsing URL `
http://61.5.221.52/playsms/plugin/gateway/kannel/dlr.php?type=1&slid=118&uid=1
':
2009-10-21 08:58:56 [14601] [9] DEBUG:   Scheme: http://
2009-10-21 08:58:56 [14601] [9] DEBUG:   Host: 61.5.221.52
2009-10-21 08:58:56 [14601] [9] DEBUG:   Port: 80
2009-10-21 08:58:56 [14601] [9] DEBUG:   Username: (null)
2009-10-21 08:58:56 [14601] [9] DEBUG:   Password: (null)
2009-10-21 08:58:56 [14601] [9] DEBUG:   Path:
/playsms/plugin/gateway/kannel/dlr.php
2009-10-21 08:58:56 [14601] [9] DEBUG:   Query: type=1&slid=118&uid=1
2009-10-21 08:58:56 [14601] [9] DEBUG:   Fragment: (null)
2009-10-21 08:58:56 [14601] [9] DEBUG: HTTP: Opening connection to `
61.5.221.52:80' (fd=29).
2009-10-21 08:58:56 [14601] [9] DEBUG: Socket connecting
2009-10-21 08:58:56 [14601] [8] DEBUG: Get info about connecting socket
2009-10-21 08:58:56 [14601] [8] DEBUG: HTTP: Sending request:
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string at 0x987daf0:
2009-10-21 08:58:56 [14601] [8] DEBUG:   len:  146
2009-10-21 08:58:56 [14601] [8] DEBUG:   size: 1024
2009-10-21 08:58:56 [14601] [8] DEBUG:   immutable: 0
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 47 45 54 20 2f 70 6c 61 79 73
6d 73 2f 70 6c 75   GET /playsms/plu
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 67 69 6e 2f 67 61 74 65 77 61
79 2f 6b 61 6e 6e   gin/gateway/kann
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 65 6c 2f 64 6c 72 2e 70 68 70
3f 74 79 70 65 3d   el/dlr.php?type=
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 38 26 73 6c 69 64 3d 31 31 38
26 75 69 64 3d 31   8&slid=118&uid=1
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 20 48 54 54 50 2f 31 2e 31 0d
0a 48 6f 73 74 3a    HTTP/1.1..Host:
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 20 36 31 2e 35 2e 32 32 31 2e
35 32 0d 0a 43 6f    61.5.221.52..Co
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 6e 6e 65 63 74 69 6f 6e 3a 20
6b 65 65 70 2d 61   nnection: keep-a
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 6c 69 76 65 0d 0a 55 73 65 72
2d 41 67 65 6e 74   live..User-Agent
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 3a 20 4b 61 6e 6e 65 6c 2f 31
2e 34 2e 33 0d 0a   : Kannel/1.4.3..
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 0d
0a                                             ..
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string dump ends.
2009-10-21 08:58:56 [14601] [8] DEBUG: Get info about connecting socket
2009-10-21 08:58:56 [14601] [8] DEBUG: HTTP: Sending request:
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string at 0x987daf0:
2009-10-21 08:58:56 [14601] [8] DEBUG:   len:  146
2009-10-21 08:58:56 [14601] [8] DEBUG:   size: 1024
2009-10-21 08:58:56 [14601] [8] DEBUG:   immutable: 0
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 47 45 54 20 2f 70 6c 61 79 73
6d 73 2f 70 6c 75   GET /playsms/plu
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 67 69 6e 2f 67 61 74 65 77 61
79 2f 6b 61 6e 6e   gin/gateway/kann
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 65 6c 2f 64 6c 72 2e 70 68 70
3f 74 79 70 65 3d   el/dlr.php?type=
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 31 26 73 6c 69 64 3d 31 31 38
26 75 69 64 3d 31   1&slid=118&uid=1
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 20 48 54 54 50 2f 31 2e 31 0d
0a 48 6f 73 74 3a    HTTP/1.1..Host:
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 20 36 31 2e 35 2e 32 32 31 2e
35 32 0d 0a 43 6f    61.5.221.52..Co
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 6e 6e 65 63 74 69 6f 6e 3a 20
6b 65 65 70 2d 61   nnection: keep-a
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 6c 69 76 65 0d 0a 55 73 65 72
2d 41 67 65 6e 74   live..User-Agent
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 3a 20 4b 61 6e 6e 65 6c 2f 31
2e 34 2e 33 0d 0a   : Kannel/1.4.3..
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 0d
0a                                             ..
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string dump ends.
2009-10-21 08:58:56 [14601] [8] DEBUG: HTTP: Status line: <HTTP/1.1 200 OK>
2009-10-21 08:58:56 [14601] [8] DEBUG: HTTP: Received response:
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string at 0x9881b08:
2009-10-21 08:58:56 [14601] [8] DEBUG:   len:  220
2009-10-21 08:58:56 [14601] [8] DEBUG:   size: 1024
2009-10-21 08:58:56 [14601] [8] DEBUG:   immutable: 0
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 44 61 74 65 3a 20 54 75 65 2c
20 32 30 20 4f 63   Date: Tue, 20 Oc
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 74 20 32 30 30 39 20 32 31 3a
35 38 3a 35 36 20   t 2009 21:58:56
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 47 4d 54 0d 0a 53 65 72 76 65
72 3a 20 41 70 61   GMT..Server: Apa
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 63 68 65 2f 32 2e 32 2e 38 20
28 46 65 64 6f 72   che/2.2.8 (Fedor
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 61 29 0d 0a 58 2d 50 6f 77 65
72 65 64 2d 42 79   a)..X-Powered-By
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 3a 20 50 48 50 2f 35 2e 32 2e
35 0d 0a 43 61 63   : PHP/5.2.5..Cac
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 68 65 2d 43 6f 6e 74 72 6f 6c
3a 20 6e 6f 2d 63   he-Control: no-c
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 61 63 68 65 2c 20 6d 75 73 74
2d 72 65 76 61 6c   ache, must-reval
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 69 64 61 74 65 0d 0a 43 6f 6e
74 65 6e 74 2d 4c   idate..Content-L
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 65 6e 67 74 68 3a 20 30 0d 0a
43 6f 6e 6e 65 63   ength: 0..Connec
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 74 69 6f 6e 3a 20 63 6c 6f 73
65 0d 0a 43 6f 6e   tion: close..Con
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 74 65 6e 74 2d 54 79 70 65 3a
20 74 65 78 74 2f   tent-Type: text/
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 68 74 6d 6c 3b 20 63 68 61 72
73 65 74 3d 69 73   html; charset=is
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 6f 2d 38 38 35 39 2d 31 0d 0a
0d 0a               o-8859-1....
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string dump ends.
2009-10-21 08:58:56 [14601] [8] DEBUG: HTTP: Status line: <HTTP/1.1 200 OK>
2009-10-21 08:58:56 [14601] [8] DEBUG: HTTP: Received response:
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string at 0x987d5f0:
2009-10-21 08:58:56 [14601] [8] DEBUG:   len:  220
2009-10-21 08:58:56 [14601] [8] DEBUG:   size: 1024
2009-10-21 08:58:56 [14601] [8] DEBUG:   immutable: 0
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 44 61 74 65 3a 20 54 75 65 2c
20 32 30 20 4f 63   Date: Tue, 20 Oc
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 74 20 32 30 30 39 20 32 31 3a
35 38 3a 35 36 20   t 2009 21:58:56
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 47 4d 54 0d 0a 53 65 72 76 65
72 3a 20 41 70 61   GMT..Server: Apa
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 63 68 65 2f 32 2e 32 2e 38 20
28 46 65 64 6f 72   che/2.2.8 (Fedor
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 61 29 0d 0a 58 2d 50 6f 77 65
72 65 64 2d 42 79   a)..X-Powered-By
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 3a 20 50 48 50 2f 35 2e 32 2e
35 0d 0a 43 61 63   : PHP/5.2.5..Cac
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 68 65 2d 43 6f 6e 74 72 6f 6c
3a 20 6e 6f 2d 63   he-Control: no-c
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 61 63 68 65 2c 20 6d 75 73 74
2d 72 65 76 61 6c   ache, must-reval
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 69 64 61 74 65 0d 0a 43 6f 6e
74 65 6e 74 2d 4c   idate..Content-L
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 65 6e 67 74 68 3a 20 30 0d 0a
43 6f 6e 6e 65 63   ength: 0..Connec
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 74 69 6f 6e 3a 20 63 6c 6f 73
65 0d 0a 43 6f 6e   tion: close..Con
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 74 65 6e 74 2d 54 79 70 65 3a
20 74 65 78 74 2f   tent-Type: text/
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 68 74 6d 6c 3b 20 63 68 61 72
73 65 74 3d 69 73   html; charset=is
2009-10-21 08:58:56 [14601] [8] DEBUG:   data: 6f 2d 38 38 35 39 2d 31 0d 0a
0d 0a               o-8859-1....
2009-10-21 08:58:56 [14601] [8] DEBUG: Octet string dump ends.*

Regards

Emmanuel


2009/10/21 Alvaro Cornejo <[email protected]>

> What is the content of:
>
> $http_path['base']
>
> the dlr-url must have the host kannel has to call ie
> http://host:port/.... and you are just calling /var/www/....
>
> also in     $dlr_url = str_replace('//', '/', $dlr_url);
>
> You are replacing // with / so if in $http_path['base'] you have
> http://... you are changing it with http:/... so you are getting a not
> valid url
>
> Hope helps
>
> Alvaro
>
>
>
>
>
>
> |-----------------------------------------------------------------------------------------------------------------|
> Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
> celular y Nextel
> en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via
> SMS y GPRS online
>              Visitenos en www.perusms.NET www.smsglobal.com.mx y
> www.pravcom.com
>
>
>
> On Tue, Oct 20, 2009 at 4:19 PM, Emmanuel CHANSON
> <[email protected]> wrote:
> > from the code yes dlr-url is assigned to:
> > $http_path['base'] .
> > "/plugin/gateway/kannel/dlr.php?type=%d&slid=$smslog_id&uid=$uid"
> >
> > that should be
> >
> /var/www/playsms/plugin/gateway/kannel/dlr.php?type=%d&slid=$smslog_id&uid=$uid"
> >
> > I don't know how to echo this variable on the screen as this function is
> > called from another that is called from another...
> > I will try to paste this in file ? if I can not display it on the screen.
> >
> > Can you just explain me the way it works when we ask for a DLR?
> (call-flow?)
> >
> > Regards,
> >
> > Emmanuel
> >
> >
> > 2009/10/20 Nikos Balkanas <[email protected]>
> >>
> >> Hi,
> >>
> >> No, it is not a question of configuration. You don't need to url-encode
> >> the rest of your request, just your dlr-url. To help you, you need to
> post
> >> the output of dlr_url. The str_replace looks mighty suspicious. Are you
> >> trying to use:
> >>
> >> dlr_url = http:/www.base.com/plugin....
> >>
> >> ??
> >>
> >> BR,
> >> Nikos
> >>
> >>
> >> ----- Original Message -----
> >> From: Emmanuel CHANSON
> >> To: users
> >> Sent: Tuesday, October 20, 2009 2:24 PM
> >> Subject: Kannel, PlaySMS and dlr-url
> >> Hello guys,
> >>
> >> Kannel installed and running version 1.4.2
> >> PlaySMS 0.9.4 installed and almost running with Kannel (I have some
> issue)
> >> And one is the following:
> >>
> >> I can not send SMS using PlaySMS web portal if the URL defined in the
> code
> >> is the following:
> >> (fn.php from PlaySMS version 0.8.4):
> >>
> >>     $dlr_url = $http_path['base'] .
> >> "/plugin/gateway/kannel/dlr.php?type=%d&slid=$smslog_id&uid=$uid";
> >>     $dlr_url = str_replace('//', '/', $dlr_url);
> >> ...
> >>     $URL =
> >> "http://localhost:13013/var/www/kannel/sendsms?username=
> ".urlencode($kannel_param['username'])."&password=".urlencode($kannel_param['password']);
> >>     $URL .=
> >>
> "&from=".urlencode($sms_from)."&to=".urlencode($sms_to)."&text=".urlencode($sms_msg);
> >>     $URL .= "&dlr-mask=31&dlr-url=".urlencode($dlr_url);
> >>     $URL .= "&mclass=".$msg_type;
> >>
> >> I got this on the smsbox.log file:
> >>
> >> 2009-10-20 22:08:12 [14601] [2] DEBUG: HTTP: Creating HTTPClient for
> >> `127.0.0.1'.
> >> 2009-10-20 22:08:12 [14601] [2] DEBUG: HTTP: Created HTTPClient area
> >> 0x987e2d0.
> >> 2009-10-20 22:08:12 [14601] [3] INFO: smsbox: Got HTTP request
> >> </var/www/kannel/sendsms> from <127.0.0.1>
> >> 2009-10-20 22:08:12 [14601] [3] INFO: sendsms used by <playsms>
> >> 2009-10-20 22:08:12 [14601] [3] INFO: sendsms
> sender:<playsms:+687850850>
> >> (127.0.0.1) to:<+687850850> msg:<test - playSMS>
> >> 2009-10-20 22:08:12 [14601] [3] DEBUG: Status: 400 Answer: <DLR-URL
> field
> >> misformed, rejected>
> >> 2009-10-20 22:08:12 [14601] [3] DEBUG: HTTP: Destroying HTTPClient area
> >> 0x987e2d0.
> >> 2009-10-20 22:08:12 [14601] [3] DEBUG: HTTP: Destroying HTTPClient for
> >> `127.0.0.1'.
> >>
> >> If I comment the 3rd line about DLR it works, my SMS is sent.
> >>
> >> Do I have to configure something in Kannel.conf file about DLR ?
> >> Does anyone used PlaySMS v0.9.4 with kannel ?
> >>
> >> PlaySMS seems to be a great SMS web portal but there is still some
> little
> >> bugs and it is annoying...
> >>
> >> Regards,
> >>
> >> --
> >> Emmanuel
> >
> >
> >
> > --
> > Emmanuel
> >
> > CHANSON Emmanuel
> > Mobile Nouvelle-Calédonie: +687 850.850
> > Mobile France: +33 (0) 6.68.03.89.56
> > @email : [email protected]
> >
>



-- 
Emmanuel

CHANSON Emmanuel
Mobile Nouvelle-Calédonie: +687 850.850
Mobile France: +33 (0) 6.68.03.89.56
@email : [email protected]

Reply via email to