thats work for invite nice, but not work fro cancel even this (very simple form) not change cancel
if (method == "BYE" || method == "CANCEL") { # xlog("bye\n");a xlog("L_INFO", "CANCEL - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); if(t_check_trans()){ xlog("triing to rewrite"); if ( subst('/192/aaa/ig') ) {}; t_relay(); exit; }else{ xlog("no trans"); exit; }
2009/3/4 alexander merkulov arheops@gmail.com
unfortanly it not work after location() known limitation: use non-rewrited message.
2009/3/4 Ovidiu Sas osas@voipembedded.com
Take a look at textops module:
http://www.kamailio.net/docs/modules/1.5.x/textops.html#id2467719
Regards, Ovidiu Sas
On Wed, Mar 4, 2009 at 4:20 PM, alexander merkulov arheops@gmail.com wrote:
here is correct reqwest and reqwest via kamailio
is there any way to rewrite To: field in kamailio because now it nto work
correct reqwest(asterisk) RECEIVING FROM: 69.70.173.195:5060 CANCEL sip:34249@193.110.78.12:8484 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.180:5060;branch=z9hG4bK4c97bd4a From: "Unknown" <sip:Unknown@voip1.bravotelecom.comsip%3AUnknown@voip1.bravotelecom.com ;tag=as366a0ba0 To: sip:34249@193.110.78.12:8484 Call-ID: 322db75c71be4ba45a61c7666b93e6be@voip1.bravotelecom.com CSeq: 102 CANCEL User-Agent: Asterisk PBX Max-Forwards: 70 Content-Length: 0
incorrect reqwest(multi-homed kamailio, asterisk originate to internal
eth)
RECEIVING FROM: 69.70.173.195:5060 CANCEL sip:34249@193.110.78.12:8484 SIP/2.0 Via: SIP/2.0/UDP 69.70.173.195;branch=z9hG4bK1b1b.3c42cea6.0 From: "Unknown" <sip:Unknown@69.70.173.195sip%3AUnknown@69.70.173.195 ;tag=as6075df60 Call-ID: 4d784fa972c4e9c9795032417f46cb26@voip1.bravotelecom.com To: <sip:34249@192.168.2.170 sip%3A34249@192.168.2.170> CSeq: 102 CANCEL Max-Forwards: 70 asterisk Content-Length: 0
-- Merkulov Alexander
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
-- Merkulov Alexander
El Miércoles, 4 de Marzo de 2009, alexander merkulov escribió:
thats work for invite nice, but not work fro cancel even this (very simple form) not change cancel
if (method == "BYE" || method == "CANCEL") {
# xlog("bye\n");a xlog("L_INFO", "CANCEL - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); if(t_check_trans()){ xlog("triing to rewrite"); if ( subst('/192/aaa/ig') ) {}; t_relay(); exit; }else{ xlog("no trans"); exit; }
CANCEL is hop-by-hop. This means that when a proxy receives a CANCEL it *doesn't* forward it. Instead it "eats" that CANCEL and *generates* a new one. This is how SIP defines the behaviour of a CANCEL.
But again I ask you, why do you need rewritting the To header? It shouldn't be required, neither in a CANCEL. In fact when a UAS receives a CANCEL it just should inspect the Via "branch" parameter to match it against a current INVITE server transaction.
Iñaki Baz Castillo wrote:
El Miércoles, 4 de Marzo de 2009, alexander merkulov escribió:
thats work for invite nice, but not work fro cancel even this (very simple form) not change cancel
if (method == "BYE" || method == "CANCEL") {
# xlog("bye\n");a xlog("L_INFO", "CANCEL - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); if(t_check_trans()){ xlog("triing to rewrite"); if ( subst('/192/aaa/ig') ) {}; t_relay(); exit; }else{ xlog("no trans"); exit; }
CANCEL is hop-by-hop. This means that when a proxy receives a CANCEL it *doesn't* forward it. Instead it "eats" that CANCEL and *generates* a new one. This is how SIP defines the behaviour of a CANCEL.
But again I ask you, why do you need rewritting the To header? It shouldn't be required, neither in a CANCEL. In fact when a UAS receives a CANCEL it just should inspect the Via "branch" parameter to match it against a current INVITE server transaction.
Looking at the change he is attempting to make, it appears that he is trying to force Kamailio to act more like an SBC doing NAT transversal through a B2BUA scenario, than a proxy.
Tim