[SR-Users] How to get call on an extension, which is registered when a call towards it reach kamailio. How to modify pending session parameters in kamailio?

Arun NV arunbalannv at gmail.com
Thu Nov 30 10:44:50 CET 2017


Hi,
I am using *Kamailio 4.4* as the proxy with my *Asteri**sk *server. I am
trying to develop a scenario where an extension gets registered on asterisk
via *Kamailio *when it receives a push notification. This push notification
is sent to the sip extension when a call towards this extension reaches to
the *Kamailio*.

For example, suppose there is two SIP extension(* extension 1 and extension
2*) registered on *Asterisk *via Kamailio. When a call from *extension 1*
reaches the asterisk, it forwards the *INVITE *request towards *extension 2*
via Kamailio.Kamailio will try to forward it to extension 2. suppose
the *extension
2* is not able to receive the *INVITE *request from *Kamailio*. When
extension two receive a push notification, it will register on asterisk.
So I need to get the call on *extension 2 *through the new registration.



We are trying to simulate registration of extension to the asterisk when
receiving the push notification.
First, we registered *extension 2 *and disconnected the network. Then we
tried to register the same extension when a call from *extension 1 *reaches
to Kamailio. This is a simulation of push-based registration since an
extension that receives the push will attempt to register when an incoming
call is received.

When asterisk sends *INVITE *request to Kamailio, it immediately responded
with *100 trying* provisional response. This *100* response by Kamailio
towards asterisk prevents asterisk from re-transmitting the INVITE.
Then Kamailio tried to send and retransmit the packet to *extension 2*,
which does not have network access. This* extension 2 *was on port number
*24071*. Even after successful registration(in port *59995*) of the *extension
2*, Kamailio continued to transmit the packets to the old port.


After that, we have configured Kamailio in a way that it won't send an
immeadeate provisional reply(*100 trying* ) for *INVITE *request.
Here Kamailio is not immediately sending *100 trying* message to *Asterisk*.
This forces Asterisk to re-transmit. Asterisk was found to retransmit the
same packets. However, even after the successful registration of* extension
2*, asterisk continued to send the old invite to Kamailio not the new one
to the latest port.

This is the problem for me since push relies on the *INVITE *reaching the
phone at the correct port number.

So, is there other good approaches to solve this issue?

One thing I would like to try is modifying the pending *INVITE *request
towards old registered port with the new port details when new registration
reaches to Kamailio. Can I get the ongoing requests from Kamailio?
Please suggest a viable solution.
Thank you,
Arunbalan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171130/04e823db/attachment.html>


More information about the sr-users mailing list