Want to send PUBLSIH message to C during INVITE processing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Want to send PUBLSIH message to C during INVITE processing

This post has NOT been accepted by the mailing list yet.

I have 3 users registered as Alice, Bob and Adem.

Alice calls Bob.
Alice sends INVITE for Bob to Sailfin and Sailfin sends INVITE to Bob.

After INVITE to Bob is Sent, I want to send PUBLISH message to Adem to inform that there is call between Alice and Bob.

I am not sure how to get this done.

I am not able to get the contact of Adem also.

Can you please help me.

Code as Below-

    protected void doInvite(SipServletRequest request)
            throws ServletException, IOException {
        log("Received INVITE request SUNIL:\n" + request);
        if (request.isInitial()) {
            Proxy proxy = request.getProxy();

            // Get registration details and proxy the request to user's phone.
            SipApplicationSession sas =
            SipURI contactURI = (SipURI) sas.getAttribute(

            if (contactURI != null) {
                log("Proxied INVITE request to \n" + contactURI);
            } else {
                SipServletResponse resp = request.createResponse(404);
                String toUser = ((SipURI) request.getTo().getURI()).getUser();
                log("Unable to find contact URI for " + toUser +
                        ". Hence, responding with\n" + resp);

I want to send PUBLISH to Adem after                 proxy.proxyTo(contactURI);