kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
May 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
26 participants
263 discussions
Start a n
N
ew thread
git:master: tm: added tm_ctx to collect K extension requirements
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: ded63f919ba33f6ddc6c4170166e247bd52cf96a URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ded63f9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 13:40:33 2009 +0200 tm: added tm_ctx to collect K extension requirements - it holds now branch index value used by $T_branch_index - added function in TM API to access tm_ctx --- modules/tm/t_fwd.c | 3 ++- modules/tm/t_lookup.c | 21 +++++++++++++++++++++ modules/tm/t_lookup.h | 24 ++++++++++++++++++++++++ modules/tm/t_reply.c | 2 ++ modules/tm/tm_load.c | 4 ++++ modules/tm/tm_load.h | 5 +++++ 6 files changed, 58 insertions(+), 1 deletions(-) diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c index 46ddbfb..97b36c2 100644 --- a/modules/tm/t_fwd.c +++ b/modules/tm/t_fwd.c @@ -190,10 +190,11 @@ static char *print_uac_request( struct cell *t, struct sip_msg *i_req, if (unlikely(branch_route)) { /* run branch_route actions if provided */ set_route_type(BRANCH_ROUTE); - + tm_ctx_set_branch_index(branch+1); if (run_top_route(branch_rt.rlist[branch_route], i_req) < 0) { LOG(L_ERR, "ERROR: print_uac_request: Error in run_top_route\n"); } + tm_ctx_set_branch_index(0); } /* run the specific callbacks for this transaction */ diff --git a/modules/tm/t_lookup.c b/modules/tm/t_lookup.c index 8f59e8a..c8e1c9d 100644 --- a/modules/tm/t_lookup.c +++ b/modules/tm/t_lookup.c @@ -1869,3 +1869,24 @@ int t_reset_max_lifetime() return 1; } +#ifdef WITH_TM_CTX + +tm_ctx_t _tm_ctx; + +tm_ctx_t* tm_ctx_get(void) +{ + return &_tm_ctx; +} + +void tm_ctx_init(void) +{ + memset(&_tm_ctx, 0, sizeof(tm_ctx_t)); +} + +void tm_ctx_set_branch_index(int v) +{ + _tm_ctx.branch_index = v; +} + +#endif + diff --git a/modules/tm/t_lookup.h b/modules/tm/t_lookup.h index cb21048..070add5 100644 --- a/modules/tm/t_lookup.h +++ b/modules/tm/t_lookup.h @@ -123,4 +123,28 @@ typedef int (*t_get_canceled_ident_f)(struct sip_msg *msg, unsigned int *hash_index, unsigned int *label); #endif /* WITH_AS_SUPPORT */ +/** + * required by TMX (K/O extensions) + */ +#define WITH_TM_CTX +#ifdef WITH_TM_CTX + +typedef struct _tm_ctx { + int branch_index; +} tm_ctx_t; + +typedef tm_ctx_t* (*tm_ctx_get_f)(void); + +tm_ctx_t* tm_ctx_get(void); +void tm_ctx_init(void); +void tm_ctx_set_branch_index(int v); + +#else + +#define tm_ctx_get() +#define tm_ctx_init() +#define tm_ctx_set_branch_index(v) + +#endif /* WITH_TM_CTX */ + #endif diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c index e51142c..848cebb 100644 --- a/modules/tm/t_reply.c +++ b/modules/tm/t_reply.c @@ -1833,6 +1833,7 @@ int reply_received( struct sip_msg *p_msg ) if ( (t==0)||(t==T_UNDEFINED)) goto trans_not_found; + tm_ctx_set_branch_index(branch); cancel_bitmap=0; msg_status=p_msg->REPLY_STATUS; @@ -2070,6 +2071,7 @@ int reply_received( struct sip_msg *p_msg ) } /* provisional replies */ done: + tm_ctx_set_branch_index(0); /* we are done with the transaction, so unref it - the reference * was incremented by t_check() function -bogdan*/ t_unref(p_msg); diff --git a/modules/tm/tm_load.c b/modules/tm/tm_load.c index 6f8bba5..afb5e30 100644 --- a/modules/tm/tm_load.c +++ b/modules/tm/tm_load.c @@ -233,5 +233,9 @@ int load_tm( struct tm_binds *tmb) tmb->generate_fromtag = generate_fromtag; tmb->t_lookup_request = t_lookup_request; tmb->t_check = t_check; + +#ifdef WITH_TM_CTX + tmb->tm_ctx_get = tm_ctx_get; +#endif return 1; } diff --git a/modules/tm/tm_load.h b/modules/tm/tm_load.h index e3640b7..ec84143 100644 --- a/modules/tm/tm_load.h +++ b/modules/tm/tm_load.h @@ -140,6 +140,11 @@ struct tm_binds { generate_fromtag_f generate_fromtag; tlookup_request_f t_lookup_request; tcheck_f t_check; +#ifdef WITH_TM_CTX + tm_ctx_get_f tm_ctx_get; +#else + void* reserved5; +#endif }; extern int tm_init;
15 years, 7 months
1
0
0
0
git:master: tm: define tm_ctx_get() to NULL if no WITH_TM_CTX
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: c40ade61c41e33db7e7038a255a9561b60cd1693 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c40ade6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 14:01:26 2009 +0200 tm: define tm_ctx_get() to NULL if no WITH_TM_CTX --- modules/tm/t_lookup.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/tm/t_lookup.h b/modules/tm/t_lookup.h index 070add5..a9a98e6 100644 --- a/modules/tm/t_lookup.h +++ b/modules/tm/t_lookup.h @@ -141,7 +141,7 @@ void tm_ctx_set_branch_index(int v); #else -#define tm_ctx_get() +#define tm_ctx_get() NULL #define tm_ctx_init() #define tm_ctx_set_branch_index(v)
15 years, 7 months
1
0
0
0
git:master: tm: exported more functions via TM API
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: 9874877e47e7aec1c1a77696acb71cb94ad94228 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9874877…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Fri May 1 12:35:01 2009 +0200 tm: exported more functions via TM API - t_lookup_callid, generate_callid, generate_fromtag, t_lookup_request, t_check are now available via API --- modules/tm/callid.h | 2 ++ modules/tm/t_lookup.h | 7 ++++++- modules/tm/tm_load.c | 5 +++++ modules/tm/tm_load.h | 6 ++++++ modules/tm/uac.h | 2 +- 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/tm/callid.h b/modules/tm/callid.h index 2363abb..e117686 100644 --- a/modules/tm/callid.h +++ b/modules/tm/callid.h @@ -49,6 +49,8 @@ int init_callid(void); int child_init_callid(int rank); +typedef void (*generate_callid_f)(str*); + /* * Get a unique Call-ID */ diff --git a/modules/tm/t_lookup.h b/modules/tm/t_lookup.h index 8994999..cb21048 100644 --- a/modules/tm/t_lookup.h +++ b/modules/tm/t_lookup.h @@ -55,7 +55,10 @@ void init_t(); int init_rb( struct retr_buf *rb, struct sip_msg *msg ); struct cell* t_lookupOriginalT( struct sip_msg* p_msg ); int t_reply_matching( struct sip_msg* , int* ); -int t_lookup_request( struct sip_msg* p_msg , int leave_new_locked, + +typedef int (*tlookup_request_f)(struct sip_msg*, int, int*); + +int t_lookup_request( struct sip_msg* p_msg, int leave_new_locked, int* canceled); int t_newtran( struct sip_msg* p_msg ); @@ -68,6 +71,7 @@ int add_branch_label( struct cell *trans, int t_unref( struct sip_msg *p_msg); typedef int (*tunref_f)( struct sip_msg *p_msg); +typedef int (*tcheck_f)(struct sip_msg*, int*); /* old t_check version (no e2eack support) */ int t_check(struct sip_msg* , int *branch ); @@ -91,6 +95,7 @@ typedef int (*tnewtran_f)(struct sip_msg*); typedef int (*tget_ti_f)(struct sip_msg*, unsigned int*, unsigned int*); typedef int (*tlookup_ident_f)(struct cell**, unsigned int, unsigned int); typedef int (*trelease_f)(struct sip_msg*); +typedef int (*tlookup_callid_f)(struct cell **, str, str); int t_is_local(struct sip_msg*); int t_get_trans_ident(struct sip_msg* p_msg, unsigned int* hash_index, unsigned int* label); diff --git a/modules/tm/tm_load.c b/modules/tm/tm_load.c index ebdf0a8..6f8bba5 100644 --- a/modules/tm/tm_load.c +++ b/modules/tm/tm_load.c @@ -228,5 +228,10 @@ int load_tm( struct tm_binds *tmb) tmb->t_get_reply_totag = t_get_reply_totag; tmb->t_get_picked_branch = t_get_picked_branch; + tmb->t_lookup_callid = t_lookup_callid; + tmb->generate_callid = generate_callid; + tmb->generate_fromtag = generate_fromtag; + tmb->t_lookup_request = t_lookup_request; + tmb->t_check = t_check; return 1; } diff --git a/modules/tm/tm_load.h b/modules/tm/tm_load.h index bc99256..e3640b7 100644 --- a/modules/tm/tm_load.h +++ b/modules/tm/tm_load.h @@ -46,6 +46,7 @@ #include "t_lookup.h" #include "t_reply.h" #include "dlg.h" +#include "callid.h" #include "t_cancel.h" #include "t_suspend.h" @@ -134,6 +135,11 @@ struct tm_binds { t_continue_f t_continue; tget_reply_totag_f t_get_reply_totag; tget_picked_f t_get_picked_branch; + tlookup_callid_f t_lookup_callid; + generate_callid_f generate_callid; + generate_fromtag_f generate_fromtag; + tlookup_request_f t_lookup_request; + tcheck_f t_check; }; extern int tm_init; diff --git a/modules/tm/uac.h b/modules/tm/uac.h index f4c14e9..8106727 100644 --- a/modules/tm/uac.h +++ b/modules/tm/uac.h @@ -88,7 +88,7 @@ typedef int (*ack_local_uac_f)(struct cell *trans, str *hdrs, str *body); typedef int (*prepare_request_within_f)(uac_req_t *uac_r, struct retr_buf **dst_req); typedef void (*send_prepared_request_f)(struct retr_buf *request_dst); - +typedef void (*generate_fromtag_f)(str*, str*); /* * Generate a fromtag based on given Call-ID
15 years, 7 months
1
0
0
0
← Newer
1
...
24
25
26
27
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Results per page:
10
25
50
100
200