Hi, Tito!

Yes, the Dialog id is mandatory. You can find more info in Section 4.1.1 of RFC4235[1]. Now I am not sure what you are trying to do, but if you use the pua_dialoginfo module[2], OpenSIPS will be able to generate the Publish for each call.

[1] https://tools.ietf.org/html/rfc4235#section-4.1.1
[2] http://www.opensips.org/html/docs/modules/2.2.x/pua_dialoginfo.html

Best regards.

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

On 12/23/2016 11:36 PM, Tito Cumpen wrote:
The closest thing that resembles the sort of body I need is using
dialog_info but even that is lacking because it supposed to be used for
the user you are subscribed to. Can you tell me if the dialog id is
necessary during publish? I tried
reading https://tools.ietf.org/html/rfc4235
<https://tools.ietf.org/html/rfc4235> but cannot find information of
where it is sourced from.

On Tue, Dec 20, 2016 at 7:25 AM, Tito Cumpen <t...@xsvoce.com
<mailto:t...@xsvoce.com>> wrote:

    Thanks for your reply Razvan,


    I tried using the conference event with  application/xml+conf but
    opensips is replying with these errors:

    : ERROR:presence:handle_subscribe: unrecognized value [conference]
    in Event header

    : INFO:presence:handle_subscribe: Missing or unsupported event
    header field value


    ERROR:presence:handle_publish: unrecognized value [conference] in
    Event header

    ERROR:presence:handle_publish: Missing or unsupported event header
    field value

     ERROR:presence:handle_publish: #011event=[conference]



    When I used the presence events with application/pidf+xml  notifies
    worked but they only carried limited information


    <?xml version=\"1.0\"?>\n<presence
    xmlns=\"urn:ietf:params:xml:ns:pidf\"
    entity=\"sip:sjoi...@domain.org <mailto:sip%3asjoi...@domain.org>\"/>\n


    reduced from :

    <?xml version="1.0" encoding="utf-8" ?>.
    <conference-info xmlns="urn:ietf:params:xml:ns:conference-info"
    entity="sips:sjoi4y6"state="full" version="1">.
    <users><endpoint entity="99999999">.
    <status>connected</status>.
    </endpoint>.
    </users>.
    </conference-info>.


    which means that the body was dismissed and the entity was taken
    from the ruri?

    any idea how to relay this body? or modify it to carry my users tag
    with state and endpoint enitity?

    Thanks,
    Tito

    On Tue, Dec 20, 2016 at 2:49 AM, Răzvan Crainea <raz...@opensips.org
    <mailto:raz...@opensips.org>> wrote:

        Hi, Tito!

        The Content-Type indicates how to read and parse the Message
        body. This is a mandatory header, and without it the client
        can't know how to interpret the body.
        The Event header is used by opensips (and clients) to figure out
        the event that happened.
        The idea is that the clients will subscribe for a particular
        event (presence, or conference in your case) and when that event
        happens, OpenSIPS will send notifies only to those clients
        registered for that event.

        Best regards,

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

        On 12/20/2016 11:37 AM, Tito Cumpen wrote:
        Razvan,


        Thanks for pointing that out. Will my subscribers get this xml
        via notify regardless of the content type? say :

        application/xml+conf"

        or

        application/pidf+xml

        does the application header or Event:presence header mean
        anything to opensips?


        On Tue, Dec 20, 2016 at 12:04 AM, Răzvan Crainea
        <raz...@opensips.org <mailto:raz...@opensips.org>> wrote:

            Hi, Tito!

            I ran your example in an XML validator, and I noticed that
            your XML has an "error on line 2 at column 86: attributes
            construct error"[1]. If you add a space before the "state"
            attribute, the XML gets parsed properly[2].

            [1]
            
http://www.utilities-online.info/xmltojson/?save=5a6721b1-55f9-46c2-8bda-cf21e15e38b3-xmltojson
            
<http://www.utilities-online.info/xmltojson/?save=5a6721b1-55f9-46c2-8bda-cf21e15e38b3-xmltojson>
            [2]
            
http://www.utilities-online.info/xmltojson/?save=320f586b-c2eb-4e73-b564-3f73f0120662-xmltojson
            
<http://www.utilities-online.info/xmltojson/?save=320f586b-c2eb-4e73-b564-3f73f0120662-xmltojson>

            Best regards,

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

            On 12/20/2016 01:38 AM, Tito Cumpen wrote:
            I want to implement something similar to

            https://tools.ietf.org/html/rfc4579
            <https://tools.ietf.org/html/rfc4579>

            On Mon, Dec 19, 2016 at 1:58 PM, Tito Cumpen
            <t...@xsvoce.com <mailto:t...@xsvoce.com>> wrote:

                Group or Devs,

                Is there any way to allow custom bodies during a
                presence publish?

                I am trying to implement presence notifies for a
                conferencing scenario to allow participants of a
                conference to subscribe to the conference events. The
                events will send information about who connected to
                and disconnected with the intention of syncing the
                UI. I am trying to publish the following:

                PUBLISH sip:ap5b...@blah.org
                <mailto:sip%3aap5b...@blah.org> SIP/2.0.
                Call-ID: 861f3c86868d8a4b00276064d1205e0a@x.x.x.x.x.x
                <mailto:0a@x.x.x.x.x.x>.
                CSeq: 2 PUBLISH.
                From: "Dave Drummond" <sip:ddrummondah...@blah.org
                
<mailto:sip%3addrummondah...@blah.org>>;tag=62944280_a75dd11f_3a41c2f1_a8e175ca.
                To: <sip:ap5b...@nurseliveconnect.org
                <mailto:sip%3aap5b...@nurseliveconnect.org>>.
                Max-Forwards: 70.
                User-Agent: Mobicents Sip Servlets 3.0.0-SNAPSHOT.
                Event: presence.
                Via: SIP/2.0/TCP
                
192.237.207.220:5080;branch=z9hG4bKa8e175ca_3a41c2f1_7d6e0f5b-7595-4432-849e-500f6d4fe940.
                Content-Type: application/pidf+xml.
                Proxy-Authorization: Digest
                username="ddrummond.b...@blah.org
                <mailto:ddrummond.b...@blah.org>",realm="blah.org
                
<http://blah.org>",nonce="585857390000212cd09ec487455386e318963e82d972f333",uri="sip:ap5b...@blah.org
                
<mailto:sip%3aap5b...@blah.org>",response="670c0336b89491900c284014c12b62ac".
                Content-Length: 263.
                .
                <?xml version="1.0" encoding="utf-8" ?>.
                <conference-info
                xmlns="urn:ietf:params:xml:ns:conference-info"
                entity="sips:ap5badj"state="full" version="1">.
                <users><endpoint entity="99999999">.
                <status>connected</status>.
                </endpoint>.
                </users>.
                </conference-info>.


                but I get a 415 unsupported media type

                Dec 19 21:53:15 cloud-server-06
                /sbin/opensips[31135]:
                ERROR:presence_xml:xml_publ_handl: bad body format
                Dec 19 21:53:15 cloud-server-06
                /sbin/opensips[31135]: ERROR:presence:handle_publish:
                in event specific publish handling


                Can someone tell me how I can modify the body to make
                this work?


                Thanks,
                Tito




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

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

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





_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to