THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#263 - decode_contact() fails on certain legitimate request URIs
User who did this - Richard Brady (rnbrady)
----------
Patch to remove check for < and ;.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=263#comment762
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Richard Brady (rnbrady)
Attached to Project - sip-router
Summary - decode_contact() fails on certain legitimate request URIs
Task Type - Bug Report
Category - Modules kamailio
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - Low
Priority - Normal
Reported Version - 3.3
Due in Version - Undecided
Due Date - Undecided
Details - Decode contact() fails decode_contact() fails on certain legitimate request URIs, such as:
sip:natted_ua*alice;day=tuesday**192.168.242.102*5060*udp@1.2.3.4
This is due to the semicolon in the userinfo part of the URI. The problem code is in the decode2format function in siputils/contact_ops.c:
if (((*pos) == '>')||(*pos == ';'))
{
/* invalid chars inside username part */
return -5;
}
The ABNF in RFC3261 makes it clear that a semicolon is ok in the user-info field:
userinfo = ( user / telephone-subscriber ) [ ":" password ] "@"
user = 1*( unreserved / escaped / user-unreserved )
user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
The code might be to check for the end of a URI (both those characters terminate a URI under certain circumstances), perhaps for fault tolerance and/or security but I don't think it's been done in a way that makes sense, for the following reasons:
1. An angle bracket is not legal in or surrounding a request URI, so it should be picked up by the parser and/or sanity check.
2. A semicolon is totally legal in the userinfo part, as per ABNF above and also as explained in RFC3261:
...
sip:alice;day=tuesday@atlanta.com
The last sample URI above has a user field value of
"alice;day=tuesday". The escaping rules defined above allow a
semicolon to appear unescaped in this field. For the purposes of
this protocol, the field is opaque. The structure of that value is
only useful to the SIP element responsible for the resource.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=263
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Hello,
I have merged the Edge Proxy support into git master. I'd appreciate it
if anyone who has a client that supports outbound (and a registrar that
supports it) as I have been travelling the last couple of weeks while I've
been working on this and have had access to neither.
I thought it would also be worth summarising what I know is still required
for full outbound support on Kamailio. I hope to have time to do some of
this (items 1 and 2 specifically) during the week, but it will be my first
week back in the office and I am travelling again the week after. If I
have time I will do some of these - but if there is anyone else who sees
these as particularly important and wants to pick them up I'd be grateful:
1) registrar module support for RFC 5626 section 6:
When receiving a REGISTER request, the registrar MUST check from its
Via header field if the registrar is the first hop or not. If the
registrar is not the first hop, it MUST examine the Path header of
the request. If the Path header field is missing or it exists but
the first URI does not have an "ob" URI parameter, then outbound
processing MUST NOT be applied to the registration. In this case,
the following processing applies: if the REGISTER request contains
the reg-id and the outbound option tag in a Supported header field,
then the registrar MUST respond to the REGISTER request with a 439
(First Hop Lacks Outbound Support) response; otherwise, the registrar
MUST ignore the "reg-id" parameter of the Contact header.
2) registrar modparam that specifies whether outbound is supported,
required, or neither.
Behaviour when neither:
* As now
Behaviour when supported:
* Add Supported: header with outbound options-tag to the 200 OK
Behaviour when required:
* Reject (with 421 Extension Required) REGISTER requests without the
outbound options-tag in a Supported: or Require: header
* Add Supported: and Require: headers with outbound options-tag to the
200 OK
3) Single server (combined edge proxy and registrar) behaviour
4) Testing along side registrar and usrloc module changes for multiple
registrations from a single UA.
Note: There shouldn't be any conflict here as the edge and registrar
changes should be independent of each other. However, I have no idea
how to configure and use the new registrar and usrloc features.
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0b108c8…
Merge: 9f63684 94e9bd8
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Jan 6 19:37:22 2013 +0000
Merge branch 'master' into outbound
* master:
pkg/kamailio/(centos|fedora): Updated ver and rel in .spec
sl: fix compilation warnings in sl_forward_reply()
dialog: fixed ka_timer linking
core: command line option -v replaced with -K
msrp: new parameter use_path_addr
msrp: added rpc command to list active connections
msrp: added internal map table to track msrp connections
pipelimit: implemented support for RPC commands
Makefile.defs: major version base updated to 4.0.0
sl: new function sl_forward_reply(...)
core: added function to remove an exiting lump structure from internal list
dialog2: generate and add missing README for dialog2 module
Do not bind with libser_cmd, this is not required.
Added Debian-Packaging for IMS modules
- Add group for IMS modules - Added convenience rule to build packages for current debian-stable
ims modules: don't link with -lrt on macosx
auth_ims: don't link with -lrt on darwin os
kamailio.cfg: xhttp left only in kamailio-oob.cfg
modules/rtpproxy: rtpproxy_manage can now add ice relay candidates
parser/sdp: fixed freeing of ice attributes
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9f63684…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Jan 6 19:32:45 2013 +0000
modules_k/outbound: Updates to outbound module documentation
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=539e606…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Jan 6 19:32:29 2013 +0000
modules_k/outbound: Fixes to outbound code arising from testing
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b0ee720…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Jan 6 19:32:04 2013 +0000
modules_k/rr: Updates to rr module documentation for outbound
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a9d425f…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Jan 6 19:31:41 2013 +0000
modules_k/rr: Fixes to loose.c from outbound testing
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a117147…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Jan 1 20:46:18 2013 +0000
modules_k/outbound: updated example
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0a528b2…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Jan 1 20:45:49 2013 +0000
modules_k/rr: outbound fixes
- Use the OUTBOUND address in RR when using outbound
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b5c3a9…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Jan 1 20:45:24 2013 +0000
modules_k/outbound: fixes to use_outbound()
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e2d144b…
Merge: 4a41827 ddfbbd7
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 17:12:01 2012 +0000
Merge branch 'master' into outbound
* master:
parser/sdp: added check on body length when looking for 'a=candidate:'
parser/sdp: added 'a:remote-candidates' media stream attribute
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4a41827…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 17:11:30 2012 +0000
modules_k/outbound: first draft of outbound module documentation
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=72d8e45…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 17:11:14 2012 +0000
modules_k/outbound: Corrected check on flow_token_key length
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5214a6e…
Merge: e00d77f 945b1fd
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 16:08:59 2012 +0000
Merge branch 'master' into outbound
* master:
pkg/kamailio/(centos|fedora): Added IMS modules to RPM builds
parser/sdp: added partial parsing of a=candidate attributes
modules/sipcapture README: added HEPv2/v3 to supported protocols
modules:siptrace changed include to hep.h
Added HEPv3 (UDP) support for sipcapture.
modules/registrar_pcscf: firs commit of registrar_pcscf module - registrar for P-CSCF functionality
modules/registrar_scscf: first commit of registrar_scscf - Registrar functionality for S-CSCF servers
modules/isc: first commit of ISC module (IMS Service Control)
modules/usrloc_scscf: first commit of usrloc_scscf modules - usrloc functionality for S-CSCF servers
modules/usrloc_pcscf: first commit of usrloc_pcscf module
modules/auth_ims: first commit of auth_ims module - This module provides IMS specific authentication/authorisation functionality.
modules/icscf: added I-CSCF module.
modules/dialog2: first version of dialog2
lib/ims: added some info to README on IMS library
IMS Internal Lib: added internal kamailio library for IMS extensions
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e00d77f…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 15:36:00 2012 +0000
modules_k/outbound: filled in use_outbound() function
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=488bf3c…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 15:35:32 2012 +0000
core: added parsing of ;ob for URIs and Contact: headers
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d9394d…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 13:44:19 2012 +0000
modules_k/rr: handle outbound failing and outbound just not being used as separate cases
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dccab57…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 13:43:15 2012 +0000
modules_k/outbound: decode_flow_token() returns different values when an error occurs and when the string obviously isn't a flow-token
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a0a23aa…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 13:28:06 2012 +0000
modules_k/rr: updated documentation for outbound support
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7d6d7f1…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 13:25:36 2012 +0000
modules_k/rr: fixed typos in diagnostics and comments
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a0dd2a7…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 13:25:01 2012 +0000
modules_k/path: fixed a typo in a diagnostic message
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6141b16…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 12:55:06 2012 +0000
modules_k/rr: tidied up error handling and comments relating to outbound
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5ceef3c…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Dec 31 12:54:37 2012 +0000
modules_k/outbound: tightened up error handling in decode_flow_token()
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d274ee3…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Dec 30 19:31:24 2012 +0000
modules_k/rr: Fixed return from process_outbound()
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4bbd871…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Dec 30 19:27:24 2012 +0000
modules_k/rr: added decoding and using of flow token to loose_route()
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5e844cf…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Dec 30 18:31:07 2012 +0000
modules_k/outbound: changed some errors to info
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=acc9e5a…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Dec 30 17:56:55 2012 +0000
modules_k/rr: add flow token to Record-Route: headers when needed
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d55cce8…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Dec 30 17:40:08 2012 +0000
modules_k/rr: do not double RR when outbound is in use for a request
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7c79ef5…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Dec 30 17:20:52 2012 +0000
modules_k/rr: bind rr to outbound module
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=724847a…
Merge: 3efe73d 3d2c78d
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Dec 30 17:08:43 2012 +0000
Merge branch 'master' into outbound
* master:
uid_gflags: default table for global attrs prefixed with uid_
libsrdb1/kamctl: added uid_global_attrs table
libsrdb1/kamctl: added uid_domain and uid_domain_attrs tables
srdb1/kamctl: added uid_uri and uid_uri_attrs tables
uid_avp_db: default table name prefixed with uid_
srdb1/kamctl: added definition of table uid_user_attrs
libsrdb1/kamctl: added definition of uid_credentials table
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3efe73d…
Merge: 8f0ab91 8c512a5
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sat Dec 29 01:22:27 2012 +0000
Merge branch 'master' into outbound
* master:
modules_s/usrloc: moved to obsolete folder
modules_s/registrar: moved to obsolete folder
modules_s/.gitkeep: added a placeholder to keep empty modules_s folder for a while
Makefile: make TAGS skips the obsolete folder
usrloc(k): fixed position of xavp_contact parameter in docs
usrloc: store per-contact attributes in database
core: fixed xavp level cloning function
core: added a fuction that adds an xavp with an xavp value
kamctl: regenerated database creation scripts
lib/srdb1: added location_attrs table
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8f0ab91…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Dec 28 08:03:50 2012 +0000
modules_k/path: only add ";ob" parameter when it is the the first hop
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7fce787…
Merge: 11b7630 b2e5040
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Dec 26 14:25:44 2012 +0000
Merge branch 'master' into outbound
* master:
core: check for IP in no_naptr_srv_sip_resolvehost()
core: try all srv protocols when not already set
registrar(k): restore the location contact xavp upon lookup
usrloc(k): option to store xavp per contact
core: extended xavp api
registrar(k): use only pre-existing branches in lookup_branches()
p_usrloc: clean memory in case of malloc error
Revert "Changing to kamcmd"
kamcmd changes
Changing to kamcmd
kamcmd Updating docs
Change "sercmd" to "kamcmd" in module documentation files - README
kamctl Fix typo that causes the "trusted" help to be printed twice and "address" zero times
kamctl Change "sercmd" to "kamcmd" in help texts
Fixing compiler warnings
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=11b7630…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Dec 26 14:24:58 2012 +0000
modules_k/path: Updated module documentation for outbound
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b27311b…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Dec 26 14:15:48 2012 +0000
modules_k/path: Added outbound support to add_path()
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a1501f0…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Dec 26 14:15:18 2012 +0000
modules_k/outbound: Added some includes to api.h
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b6b3acf…
Merge: 0c3d25f 9b2cb40
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sat Dec 22 17:03:25 2012 +0000
Merge branch 'master' into outbound
* master:
modules_s/permissions: moved to obsolete folder
modules_s/textops: moved to obsolete folder
textopsx: added functions that operate on header value
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c3d25f…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sat Dec 22 17:02:01 2012 +0000
modules_k/outbound: Improved flow token encode/decode. Now should work properly with IPv4 and IPv6
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1db38af…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sat Dec 22 13:07:58 2012 +0000
modules_k/outbound: Filled in functions to encode and decode flow tokens
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=83d07c9…
Merge: 68e07fa 1a09692
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sat Dec 22 11:04:04 2012 +0000
Merge branch 'master' into outbound
* master:
modules_k/domain: bind_domain api function takes one param
modules_k/htable: removed unused variable
nathelper(k): new test 128 to check port in contact against source port
modules_s/nathelper: moved to obsolete folder
nathelper(k): added the select for rewriting the contact
core: proper pv buffer reinitialization
dialog(k): Reworked dlg_set_timeout_by_profile() code to change dialog timeouts outside of a profile lock.
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=68e07fa…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Dec 21 23:38:28 2012 +0000
modules_k/outbound: Removed nat_test from here
- Will just use the one from nathelper when required.
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=064120b…
Merge: 7b31e98 72bee68
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Dec 21 23:34:35 2012 +0000
Merge branch 'master' into outbound
* master: (592 commits)
modules/app_lua: Updated app_lua to support URI lookup in registrar
modules_k/registrar: Extended C-API to include a URI lookup
pkg/kamailio/(centos|fedora): Added more modules moved from modules_s to modules to the build
db_text More instructive error message
modules_s/maxfwd: moved to obsolete folder
maxfwd(k): max_limit module param can be changed at runtime
uid_avp_db: fixed include from uid_domain module
app_python: fixed complilation warnings [-Wformat]
modules_s/uid_uri_db: moved to modules folder
modules_s/uid_domain: moved to modules folder
modules_s/uid_gflags: moved to modules folder
modules_s/uid_avp_db: moved to modules folder
modules_s/uid_auth_db: moved to modules folder
modules_s/pike: moved to obsolete folder
modules_s/uri_db: renamed to uid_uri_db
modules_s/gflags: renamed to uid_gflags
modules_s/domain: renamed to uid_domain
uid_auth_db: updated doc file to the new name
modules_s/avp_db: renamed to uid_avp_db
modues_s/auth_db: renamed to uid_auth_db
...
Conflicts:
modules_k/nathelper/nathelper.c
pkg/kamailio/centos/6/kamailio-build.appl
pkg/kamailio/centos/6/kamailio.appl
pkg/kamailio/fedora/16/kamailio-build.appl
pkg/kamailio/fedora/16/kamailio.appl
pkg/kamailio/fedora/16/kamailio.spec
pkg/kamailio/fedora/17/kamailio-build.appl
pkg/kamailio/fedora/17/kamailio.appl
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7b31e98…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Thu Oct 4 14:38:47 2012 +0100
pkg/kamailio/fedora/16: Fixed typos in .spec
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ec07471…
Merge: b60d3f7 aea31fc
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Sep 28 23:08:46 2012 +0100
Merge branch 'master' into outbound
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b60d3f7…
Merge: 962fbef f71d76c
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Sep 28 21:50:16 2012 +0100
Merge branch 'master' into outbound
Conflicts:
pkg/kamailio/fedora/16/kamailio.spec
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=962fbef…
Merge: af16e04 ac45478
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Aug 19 22:38:13 2012 +0100
Merge branch 'master' into outbound
Conflicts:
pkg/kamailio/fedora/16/kamailio.spec
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=af16e04…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Aug 19 22:15:58 2012 +0100
modules_k/outbound: Renamed nat_uac_test() in this module to ob_nat_uac_test()
- That way it shouldn't conflict with nathelper:nat_uac_test() if both modules
are loaded.
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=61674b5…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Aug 19 20:47:43 2012 +0100
modules_k/outbound: Started to fill in function that determines whether Outbound is required
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=23e3258…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Aug 19 20:20:54 2012 +0100
modules_k/outbound: Added nat_uac_outbound and tidied up module stub
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7376222…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Aug 19 20:18:51 2012 +0100
modules_k/nathelper: Moved code for nat_uac_test into header files
- This is to enable the code to be directly included into other modules and
used without requiring nathelper to be loaded.
- Specifically, this will be used with Outbound where the nat_uac_test()
will be helpful for Outbound-based NAT traversal, but there should be no
need to load nathelper too.
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b215201…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Aug 14 09:19:49 2012 +0100
pkg/kamailio/(centos|fedora): updated CentOS/Fedora build to add Outbound module stub
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c9b4517…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Aug 14 09:17:16 2012 +0100
Makefile: added Outbound stub module
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=82de81e…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Aug 14 09:15:51 2012 +0100
modules_k/outbound: added stub module for Outbound
Module: sip-router
Branch: pd/outbound
Commit: a9d425f4aa8fe0fdc4aac3e158b6c98fd59a5776
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a9d425f…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun Jan 6 19:31:41 2013 +0000
modules_k/rr: Fixes to loose.c from outbound testing
---
modules_k/rr/loose.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/modules_k/rr/loose.c b/modules_k/rr/loose.c
index e110808..b7fa243 100644
--- a/modules_k/rr/loose.c
+++ b/modules_k/rr/loose.c
@@ -48,6 +48,7 @@
#define RR_ERROR -1 /*!< An error occured while processing route set */
#define RR_DRIVEN 1 /*!< The next hop is determined from the route set */
#define NOT_RR_DRIVEN -1 /*!< The next hop is not determined from the route set */
+#define FLOW_TOKEN_BROKEN -2 /*!< Outbound flow-token shows evidence of tampering */
#define RR_ROUTE_PREFIX ROUTE_PREFIX "<"
#define RR_ROUTE_PREFIX_LEN (sizeof(RR_ROUTE_PREFIX)-1)
@@ -581,9 +582,9 @@ static inline int after_strict(struct sip_msg* _m)
}
next_is_strict = is_strict(&puri.params);
- if ((use_ob = process_outbound(_m, puri.user, &uri) < 0)) {
+ if ((use_ob = process_outbound(_m, puri.user, &uri)) < 0) {
LM_ERR("processing outbound flow-token\n");
- return RR_ERROR;
+ return FLOW_TOKEN_BROKEN;
}
if (!use_ob && enable_double_rr && is_2rr(&puri.params) && is_myself(&puri)) {
@@ -774,9 +775,9 @@ static inline int after_loose(struct sip_msg* _m, int preloaded)
next_is_strict = is_strict(&puri.params);
routed_params = puri.params;
uri_is_myself = is_myself(&puri);
- if ((use_ob = process_outbound(_m, puri.user, &uri) < 0)) {
+ if ((use_ob = process_outbound(_m, puri.user, &uri)) < 0) {
LM_ERR("processing outbound flow-token\n");
- return RR_ERROR;
+ return FLOW_TOKEN_BROKEN;
}
/* IF the URI was added by me, remove it */
@@ -795,6 +796,11 @@ static inline int after_loose(struct sip_msg* _m, int preloaded)
LM_ERR("failed to remove Route HF\n");
return RR_ERROR;
}
+
+ /* When using outbound skip past all this stuff and just set
+ the destination */
+ if (use_ob) goto got_uri;
+
res = find_next_route(_m, &hdr);
if (res < 0) {
LM_ERR("failed to find next route\n");
@@ -872,6 +878,7 @@ static inline int after_loose(struct sip_msg* _m, int preloaded)
} else {
/* Next hop is loose router */
LM_DBG("Next URI is a loose router\n");
+got_uri:
if (!use_ob) {
if(get_maddr_uri(&uri, &puri)!=0) {