Forums Read-only archive

accessing the sessionlist via curl? v2 vs v3?

7 posts · Brekeke SIP Server Forum

Megamuch Original post
1. Brekeke Product Name and Version:
v2.4 & v3.2
2. Java version:
7
3. OS type and the version:
windows 2008r2
4. UA (phone), gateway or other hardware/software involved:
n/a
5. Your problem:
I have 2 proxies running.

I monitor them by calling

http://IP address proxy 1:18080/proxy/cmd?cmd=sessionlist
for the v2 proxy. This gives me a nice csv output for parsing.

I'm trying to accomplish the same for the v3 version, but I cannot get it to work.

The v3 url should be:
http://IP address proxy 2:18080/sip/cmd?cmd=sessionlist but this page returns a 404 resource not found.

Any ideas on how to get this to work?

Is there some stuff I need to configure in v3 to provide access?
Megamuch
For some reason aafter a reset of the server, i am now able to access the page.

I changed the following setting:

configuration-> advanced
from
sipadmin.cmd.hosts.allow = ^192.168
to
sipadmin.cmd.hosts.allow = ^192.168.+


Now, when there are calls, there will be a valid output of csv data and all calls.

when there are no calls the out put is :

"
failed
Invalid Index
"
I can work around this, but it seems to me that the output of

http://ip:18080/sip/cmd?cmd=SessionList should be something else when there are no active sessions on the server.

any tips?
Laurie
> when there are no calls the out put is :
>
> failed
> Invalid Index

Yes. it is the message from the sessionlist command if there are no active sessions.
Let you accept it..
Megamuch
For some reason, I only get 20 sessions back when I access

http://192.168.0.202:18080/sip/cmd?cmd=sessionlist

This is on brekeke 3.3.4.4 advanced.

Is there some extra parameter to get all sessions?
Laurie
Megamuch
Thanks lauri, that worked!

How do you know which param to use? How can I find out? It is placed somewhere in some config file I need to check out or is it somewhere in the docs?
Laurie
I have the API document because my company is an oem partner of Brekeke.