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

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Oct 15 09:51:56 CEST 2008


Hi Ovidiu,

Are you sure?

I made a test 5 minutes ago with opensipsctl from trunk:

$:~/work/opensips/sip_server/trunk/scripts$ ./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
nh_enable_ping
nh_enable_rtpp
nh_show_rtpp
t_uac_dlg
t_uac_cancel
t_hash
t_reply
trusted_reload
trusted_dump
address_reload
address_dump
subnet_dump
allow_uri
dlg_list
dlg_list_ctx
dlg_end_dlg
profile_get_size
profile_list_dlgs



I seams to work perfect to me.....


Regards,
Bogdan

Ovidiu Sas wrote:
> 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
>>
>>     
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list