git:kamailio_3.0: msilo(k): set tm callback type for sent messages

4 messages Options
Embed this post
Permalink
Daniel-Constantin Mierla

git:kamailio_3.0: msilo(k): set tm callback type for sent messages

Reply Threaded More More options
Print post
Permalink
Module: sip-router
Branch: kamailio_3.0
Commit: d8dde2fe2e7004c69a6241a054c5febe73548267
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d8dde2fe2e7004c69a6241a054c5febe73548267

Author: Daniel-Constantin Mierla <[hidden email]>
Committer: Daniel-Constantin Mierla <[hidden email]>
Date:   Fri Nov  6 11:42:35 2009 +0100

msilo(k): set tm callback type for sent messages

- it must be TMCB_LOCAL_COMPLETED
- otherwise the callback is not executed when transaction completes
- delivered messages were not deleted from db
- reported by Juha Heinanen

---

 modules_k/msilo/msilo.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules_k/msilo/msilo.c b/modules_k/msilo/msilo.c
index 7c9cefa..8249b43 100644
--- a/modules_k/msilo/msilo.c
+++ b/modules_k/msilo/msilo.c
@@ -1060,6 +1060,7 @@ static int m_dump(struct sip_msg* msg, char* owner, char* str2)
  uac_r.method = &msg_type;
  uac_r.headers = &hdr_str;
  uac_r.body = (n<0)?&str_vals[2]:&body_str;
+ uac_r.cb_flags = TMCB_LOCAL_COMPLETED;
  uac_r.cb  = m_tm_callback;
  uac_r.cbp = (void*)(long)mid;
 
@@ -1333,6 +1334,7 @@ void m_send_ontimer(unsigned int ticks, void *param)
  uac_r.method  = &msg_type;
  uac_r.headers = &hdr_str;
  uac_r.body = (n<0)?&str_vals[2]:&body_str;
+ uac_r.cb_flags = TMCB_LOCAL_COMPLETED;
  uac_r.cb  = m_tm_callback;
  uac_r.cbp = (void*)(long)mid;
  tmb.t_request(&uac_r,  /* UAC Req */


_______________________________________________
sr-dev mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Juha Heinanen

git:kamailio_3.0: msilo(k): set tm callback type for sent messages

Reply Threaded More More options
Print post
Permalink
i tried to test, but looks like this is not yet in sr_3.0 and i already
forgot the cherry picking business.

-- juha

 > Module: sip-router
 > Branch: kamailio_3.0
 > Commit: d8dde2fe2e7004c69a6241a054c5febe73548267
 > URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d8dde2fe2e7004c69a6241a054c5febe73548267
 >
 > Author: Daniel-Constantin Mierla <[hidden email]>
 > Committer: Daniel-Constantin Mierla <[hidden email]>
 > Date:   Fri Nov  6 11:42:35 2009 +0100
 >
 > msilo(k): set tm callback type for sent messages

-- juha

_______________________________________________
sr-dev mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Daniel-Constantin Mierla

Re: git:kamailio_3.0: msilo(k): set tm callback type for sent messages

Reply Threaded More More options
Print post
Permalink


On 06.11.2009 15:10 Uhr, Juha Heinanen wrote:
> i tried to test, but looks like this is not yet in sr_3.0 and i already
> forgot the cherry picking business.
>  

I just merged it to sr_3.0. Let me know if works and I will merge the
other similar fixes.

If you want to play with kamailio_3.0 branch:
- clone the sip-router git repo
- git checkout -b kamailio_3.0 origin/kamailio_3.0

A tutorial for community (anonymous access) is available at:
http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.0.x-from-git

The cherry-pick stuff:
- in the cloned repo
- git pull origin
- git cherry-pick -x _commit_hash_id_

Cheers,
Daniel

> -- juha
>
>  > Module: sip-router
>  > Branch: kamailio_3.0
>  > Commit: d8dde2fe2e7004c69a6241a054c5febe73548267
>  > URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d8dde2fe2e7004c69a6241a054c5febe73548267
>  >
>  > Author: Daniel-Constantin Mierla <[hidden email]>
>  > Committer: Daniel-Constantin Mierla <[hidden email]>
>  > Date:   Fri Nov  6 11:42:35 2009 +0100
>  >
>  > msilo(k): set tm callback type for sent messages
>
> -- juha
>  

--
Daniel-Constantin Mierla
* http://www.asipto.com/


_______________________________________________
sr-dev mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Juha Heinanen

Re: git:kamailio_3.0: msilo(k): set tm callback type for sent messages

Reply Threaded More More options
Print post
Permalink
Daniel-Constantin Mierla writes:

 > I just merged it to sr_3.0. Let me know if works and I will merge the
 > other similar fixes.

i tested and now messages were removed from silo table after delivery.
not immediately though but after a minute or so.

 > The cherry-pick stuff:
 > - in the cloned repo
 > - git pull origin
 > - git cherry-pick -x _commit_hash_id_

i'll save these instructions for the future.

-- juha

_______________________________________________
sr-dev mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev