Hi all,
I would like to share some experience with uac_replace_from(). Please anybody correct me if I made any mistake.
I have done tons of test with openser 1.2.3 and 1.3.1 and finally found the trend as follows:
In 1.2.3 the Header Field From in CANCEL will be the one received from UAC, no matter what you have done with INVITE, it will remember the From: prior to all the changes. Parameter from_restore_mode doesn't apply to this. So you have to write something like if(method=="CANCEL") uac_replace_from("sometext").
However, in 1.3.1. If you set modparam("uac", "from_restore_mode", "auto"). TM is smart enough to change From: in CANCEL for you to match the one in INVITE, even modified by Openser. But the problem in 1.3.1 is if you set from_restore_mode to none, no matter how you write uac_replace_from() to your CANCEL request, nothing will happen. Actually this means in Openser 1.3.1, no matter what you do with uac_replace_from() to CANCEL, nothing will happen, depends on the module param it will be either original message or modified message in INVITE. But you can hardly do anything to CANCEL manually.
Bogdan, this is the behavior you intend to?
Best Regards, Bai Shi
Hi Bai,
Bai Shi wrote:
Hi all,
I would like to share some experience with uac_replace_from(). Please anybody correct me if I made any mistake.
I have done tons of test with openser 1.2.3 and 1.3.1 and finally found the trend as follows:
In 1.2.3 the Header Field From in CANCEL will be the one received from UAC, no matter what you have done with INVITE, it will remember the From: prior to all the changes. Parameter from_restore_mode doesn't apply to this. So you have to write something like if(method=="CANCEL") uac_replace_from("sometext").
Yes, this was a known limitation in 1.2.x - you had to manually do the same change on CANCEL as for INVITE
However, in 1.3.1. If you set modparam("uac", "from_restore_mode", "auto"). TM is smart enough to change From: in CANCEL for you to match the one in INVITE, even modified by Openser. But the problem in 1.3.1 is if you set from_restore_mode to none, no matter how you write uac_replace_from() to your CANCEL request, nothing will happen. Actually this means in Openser 1.3.1, no matter what you do with uac_replace_from() to CANCEL, nothing will happen, depends on the module param it will be either original message or modified message in INVITE. But you can hardly do anything to CANCEL manually.
As Andreas said, if NO RESTORE mode is used, none of the following messages will be changed.
Also, as mentioned by Andreas, CANCEL needs to be changed in the same way as the INVITE, so, in 1.3.x you cannot do any manual change on CANCEL - it will inherit whatever change you did on INVITE.
Regards, Bogdan
Bogdan, this is the behavior you intend to?
Best Regards, Bai Shi
Hi Bogdan, Thanks for explaining :) Rgds, Bai Shi
-----Original Message----- From: Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro] Sent: 2008年3月26日 21:54 To: Bai Shi Cc: openser users; Andreas Granig Subject: Re: UAC_REPLACE_FROM()
Hi Bai,
Bai Shi wrote:
Hi all,
I would like to share some experience with uac_replace_from(). Please anybody correct me if I made any mistake.
I have done tons of test with openser 1.2.3 and 1.3.1 and finally found the trend as follows:
In 1.2.3 the Header Field From in CANCEL will be the one received from UAC, no matter what you have done with INVITE, it will remember the From: prior to all the changes. Parameter from_restore_mode doesn't apply to this. So you have to write something like if(method=="CANCEL") uac_replace_from("sometext").
Yes, this was a known limitation in 1.2.x - you had to manually do the same change on CANCEL as for INVITE
However, in 1.3.1. If you set modparam("uac", "from_restore_mode", "auto"). TM is smart enough to change From: in CANCEL for you to match the one in INVITE, even modified by Openser. But the problem in 1.3.1 is if you set from_restore_mode to none, no matter how you write uac_replace_from() to your CANCEL request, nothing will happen. Actually this means in Openser 1.3.1, no matter what you do with uac_replace_from() to CANCEL, nothing will happen, depends on the module param it will be either original message or modified message in INVITE. But you can hardly do anything to CANCEL manually.
As Andreas said, if NO RESTORE mode is used, none of the following messages will be changed.
Also, as mentioned by Andreas, CANCEL needs to be changed in the same way as the INVITE, so, in 1.3.x you cannot do any manual change on CANCEL - it will inherit whatever change you did on INVITE.
Regards, Bogdan
Bogdan, this is the behavior you intend to?
Best Regards, Bai Shi