Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
accessing the sessionlist via curl? v2 vs v3?
Author Message
Megamuch
Brekeke Member


Joined: 06 Sep 2010
Posts: 10

PostPosted: Wed Jan 15, 2014 7:39 am    Post subject: accessing the sessionlist via curl? v2 vs v3? Reply with quote

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?
Back to top
View user's profile
Megamuch
Brekeke Member


Joined: 06 Sep 2010
Posts: 10

PostPosted: Wed Jan 15, 2014 7:50 am    Post subject: it works, a little bit Reply with quote

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?
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 243

PostPosted: Wed Jan 15, 2014 1:11 pm    Post subject: Reply with quote

> 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..
Back to top
View user's profile
Megamuch
Brekeke Member


Joined: 06 Sep 2010
Posts: 10

PostPosted: Tue Jun 03, 2014 1:27 am    Post subject: Max 20 sessions in session list Reply with quote

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?
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 243

PostPosted: Tue Jun 03, 2014 6:14 pm    Post subject: Reply with quote

Try this

http://192.168.0.202:18080/sip/cmd?cmd=sessionlist&param=-a

-a means all.
Back to top
View user's profile
Megamuch
Brekeke Member


Joined: 06 Sep 2010
Posts: 10

PostPosted: Wed Jun 04, 2014 5:51 am    Post subject: Reply with quote

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?
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 243

PostPosted: Wed Jun 04, 2014 8:58 am    Post subject: Reply with quote

I have the API document because my company is an oem partner of Brekeke.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1