Re: [SR-Users] append_branch. How to disable original URI

2015-04-27 Thread Daniel-Constantin Mierla
Hello, I added some functions and variables to make these operations easier. The older version required to update the r-ruri branch and use append_branch(), with keeping backup or uri branch attributes in order to restore it. Now you have to fill the $sbranch(attribute) variable and then use eith

[SR-Users] append_branch. How to disable original URI

2015-04-17 Thread Yuriy Gorlichenko
Hello. I thry to integrate redis for location module and first at all that I do - dublicate location to redis. First At all I create analog of lookup procedure that use location but from redis. I take values from location and create branches by mannualy. All works good but branch route create dubl

Re: [SR-Users] append_branch and t_replicate issue

2014-07-28 Thread Aelfatihy
Envoyé de mon iPad Le 28 juil. 2014 à 11:06, Daniel-Constantin Mierla a écrit : > Hello, > > On 25/07/14 22:47, Asgaroth wrote: >> Hi, >> >> using t_replicate() did the trick! it appears to be replicating to both >> systems now, thanks alot for looking at this. > great, welcome! >> >> The

Re: [SR-Users] append_branch and t_replicate issue

2014-07-28 Thread Aelfatihy
Envoyé de mon iPad Le 28 juil. 2014 à 11:06, Daniel-Constantin Mierla a écrit : > Hello, > > On 25/07/14 22:47, Asgaroth wrote: >> Hi, >> >> using t_replicate() did the trick! it appears to be replicating to both >> systems now, thanks alot for looking at this. > great, welcome! >> >> The

Re: [SR-Users] append_branch and t_replicate issue

2014-07-28 Thread Aelfatihy
Envoyé de mon iPad Le 25 juil. 2014 à 17:35, Asgaroth <00asgarot...@gmail.com> a écrit : > Hi, > > On 25/07/2014 13:49, Daniel-Constantin Mierla wrote: >> The second one is with the patch to the code and it is enough to pick only >> that one. > > OK, I tried 4.1.4 with this patch applied an

Re: [SR-Users] append_branch and t_replicate issue

2014-07-28 Thread Daniel-Constantin Mierla
Hello, On 25/07/14 22:47, Asgaroth wrote: Hi, using t_replicate() did the trick! it appears to be replicating to both systems now, thanks alot for looking at this. great, welcome! The only difference i can see is that the r-uri is re-written for both replicated regesters although this shou

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Asgaroth
Hi, using t_replicate() did the trick! it appears to be replicating to both systems now, thanks alot for looking at this. The only difference i can see is that the r-uri is re-written for both replicated regesters although this shouldnt make any difference as the registration is already auth

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Daniel-Constantin Mierla
Hello, use t_replicate() without any parameter. I said before that I mistakenly evaluated the code as working with empty parameter, but it was not. Later today I pushed a new patch for this case as well. Cheers, Daniel On 25/07/14 19:35, Asgaroth wrote: Hi, On 25/07/2014 13:49, Daniel-Con

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Asgaroth
Hi, On 25/07/2014 13:49, Daniel-Constantin Mierla wrote: The second one is with the patch to the code and it is enough to pick only that one. OK, I tried 4.1.4 with this patch applied and I still get the following error message: /usr/sbin/kamailio[22158]: ERROR: tm [tm.c:1618]: t_replicate_

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Daniel-Constantin Mierla
The second one is with the patch to the code and it is enough to pick only that one. The first one is for docs (readme file), which is not really necessary to test (main reason to split the commit, because patches to docs typically throw conflicts when backporting, due to different formatting

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Asgaroth
On 25/07/2014 12:04, Daniel-Constantin Mierla wrote: I read the condition on uri wrong -- it was only on a null pointer for the uri, not on length (in this case pointer is to a empty string). I pushed an enhanced check for length as well, but it is only in master for the moment. ok, I will tr

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Daniel-Constantin Mierla
On 25/07/14 12:51, Asgaroth wrote: On 25/07/2014 11:33, Daniel-Constantin Mierla wrote: $ru = "sip:" + BACKUP_REGISTRAR_1 + ":5060"; append_branch("sip:" + BACKUP_REGISTRAR_2 + ":5060"); *t_replicate("");* Yes, and this should work on existing versions 4.1.x or older OK, trying to test this

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Asgaroth
On 25/07/2014 11:33, Daniel-Constantin Mierla wrote: $ru = "sip:" + BACKUP_REGISTRAR_1 + ":5060"; append_branch("sip:" + BACKUP_REGISTRAR_2 + ":5060"); *t_replicate("");* Yes, and this should work on existing versions 4.1.x or older OK, trying to test this and I'm seeing an error with debug=2:

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Daniel-Constantin Mierla
Hello, On 25/07/14 12:36, Asgaroth wrote: Hi, Another quick question on the git checkout, do I need to checkout the 4.1 branch for this patch, or is it in 4.2 branch? I did the following: git clone --depth 1 git://git.sip-router.org/sip-router kamailio make FLAVOUR=kamailio tar this genera

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Asgaroth
Hi, Another quick question on the git checkout, do I need to checkout the 4.1 branch for this patch, or is it in 4.2 branch? I did the following: git clone --depth 1 git://git.sip-router.org/sip-router kamailio make FLAVOUR=kamailio tar this generates the following tar file which I will use

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Daniel-Constantin Mierla
On 25/07/14 12:20, Asgaroth wrote: Hi, On 25/07/2014 11:03, Daniel-Constantin Mierla wrote: I pushed a patch to master branch that allows to use t_replicate() without any parameters. Apparently the same behaviour can be achieved using: t_replicate("") so the parameter is an empty string. Ca

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Asgaroth
Hi, On 25/07/2014 11:03, Daniel-Constantin Mierla wrote: I pushed a patch to master branch that allows to use t_replicate() without any parameters. Apparently the same behaviour can be achieved using: t_replicate("") so the parameter is an empty string. Can you try it and see if works? Also

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Daniel-Constantin Mierla
I pushed a patch to master branch that allows to use t_replicate() without any parameters. Apparently the same behaviour can be achieved using: t_replicate("") so the parameter is an empty string. Can you try it and see if works? Also, feedback on testing the patch for no parameter would be a

Re: [SR-Users] append_branch and t_replicate issue

2014-07-25 Thread Daniel-Constantin Mierla
On 24/07/14 19:34, Asgaroth wrote: On 24/07/2014 17:26, Daniel-Constantin Mierla wrote: checking docs, it seems like that. I will have to look at the code and eventually make an option without parameter. Otherwise, like it is not, the parameter forces an outbound proxy to be used for forwardi

Re: [SR-Users] append_branch and t_replicate issue

2014-07-24 Thread Asgaroth
On 24/07/2014 17:26, Daniel-Constantin Mierla wrote: checking docs, it seems like that. I will have to look at the code and eventually make an option without parameter. Otherwise, like it is not, the parameter forces an outbound proxy to be used for forwarding. I guess that makes sense for set

Re: [SR-Users] append_branch and t_replicate issue

2014-07-24 Thread Daniel-Constantin Mierla
Hello, On 24/07/14 17:29, Asgaroth wrote: Hi, Thanks for the suggestion, I tried it but t_replicate() seems to cause an issue with config parsing, looking at TM module v4.1.x documentation, it looks like t_replicate *must* have paramteres. checking docs, it seems like that. I will have to l

Re: [SR-Users] append_branch and t_replicate issue

2014-07-24 Thread Asgaroth
Hi, Thanks for the suggestion, I tried it but t_replicate() seems to cause an issue with config parsing, looking at TM module v4.1.x documentation, it looks like t_replicate *must* have paramteres. Here's my test snip: $ru = "sip:" + BACKUP_REGISTRAR_1 + ":5060"; appe

Re: [SR-Users] append_branch and t_replicate issue

2014-07-24 Thread Daniel-Constantin Mierla
Hello, you use t_replicate(uri1) -- by that you force outbound proxy to uri1 parameter. Can you try like in the next example? $ru = uri1; append_branch("uri2"); t_replicate(); Cheers, Daniel On 22/07/14 17:40, Daniel-Constantin Mierla wrote: Hello, ok, I will look it up and investigate wh

Re: [SR-Users] append_branch and t_replicate issue

2014-07-22 Thread Daniel-Constantin Mierla
Hello, ok, I will look it up and investigate when I get the first chance. Cheers, Daniel On 22/07/14 16:43, Asgaroth wrote: Hi, On 22/07/2014 11:38, Daniel-Constantin Mierla wrote: Hello, looking a bit at the source code, append branch should still create a new destination point and messag

Re: [SR-Users] append_branch and t_replicate issue

2014-07-22 Thread Asgaroth
Hi, On 22/07/2014 11:38, Daniel-Constantin Mierla wrote: Hello, looking a bit at the source code, append branch should still create a new destination point and message to be sent there. I would need the log messages printed with debug=3 in kamailio.cfg for the case when you use append branch

Re: [SR-Users] append_branch and t_replicate issue

2014-07-22 Thread Daniel-Constantin Mierla
Hello, looking a bit at the source code, append branch should still create a new destination point and message to be sent there. I would need the log messages printed with debug=3 in kamailio.cfg for the case when you use append branch. Can you provide them? Cheers, Daniel On 22/07/14 10:29

Re: [SR-Users] append_branch and t_replicate issue

2014-07-22 Thread Asgaroth
Hi, On 22/07/2014 09:13, Daniel-Constantin Mierla wrote: first some clarifications about the subject: - append_branch() adds a new destination for normal forwarding/relaying -- replies from these destinations are forwarded back to the initial sender - t_replicate() creates a special branch --

Re: [SR-Users] append_branch and t_replicate issue

2014-07-22 Thread Daniel-Constantin Mierla
Hello, first some clarifications about the subject: - append_branch() adds a new destination for normal forwarding/relaying -- replies from these destinations are forwarded back to the initial sender - t_replicate() creates a special branch -- replies from these destinations are absorbed local

Re: [SR-Users] append_branch and t_replicate issue

2014-07-22 Thread Asgaroth
I ended up using two 'forward' statements in stead of t_replicate as it does not appear to work with 2+ servers to replicate to. On 21/07/2014 15:01, Asgaroth wrote: Further update, it looks like append_branch is over-writing the original request-uri, an ngrep shows the following for the 2 mes

Re: [SR-Users] append_branch and t_replicate issue

2014-07-21 Thread Bruce McAlister
Just an update on this, it appears to send 2 REGISTER requests in parellel to BACKUP_REGISTRAR_3, so it looks like the append_branch is being added but its uri is set to BACKUP_REGISTRAR_3 (and not BACKUP_REGISTRAR_2 as requested int the append_branch section) On 21/07/2014 13:49, Asgaroth wro

Re: [SR-Users] append_branch and t_replicate issue

2014-07-21 Thread Asgaroth
Further update, it looks like append_branch is over-writing the original request-uri, an ngrep shows the following for the 2 messages sent: This one looks like the proper replicate for the original request U 2014/07/21 14:56:29.781372 BACKUP_REGISTRAR_1:5060 -> BACKUP_REGISTRAR_3:5060 REGISTE

[SR-Users] append_branch and t_replicate issue

2014-07-21 Thread Asgaroth
Hi All, I have an issue that I cant seem to get to the bottom of, I would appreciate if someone could point me in the right direction. I have 3 registrar's and would like to replicate the registration regest from 1 to the other 2, I am trying this with t_replicate, the docs say that to send

Re: [SR-Users] append_branch with pseudo variables

2012-08-17 Thread Carlos Ruiz Díaz
I figured out what was happening. By doing "$(branch(q)[1]) = "0.1";" I was trying to write into an non existent branch since 1 is actually the second branch because the main branch ($ru) is not counted. $(branch(q)[0]) = "0.1" // is the 1st. $(branch(q)[1]) = "0.1" // is the 2nd. Regards. Car

Re: [SR-Users] append_branch with pseudo variables

2012-08-17 Thread Carlos Ruiz Díaz
I can't set any of the attributes values using the assignment syntax. Everytime I do: $(branch(q)[1]) = "0.1"; I get ERROR: [lvalue.c:354]: setting pvar failed. This is true for all attributes, nut just for "q". Am I doing something wrong? I'm using Kamailio 3.2.3. Regards. Carlos. On Fri

Re: [SR-Users] append_branch with pseudo variables

2012-08-17 Thread Carlos Ruiz Díaz
I'll try that :). Thanks for your help. Carlos. On Fri, Aug 17, 2012 at 5:30 AM, Daniel-Constantin Mierla wrote: > > On 8/16/12 10:50 PM, Carlos Ruiz Díaz wrote: > > > > On Thu, Aug 16, 2012 at 4:30 PM, Daniel-Constantin Mierla < > mico...@gmail.com> wrote: > >> >> On 8/16/12 9:15 PM, Carlos R

Re: [SR-Users] append_branch with pseudo variables

2012-08-17 Thread Daniel-Constantin Mierla
On 8/16/12 10:50 PM, Carlos Ruiz Díaz wrote: On Thu, Aug 16, 2012 at 4:30 PM, Daniel-Constantin Mierla mailto:mico...@gmail.com>> wrote: On 8/16/12 9:15 PM, Carlos Ruiz Díaz wrote: Looks like km_append_branch() doesn't have all of the signatures that the original append_branch

Re: [SR-Users] append_branch with pseudo variables

2012-08-16 Thread Carlos Ruiz Díaz
On Thu, Aug 16, 2012 at 4:30 PM, Daniel-Constantin Mierla wrote: > > On 8/16/12 9:15 PM, Carlos Ruiz Díaz wrote: > > Looks like km_append_branch() doesn't have all of the signatures that the > original append_branch() has. I can't add q values for serial/parallel > forking with km_append_branch()

Re: [SR-Users] append_branch with pseudo variables

2012-08-16 Thread Daniel-Constantin Mierla
On 8/16/12 9:15 PM, Carlos Ruiz Díaz wrote: Looks like km_append_branch() doesn't have all of the signatures that the original append_branch() has. I can't add q values for serial/parallel forking with km_append_branch(). What signature are you looking for? Also, apparently there's no way o

Re: [SR-Users] append_branch with pseudo variables

2012-08-16 Thread Carlos Ruiz Díaz
Looks like km_append_branch() doesn't have all of the signatures that the original append_branch() has. I can't add q values for serial/parallel forking with km_append_branch(). Also, apparently there's no way of setting the RURI by calling a function that does that. I guess I'll have to do it usi

Re: [SR-Users] append_branch with pseudo variables

2012-08-16 Thread Carlos Ruiz Díaz
Great! I'll give it a try. Thanks! Carlos. On Thu, Aug 16, 2012 at 12:13 PM, Daniel-Constantin Mierla < mico...@gmail.com> wrote: > Hello, > > > > On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: > >> Hello guys, >> >> Why I can only append_branch() a SIP URI as a literal constant string? >> Why not

Re: [SR-Users] append_branch with pseudo variables

2012-08-16 Thread Daniel-Constantin Mierla
Hello, On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch("$cnx3a(route1)"); t_

[SR-Users] append_branch with pseudo variables

2012-08-16 Thread Carlos Ruiz Díaz
Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch("$cnx3a(route1)"); t_relay(); where cnx3a is a variable containing the SIP URI

Re: [SR-Users] append_branch

2010-11-15 Thread Daniel-Constantin Mierla
Hello, On 11/10/10 5:47 PM, Rizwan Qureshi wrote: Hi All, I just want to know how I can use append_branch() function for register requests. What I want to do is register all users on all asterisk servers by forwarding the register requests (to all asterisk servers) and then if the sip proxy t

[SR-Users] append_branch

2010-11-10 Thread Rizwan Qureshi
Hi All, I just want to know how I can use append_branch() function for register requests. What I want to do is register all users on all asterisk servers by forwarding the register requests (to all asterisk servers) and then if the sip proxy throws call to any of the server the asterisk server, the