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:[email protected]">
            <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:[email protected]">
            <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 <[email protected]> on behalf of Răzvan Crainea 
<[email protected]>
Sent: 09 October 2017 09:18
To: [email protected]
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@SIPDOMAIN">
                <tuple
                    xmlns="urn:ietf:params:xml:ns:pidf"
                    id="tuple_mixingid">
                    <status>
                        <basic>
                            closed
                            </basic>
                        </status>
                    </tuple>
                </presence>





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


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to