greetings, I have a customer that is sending the REGISTER with 2 ports in the Contact header: Contact: sip:44435661000448181@201.xxx.xxx.xxx:19778:5060 After some troubleshooting we found that the wireless router is the one inserting the 2nd port. It is not the SIP UA itself. Is it possible to "sanitize" the REGISTER at the beginning of the configuration logic with the TEXTOPS module so that we can leave one port and then process the REGISTERwith the typical: if (!www_authorize("$fd", "subscriber")){...} Or will this only applies to messages that are proxied/forwarded (example: received malformed INVITE, before calling route[1] to send it to the destination sanitize it with the TEXTOPS functions)I guess my question is: after removing the extra port at the begining, when I call the "if (!www_authorize("$fd", "subscriber"))",will it process the modified version or the original one? txs a lot fborot
Hi,
Look at this function from the textopsx module http://kamailio.org/docs/modules/stable/modules/textopsx.html#msg_apply_chan...
Try to apply it after your sanitize and before you challenge the REGISTER.
Reda
On Thu, Apr 12, 2012 at 23:45, Fabian Borot fborot@hotmail.com wrote:
greetings,
I have a customer that is sending the REGISTER with 2 ports in the Contact header:
Contact: sip:44435661000448181@201.xxx.xxx.xxx:19778:5060
After some troubleshooting we found that the wireless router is the one inserting the 2nd port. It is not the SIP UA itself. Is it possible to "sanitize" the REGISTER at the beginning of the configuration logic with the TEXTOPS module so that we can leave one port and then process the REGISTER with the typical: if (!www_authorize("$fd", "subscriber")) {...}
Or will this only applies to messages that are proxied/forwarded (example: received malformed INVITE, before calling route[1] to send it to the destination sanitize it with the TEXTOPS functions) I guess my question is: after removing the extra port at the begining, when I call the "if (!www_authorize("$fd", "subscriber"))", will it process the modified version or the original one?
txs a lot
fborot
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
Txs a lot Reda, I will try it
Although I made a couple of test w/o it and so far it looks like the modified message is used on the next processing , not the original one but I will keep testing
From: fborot@hotmail.com To: users@lists.kamailio.org Subject: Question about processing of packet Date: Thu, 12 Apr 2012 17:45:44 -0400
greetings,
I have a customer that is sending the REGISTER with 2 ports in the Contact header:
Contact: sip:44435661000448181@201.xxx.xxx.xxx:19778:5060
After some troubleshooting we found that the wireless router is the one inserting the 2nd port. It is not the SIP UA itself. Is it possible to "sanitize" the REGISTER at the beginning of the configuration logic with the TEXTOPS module so that we can leave one port and then process the REGISTER with the typical: if (!www_authorize("$fd", "subscriber")) {...}
Or will this only applies to messages that are proxied/forwarded (example: received malformed INVITE, before calling route[1] to send it to the destination sanitize it with the TEXTOPS functions) I guess my question is: after removing the extra port at the begining, when I call the "if (!www_authorize("$fd", "subscriber"))", will it process the modified version or the original one?
txs a lot
fborot
Maybe there is special handling for Contact header, because IIRC, fix_nated_contact() before save() also works.
regards Klaus
On 13.04.2012 03:18, Fabian Borot wrote:
Txs a lot Reda, I will try it
Although I made a couple of test w/o it and so far it looks like the modified message is used on the next processing , not the original one but I will keep testing
From: fborot@hotmail.com To: users@lists.kamailio.org Subject: Question about processing of packet Date: Thu, 12 Apr 2012 17:45:44 -0400
greetings,
I have a customer that is sending the REGISTER with 2 ports in the Contact header:
Contact: sip:44435661000448181@201.xxx.xxx.xxx:19778:5060
After some troubleshooting we found that the wireless router is the one inserting the 2nd port. It is not the SIP UA itself. Is it possible to "sanitize" the REGISTER at the beginning of the configuration logic with the TEXTOPS module so that we can leave one port and then process the REGISTER with the typical: if (!www_authorize("$fd", "subscriber")) {...}
Or will this only applies to messages that are proxied/forwarded (example: received malformed INVITE, before calling route[1] to send it to the destination sanitize it with the TEXTOPS functions) I guess my question is: after removing the extra port at the begining, when I call the "if (!www_authorize("$fd", "subscriber"))", will it process the modified version or the original one?
txs a lot
fborot
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