[OpenSIPS-Users] mi_datagram - what is the correct syntax?
Ovidiu Sas
osas at voipembedded.com
Tue Oct 14 16:37:43 CEST 2008
Hello Chris,
The udp socket implementation is broken. See the following bug
(applies for both kamailio and opensips):
https://sourceforge.net/tracker/index.php?func=detail&aid=2158069&group_id=139143&atid=743020
Regards,
Ovidiu Sas
On Tue, Oct 14, 2008 at 10:02 AM, Chris Maciejewski <chris at wima.co.uk> wrote:
> Hi,
>
> I am trying to use mi_datagram with PHP "client". My code is:
>
> ---------------------------------
> $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
>
> $conn = socket_connect($socket, $config['address'], $config['port']);
>
> $packet = ":which:\n:\n:\n";
>
> socket_write($socket,$packet,strlen($packet));
> socket_write($socket, "\r\n", strlen("\r\n"));
> ------------------------------------
>
> when running the above, I can "see" with ngrep on the wire:
> -------------------------------------------
> #
> U <src_ip>:35728 -> <dst_ip>:5555
> :which:
> :
> :
>
> --------------------------------------------
>
> but in OpenSIPs log there is always:
> --------------------------------------------
> Oct 14 14:51:40 dev2 opensips[20536]:
> ERROR:mi_datagram:identify_command: command must begin with: :
> Oct 14 14:51:40 dev2 opensips[20536]:
> ERROR:mi_datagram:mi_datagram_server: command not available
> --------------------------------------------
>
> Any help would be very much appreciated.
>
> Regards,
> Chris
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list