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

Richard Revels rrevels at bandwidth.com
Wed Oct 15 01:32:59 CEST 2008


I'll have to work with this a little to be sure but I'm thinking both  
unix sockets and domain socket works.  I am pretty sure this command  
would not function if domain socket was broken:

[root at zenguest1 ~]# opensipsctl unixsock which
get_statistics
reset_statistics
uptime
version
pwd
arg
which
ps
kill
debug
list_blacklists
ul_rm
ul_rm_contact
ul_dump
ul_flush
ul_add
ul_show_contact
t_uac_dlg
t_uac_cancel
t_hash
t_reply
trusted_reload
trusted_dump
address_reload
address_dump
subnet_dump
allow_uri
ds_set_state
ds_list
ds_reload
flat_rotate
dlg_list
dlg_list_ctx
dlg_end_dlg
profile_get_size
profile_list_dlgs
set_gflag
reset_gflag
is_gflag
get_gflags




On Oct 14, 2008, at 12:01 PM, Chris Maciejewski wrote:

> Hi Bogdan and Ovidiu ,
>
> Thanks for help.
>
> After changing my code to:
> ------------------------------------------
> $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
>
> $conn = socket_connect($socket, $config['address'], $config['port']);
>
> $packet = ":which:\n\n";
>
> socket_write($socket,$packet,strlen($packet));
> - Hide quoted text -
> $res = socket_read($socket,9064);
>
> print_r($res);
> -----------------------------------------
>
> I can see in logs:
> -----------------------------------------
> DBG:mi_datagram:mi_datagram_server: received :which:
> DBG:mi_datagram:mi_datagram_server: mi_buf is :which:   and we have
> received 9 bytes
> DBG:mi_datagram:identify_command: the command starts here: which:
> DBG:mi_datagram:identify_command: the command is which
> DBG:mi_datagram:identify_command: dtgram->len is 9
> DBG:mi_datagram:identify_command: dtgram->len is 1
> .....
> -----------------------------------------
>
> and finally
>
> -----------------------------------------
> .....
> DBG:mi_datagram:mi_datagram_write_node: writing the name <> and value
> <ds_reload>
> DBG:mi_datagram:mi_datagram_write_node: writing the name <> and value
> <refreshWatchers>
> DBG:mi_datagram:mi_datagram_write_node: writing the name <> and  
> value <dum>
> DBG:mi_datagram:mi_datagram_server: the response: 200 OK
> get_statistics reset_statistics uptime version pwd arg which ps kill
> debug list_blacklists domain_reload domain_dump t_uac_dlg t_uac_cancel
> t_hash t_reply ul_rm ul_rm_contact ul_dump ul_flush ul_add
> ul_show_contact set_gflag reset_gflag is_gflag get_gflags
> nh_enable_ping nh_enable_rtpp nh_show_rtpp ds_set_state ds_list
> ds_reload refreshWatchers dum  has been sent in 358 octets
> -----------------------------------------
>
> but no data is sent back by Opensip :-( so looks like indeed UDP
> implementation is broken as mentioned before by Ovidiu.
>
> Is there any chance this will be fixed any time soon?
>
> I will try looking into datagram_fnc.c on my own and fix this, but
> with my C skills it make take very loooong until we get it fixed :-(
>
> 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