[Freeswitch-users] ESL, phpmod
Helmut Kuper
helmut.kuper at ewetel.de
Fri Jun 11 18:31:51 PDT 2010
Hello,
when I type cast the socket var to integer and then do strace my php
script I got this when new ESL connection is created:
setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EBADF (Bad file descriptor)
sendto(6, "connect\n\n", 9, 0, NULL, 0) = -1 EBADF (Bad file descriptor)
There is no fatal error but the fd is somehow bad ...
So it seems to me the parameter for "new ESLconnection" must be a number
- but which?
I tested both, sockets created with socket_create as well as with fsockopen.
On 12.06.2010 02:12, Helmut Kuper wrote:
> Hello,
>
>
> I try to setup a php daemon which uses ESL.
>
> I run the sample php scripts successfully (inbound). Now I want to have
> it outbound to my php daemon socket.
>
> The forked child process which has to interact with incoming tcp
> connection from FS is started successfully. So in this state I have the
> client socket which I have to pass now somehow to ESLconnection I guess.
>
> FS ruby wiki gives this as an example:
>
> @con = ESL::ESLconnection.new(client_socket.fileno)
>
>
> In php I try this:
>
> $con = new ESLconnection($csock);
>
> As a result I got this error:
>
> PHP Fatal error: No matching function for overloaded
> 'new_ESLconnection' in /usr/share/pear/ESL.php on line 117
>
>
> Any ideas?
>
> regards
> Helmut
>
More information about the FreeSWITCH-users
mailing list