[SR-Users] [SIREMIS] Multiple kamailio management commands

SamyGo govoiper at gmail.com
Thu May 10 10:40:45 CEST 2012


hi list,
So I finally made it to work. Just updating so anyone else can benefit from
my findings.

<?xml version="1.0" standalone="no"?><PluginService
Name="siremisMICommands" Package="asipto" Class="siremisMICommands">
	<MIConfig name="MIConfig" type="udp" mode="rich">
		<Local name="local" address="127.0.0.1" port="8044" timeout="3.0"/>
		<Remote name="remote" address="127.0.0.1" port="8033"/>
		<MICommands>
			<cmd name="ps" title="List Processes" command="ps"/>
			<cmd name="uptime" title="Show Uptime" command="uptime"/>
			<cmd name="getstatsall" title="Get All Statistics"
command="get_statistics all"/>
			<cmd name="which" title="Get All MI Commands" command="which"/>
		</MICommands>
	</MIConfig></PluginService>


the local tag here means that the siremis will open up a client socket on
this ip:port, and if its 127.0.0.1 then it can no way communicate with
anything other than localhost !!

so I changed this to :

<?xml version="1.0" standalone="no"?><PluginService
Name="siremisMICommands" Package="asipto" Class="siremisMICommands">
	<MIConfig name="MIConfig" type="udp" mode="rich">
		<Local name="local" address="192.168.2.169" port="8044" timeout="3.0"/>
		<Remote name="remote" address="192.168.2.156" port="8033"/>
		<MICommands>
			<cmd name="ps" title="List Processes" command="ps"/>
			<cmd name="uptime" title="Show Uptime" command="uptime"/>
			<cmd name="getstatsall" title="Get All Statistics"
command="get_statistics all"/>
			<cmd name="which" title="Get All MI Commands" command="which"/>
		</MICommands>
	</MIConfig></PluginService>


and everything worked better than ever. :)

Now I hope if I keep on adding multiple remote servers here , it still
continue working.

Regards,
Sammy

On Thu, May 10, 2012 at 1:19 PM, SamyGo <govoiper at gmail.com> wrote:

> ok guys,
> I did some tcpdumping as well but no luck- So I went to Siremis log
> directory and in ERR>log file I found this everytime I try to send a
> comamnd.
>
> ./log/ERR.log:14:'05/05/2012','18:44:21','ERR','ErrorHandler','socket_sendto()
> [<a href='function.socket-sendto'>function.socket-sendto</a>]: unable to
> write to socket [22]: Invalid argument',
>
> Any directions from here?
>
> Regards,
> Sammy
>
> On Thu, May 10, 2012 at 11:53 AM, SamyGo <govoiper at gmail.com> wrote:
>
>> hmmm..the only thing that I've missed , my favourite, tcpdump/wireshark.
>> Now I try that and come back here.
>>
>>
>> On Thu, May 10, 2012 at 11:41 AM, Reda Aouad <reda.aouad at gmail.com>wrote:
>>
>>> Well since siremis and kamailio configurations are straightforward, it's
>>> hard to troubleshoot without knowing what you already did, so I try to help
>>> starting with the basic things. No offense ;)
>>>
>>> Can you check no other process is listening on that port? Have you
>>> monitored using tcpdump or wireshark to see what's happening? Did you
>>> change the port number? Are you having any error log on the remote Kamailio?
>>>
>>> Reda
>>>
>>>
>>>
>>> On Thu, May 10, 2012 at 8:20 AM, SamyGo <govoiper at gmail.com> wrote:
>>>
>>>> Yes Reda, those are basic things, I can telnet to any other port on
>>>> that server - ping it but the only port which instantly drops my connection
>>>> is 8033 !! even if netstat shows its listening to it on all interfaces.
>>>>
>>>>
>>>> On Thu, May 10, 2012 at 11:17 AM, Reda Aouad <reda.aouad at gmail.com>wrote:
>>>>
>>>>> In that case it maybe a network or security problem.
>>>>> Can you ping the remote server? Have you checked your firewall
>>>>> settings on both servers?
>>>>>
>>>>> Reda
>>>>>
>>>>>
>>>>>
>>>>> On Thu, May 10, 2012 at 7:21 AM, SamyGo <govoiper at gmail.com> wrote:
>>>>>
>>>>>> Hello Reda,
>>>>>> I really appreciate that, yes I forgot to mention that I've already
>>>>>> done that.,
>>>>>> When I do "netstat -pln | grep kamailio"  I can see kamailio
>>>>>> listening on 0.0.0.0:8033 but still nothing happening :(
>>>>>>
>>>>>> Please let me know what else should I provide in order to resolve
>>>>>> this issue.
>>>>>>
>>>>>> Regards,
>>>>>> Sammy.
>>>>>>
>>>>>> On Wed, May 9, 2012 at 8:55 PM, Reda Aouad <reda.aouad at gmail.com>wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> The Kamailio server you wish to control remotely should have the
>>>>>>> mi_datagram module listening on the correct interface and not on the
>>>>>>> loopback one (127.0.0.1).
>>>>>>>
>>>>>>> loadmodule "mi_datagram.so"
>>>>>>> *modparam("mi_datagram", "socket_name", "udp:192.168.2.156:8033")*
>>>>>>>
>>>>>>>
>>>>>>> Reda
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, May 9, 2012 at 1:02 PM, SamyGo <govoiper at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello list,
>>>>>>>>
>>>>>>>>  I'm trying to have my Siremis interface send MI commands to
>>>>>>>> multiple kamailio servers i.e reload dispatcher of all the kamailio servers
>>>>>>>> when I reload from Siremis interface.
>>>>>>>>
>>>>>>>> The issue Im facing is that the commands dont get executed on any
>>>>>>>> other server except localhost/
>>>>>>>>
>>>>>>>> as mentioned in URL:
>>>>>>>> http://kb.asipto.com/siremis:install32x:mi-commands
>>>>>>>>
>>>>>>>> I've edited the <Remote name="remote" address="127.0.0.1" port=
>>>>>>>> "8033"/>
>>>>>>>>
>>>>>>>> to : <Remote name="remote" address="192.168.2.156" port="8033"/>
>>>>>>>>
>>>>>>>> Please guide on how to have multiple kamailio receive command from
>>>>>>>> single Siremis interface.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Sammy.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>>>>>>>> list
>>>>>>>> sr-users at lists.sip-router.org
>>>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>>>>>>> list
>>>>>>> sr-users at lists.sip-router.org
>>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>>>>>> list
>>>>>> sr-users at lists.sip-router.org
>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>>> sr-users at lists.sip-router.org
>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>> sr-users at lists.sip-router.org
>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120510/16a6a231/attachment-0001.htm>


More information about the sr-users mailing list