diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-03-27 22:43:10 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-03-27 22:43:10 +0100 |
commit | 332aff9e3345114e37b22f85a360091032d2f99f (patch) | |
tree | 0c09f87afd00f19a49f4c67135db007e36e334a9 | |
parent | 6bcde343f8e5bc88c4f1599f398cab0ecd6d3d57 (diff) |
ua: prefix contact-user cookie with SIP username
-rw-r--r-- | src/ua.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -474,18 +474,18 @@ int ua_alloc(struct ua **uap, const char *aor) ua->af = AF_INET; #endif - /* generate a unique contact-user, this is needed to route - incoming requests when using multiple useragents */ - err = re_sdprintf(&ua->cuser, "%p", ua); - if (err) - goto out; - /* Decode SIP address */ err = account_alloc(&ua->acc, aor); if (err) goto out; + /* generate a unique contact-user, this is needed to route + incoming requests when using multiple useragents */ + err = re_sdprintf(&ua->cuser, "%r-%p", &ua->acc->luri.user, ua); + if (err) + goto out; + if (ua->acc->sipnat) { ua_printf(ua, "Using sipnat: `%s'\n", ua->acc->sipnat); } |