accessing the sessionlist via curl? v2 vs v3?

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
Megamuch
Posts: 10
Joined: Mon Sep 06, 2010 10:53 am

accessing the sessionlist via curl? v2 vs v3?

Post by Megamuch »

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
Posts: 10
Joined: Mon Sep 06, 2010 10:53 am

it works, a little bit

Post by 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
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by 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
Posts: 10
Joined: Mon Sep 06, 2010 10:53 am

Max 20 sessions in session list

Post by 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
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Megamuch
Posts: 10
Joined: Mon Sep 06, 2010 10:53 am

Post by 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
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

I have the API document because my company is an oem partner of Brekeke.
Post Reply