[SR-Users] Sending PUSH notification asynchronously

Mickael Marrache mickaelmarrache at gmail.com
Thu Mar 19 08:49:30 CET 2015


Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

        #Send PUSH notification using a custom module I wrote

 

        #Suspend transaction execution.

        t_on_failure("MANAGE_FAILURE");

        if(!t_suspend()) {

                send_reply("503", "Service Unavailable");

                exit;

        }

 

        $sht(push=>join::$rU) = "" + $T(id_index) + ":" + $T(id_label);

        exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150319/dabcd8f6/attachment.html>


More information about the sr-users mailing list