[OpenSIPS-Users] opensips 2.2 generate NOTIFY with status=available

Jonathan Hunter hunterj91 at hotmail.com
Mon Oct 9 05:39:16 EDT 2017


Hi Răzvan,

Hope you are well? Thank you so much for the response.

Essentially we are testing opensips with a third-party receptionist console and I have configured presence.  Now it works perfectly when there are calls in progress, and handsets, in particular yealink, and bria soft-clients are on the phone.

The receptionist sends SUBSCRIBE, and opensips responds with this contained within the Message body;


Message Body
    eXtensible Markup Language
        <?xml
        <presence
            xmlns="urn:ietf:params:xml:ns:pidf"
            entity="sip:2002 at siproxy.co.uk">
            <tuple
                xmlns="urn:ietf:params:xml:ns:pidf"
                id="tuple_mixingid">
                <status>
                    <basic>
                        open
                        </basic>
                    </status>
                </tuple>
            <note
            <dm:person
                xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
                xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
                id="pers_mixingid">
                <rpid:activities>
                    <rpid:on-the-phone/>
                    </rpid:activities>
                <dm:note>
                    Proceeding
                    </dm:note>
                </dm:person>
            </presence>


Now my problem specifically is letting the console know when a user is online and available, as when it sends a subscribe, in this case to monitor extension 2002, which is registered, it gets back;

Message Body
    eXtensible Markup Language
        <?xml
        <presence
            xmlns="urn:ietf:params:xml:ns:pidf"
            entity="sip:2002 at siproxy.co.uk">
            <tuple
                xmlns="urn:ietf:params:xml:ns:pidf"
                id="tuple_mixingid">
                <status>
                    <basic>
                        closed
                        </basic>
                    </status>
                </tuple>
            </presence>


I would ideally like to send status=open and <dm:note>Available</dm:note> if a user is registered and available, is this possible or do I need to manipulate the body as you originally suggested?

As this will then let the console display the user as green and available! :)

Many thanks!

Jon



________________________________
From: Users <users-bounces at lists.opensips.org> on behalf of Răzvan Crainea <razvan at opensips.org>
Sent: 09 October 2017 09:18
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] opensips 2.2 generate NOTIFY with status=available

Hi, Jonathan!

A quick and blind answer is to catch the NOTIFY messages in local_route and change them as you want using regular expressions on the message body.

Perhaps I can offer a more elegant solution for this issue if you are a bit more explicit about what kind of events are you generating presence for, and when is this NOTIFY message sent?

Best regards,

Răzvan Crainea
OpenSIPS Developer
www.opensips-solutions.com<http://www.opensips-solutions.com>

Home — OpenSIPS Solutions<http://www.opensips-solutions.com/>
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.


On 10/05/2017 09:15 PM, Jonathan Hunter wrote:
Hi Guys,

I am using opensips 2.2 and the presence modules to generate PUBLISH and NOTIFY messages.

I can see with the NOTIFY message opensips is sending a status=closed, can I make it send a status=available if the extension is registered and ready for calls?

Many thanks

Jon


Session Initiation Protocol (NOTIFY)
    Request-Line: NOTIFY sip:SIPWATCHER:5063 SIP/2.0
    Message Header
    Message Body
        eXtensible Markup Language
            <?xml
            <presence
                xmlns="urn:ietf:params:xml:ns:pidf"
                entity="sip:2002 at SIPDOMAIN">
                <tuple
                    xmlns="urn:ietf:params:xml:ns:pidf"
                    id="tuple_mixingid">
                    <status>
                        <basic>
                            closed
                            </basic>
                        </status>
                    </tuple>
                </presence>





_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20171009/fd4ba7b6/attachment-0001.html>


More information about the Users mailing list