1
votes

I am developing a sip phone over iOS, using PJSIP on client side and opensips on server side. I am able to register into the server, and make calls between different users, but I need to get the registered contact list from the opensips server.

I am only using "pjsip", "pjlib" and "pjlib-util" frameworks because I handle the media with another frameworks.

According opensips guide, I need to use "Management Interface (MI)" to trigger some commands and get that list of registered users.

My issue is I don't know how to use Management Interface, fire those triggers, and retrieve the list. Or maybe there is another way to get the registered contact listo from opensips server.

I would appreciate any example of how to use opensips Management Interface from PJSIP, or from objective c code.

Thanks so much!

1

1 Answers

1
votes

You can find documentation on the opensips Management Interface here:

Overview

Core API

One option is to implement an XML-RPC client in your code. This will be outside of PJSIP, as it is a proprietary interface. The Overview link above shows example code in python, which I show here, lightly modified:

#!/usr/bin/python
import xmlrpclib
opensips = xmlrpclib.ServerProxy('http://127.0.0.1:8080/RPC2')
print opensips.subscribers_list()

You will need to find an XML-RPC library for Objective C, which I suspect won't be difficult.