Re: Can PJSIP help with this requirement?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 18.08.21 13:35, Antony Stone wrote:

I have a very basic SIP client application, which can make and receive phone
calls, and that's about it.  Regard it as a pretty dumb softphone.
Unfortunately I cannot change it for a smarter one.

This client is talking to a completely capable SIP server (PBX) which can do
all the standard PBX stuff like putting calls on hold, transferring them,
conferencing, etc.

The problem is that the simple SIP client cannot itself tell the server to do
any of these things - it can send an INVITE to place a call, and it can
REGISTER and then accept an INVITE to receive a call, but it doesn't know how
to send any other commands to the server to "manage" calls once they're in
progress.  The simplest example is putting a call on hold and then resuming it

I'm looking for something which I can place in the network path between the
client and the server, which can send these call control commands on to the
server, so that it can then put calls on hold, transfer them, etc.

I'm assuming this "thing" needs to sit in the network path, so that it sees
the INVITEs and OKs and is then aware of the Call-IDs and sequence numbers,
etc, and can therefore present the correct call reference to the SIP server
when it wants to say "please put this one on hold".  I have full access to the
SIP credentials used to authenticate the client to the server.

I had thought that Kamailio might be what I was looking for, but I've asked on
their mailing list and people are telling me that it isn't, and have suggested
PJSIP as a potential solution.

Is that possible?  Could I somehow use PJSIP to generate and send commands to
a SIP server in order to control calls which have been placed either from or
to this simple SIP client softphone application?

If anyone thinks there is another, perhaps better, way of achieving this, then
I'm quite open to alternative solutions (as I say, I was initially thinking
that Kamailio might be the way forward), so anything that shows me how such
a thing might be achieved, with any tool at all, would be very welcome.



If I understand correctly, you want to be able to (un-)hold and transfer calls. If you want to hold/transfer "your" calls, you can do so already (like any other SIP phone).

For holding/unholding calls, see the functions pjsua_call_set_hold()/pjsua_call_set_hold2() here:

For transferring calls, you can initiate a transfer via REFER using i.e. pjsua_call_xfer():

If you want to manage all kinds of calls on your PBX, then this is outside the scope of the SIP protocol and you need to check with the PBX developers. In my experience, they usually offer some kind of "management" interface/protocol which you can use to control the PBX. For an Asterisk PBX, this would be the AMI and ARI interfaces.

Hope this helps,
Visit our blog:

pjsip mailing list -- pjsip@xxxxxxxxxxxxxxx
To unsubscribe send an email to pjsip-leave@xxxxxxxxxxxxxxx

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux