Is it possible to configure sip-router to keep a transaction for an incoming message (f.e. an INVITE) without sending a response and without forwarding it, and then reference and complete it in the future?
Using pseudocode this is the logic I would like to implement:
//When receiving an INVITE leave it pending if (request is INVITE) { store transactionID // This transactionID will be send somehow to the client return }
//When receiving a PUBLISH referencing a pending transaction complete the forwarding if (request is PUBLISH) { transactionId = header("X-TransactionId") destination = header("X-Destination") transactions [transactionID]. forward(destination) }
Thank you very much, G.
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo. This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at. http://www.tid.es/ES/PAGINAS/disclaimer.aspx
There is no support for this. Kamailio in its proxy role (the role you are invoking) is pretty much event-driven, in the sense that it's processing is real-time and correlated to the receipt of messages to be forwarded. It is externally stimulated into action.
Also, it would be quite problematic from the perspective of SIP protocol mechanics. If you do not even send 100 Trying, the sending UAC will retransmit the INVITE, and/or eventually assume your proxy is down. If you do send 100 Trying but do not follow up, other timers awaiting final positive or negative replies kick in and also expire.
On Monday 20 June 2011, Gustavo Garcia Bernardo wrote:
Is it possible to configure sip-router to keep a transaction for an incoming message (f.e. an INVITE) without sending a response and without forwarding it, and then reference and complete it in the future?
Using pseudocode this is the logic I would like to implement: [..]
Hi Gustavo,
as Alex already wrote, its probably not the best or correct thing to do - but have you already looked to the tm module? It provides some asynchronous support. From the module README:
"[t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing."
Maybe this is helpful,
Henning
Hi Henning,
On 06/20/2011 05:06 AM, Henning Westerholt wrote:
"[t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing."
These are just exported API functions though, right? Not something that can be called from script?
Thanks,
On Monday 20 June 2011, Alex Balashov wrote:
"[t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing."
These are just exported API functions though, right? Not something that can be called from script?
Hi Alex,
yes, they are in the available in the public tm API:
int t_suspend(struct sip_msg *msg, unsigned int *hash_index, unsigned int *label)
int t_continue(unsigned int hash_index, unsigned int label, struct action *route)
Best regards,
Henning
Thank you, that is the functionality we needed but we were looking for something to be accessible from the script. Perhaps we can build a module to export those APIs to the script, we will try it.
Best regards, G.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Henning Westerholt Sent: lunes, 20 de junio de 2011 11:40 To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Keeping transactions in standby till future events
On Monday 20 June 2011, Alex Balashov wrote:
"[t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing."
These are just exported API functions though, right? Not something that can be called from script?
Hi Alex,
yes, they are in the available in the public tm API:
int t_suspend(struct sip_msg *msg, unsigned int *hash_index, unsigned int *label)
int t_continue(unsigned int hash_index, unsigned int label, struct action *route)
Best regards,
Henning
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo. This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at. http://www.tid.es/ES/PAGINAS/disclaimer.aspx
2011/6/20 Henning Westerholt henning.westerholt@1und1.de:
as Alex already wrote, its probably not the best or correct thing to do - but have you already looked to the tm module? It provides some asynchronous support. From the module README:
"[t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing."
Hi Henning, which would be the difference if the script does t_newtran(), then reply 100 trying (of before) and then exit()?
2011/6/20 Iñaki Baz Castillo ibc@aliax.net:
"[t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing."
Hi Henning, which would be the difference if the script does t_newtran(), then reply 100 trying (of before) and then exit()?
Auto reply: I think it would just generate a "ready-to-expire" server transaction.