[OpenSIPS-Users] mi_datagram - what is the correct syntax?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Oct 14 16:35:20 CEST 2008


Hi Chris,

The syntax should be like:
<snip>
:which:

</snip>

see:
http://www.opensips.org/html/docs/modules/devel/mi_datagram.html#id2503209


Also try to enable to debug (debug=4) to get some info about the command 
processing

Regards,
Bogdan


Chris Maciejewski 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