Derrick,
If it's truly global variables you want, have you tried shared memory variables or htable?
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
On Apr 13, 2011, at 11:58 AM, "Derrick Ding" dding@aastra.com wrote:
Hi, Alex
I tried, it doesn't work. The real proxy is like a SIP-UA stateful entity. When A call B, then call C. it's different dialog. My aim is to let Kamailio send back 491 to A, if A&B is in sendrecv state and A send INVITE to C with sendrecv before A hold B.
I cannot keep the state of A&B when process A&C. And record-route doesn't work either. It only works in a dialog.
I hope Kamailio could add global variable for user to define and use.
Sincerely, Derrick
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Tuesday, April 12, 2011 2:00 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Is there any globle variable/flag mechanism inKamailio
On 04/12/2011 01:54 PM, Derrick Ding wrote:
I wonder if there's any other mechanism that I can use to record the state and can be used as flag.
That is because a stateful proxy is, by default, transaction-stateful. A "call" is a dialog, which consists of several transactions. Proxies are not, by default, dialog-stateful. It sounds like you're looking for
something that can persist throughout the lifetime of a dialog.
Fortunately, Kamailio does have a 'dialog' module that adds this functionality. The doc page for the module is here:
http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html
If you set a dialog to be tracked using the 'dialog' module, you can use
so-called dialog flags:
http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id29657 48
http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id29658 08
These will be valid for the life of a dialog.
Another option--which also has the effect of being dialog-persistent, but does not involve use of the dialog module--is to stow something in a
Record-Route header value, which I assume your proxy is adding:
http://www.kamailio.org/docs/modules/3.1.x/modules_k/rr.html#id2663290
http://www.kamailio.org/docs/modules/3.1.x/modules_k/rr.html#check-route -param-id
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
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
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