Thanks Marius,
that was it. Regards Javier On Mon, Oct 25, 2010 at 10:08 PM, <sr-users-requ...@lists.sip-router.org>wrote: > Send sr-users mailing list submissions to > sr-users@lists.sip-router.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > or, via email, send a message with subject or body 'help' to > sr-users-requ...@lists.sip-router.org > > You can reach the person managing the list at > sr-users-ow...@lists.sip-router.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of sr-users digest..." > > > Today's Topics: > > 1. Drouting usage (Javier Gallart) > 2. PSTN call (michel freiha) > 3. Re: Drouting usage (marius zbihlei) > 4. bflag under failure_route (kamailio 1.5) (I?aki Baz Castillo) > 5. Re: bflag under failure_route (kamailio 1.5) > (Daniel-Constantin Mierla) > 6. Re: bflag under failure_route (kamailio 1.5) (I?aki Baz Castillo) > 7. Re: bflag under failure_route (kamailio 1.5) > (Daniel-Constantin Mierla) > 8. Re: bflag under failure_route (kamailio 1.5) (I?aki Baz Castillo) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 25 Oct 2010 15:16:56 +0200 > From: Javier Gallart <jgalla...@gmail.com> > Subject: [SR-Users] Drouting usage > To: sr-users@lists.sip-router.org > Message-ID: > <aanlktik8pwtu9ut1=mpb_zsnztej5khzprevpubgz...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello > > sorry if this sounds too "newbie". I'm interested in the drouting module. > The first INVITE is correctly forwarded to the gw foudn in the drouting > table: > if (is_method("INVITE") && !has_totag()) { > do_routing("0"); > record_route(); > } > However for subsequent messages (ACK, BYE) in the dialog I don't know how > to > keep track of the ip resolved by the drouting logic so the messages are > correctly forwarded to the same gw. I've made some tests using the dialog > module with no success. Any hint? > > Thanks in advance > > Javier > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.sip-router.org/pipermail/sr-users/attachments/20101025/8c5c5a6c/attachment-0001.htm > > > > ------------------------------ > > Message: 2 > Date: Mon, 25 Oct 2010 16:49:24 +0300 > From: michel freiha <mich...@gmail.com> > Subject: [SR-Users] PSTN call > To: us...@lists.kamailio.org > Message-ID: > <aanlktimkdfnxtaarb8gvkdb4haen8ey03wo9mk6mn...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear All, > > Can someone help me to connect my kamilio in order to make a PSTN call by > rewriting host tp PSTN gateway? I changed my config in a manner to do > that...The line is ringing but as soon as I open the line on other side the > call will hangup...Please find the piece of code > > # RTPProxy control > route[RTPPROXY] { > #!ifdef WITH_NAT > if (is_method("BYE")) { > unforce_rtp_proxy(); > } else if (is_method("INVITE")){ > rewritehost("XX.XX.XX.XX"); > force_rtp_proxy(); > } > if (!has_totag()) add_rr_param(";nat=yes"); > #!endif > return; > } > > > Regards > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.sip-router.org/pipermail/sr-users/attachments/20101025/eeae5259/attachment-0001.htm > > > > ------------------------------ > > Message: 3 > Date: Mon, 25 Oct 2010 16:51:32 +0300 > From: marius zbihlei <marius.zbih...@1and1.ro> > Subject: Re: [SR-Users] Drouting usage > To: <sr-users@lists.sip-router.org> > Message-ID: <4cc58b64.4040...@1and1.ro> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > On 10/25/2010 04:16 PM, Javier Gallart wrote: > > Hello > > > > sorry if this sounds too "newbie". I'm interested in the drouting > > module. The first INVITE is correctly forwarded to the gw foudn in the > > drouting table: > > if (is_method("INVITE") && !has_totag()) { > > do_routing("0"); > > record_route(); > > } > > However for subsequent messages (ACK, BYE) in the dialog I don't know > > how to keep track of the ip resolved by the drouting logic so the > > messages are correctly forwarded to the same gw. I've made some tests > > using the dialog module with no success. Any hint? > > > > Thanks in advance > > > > Javier > Hello > > You might want to use loose_route() to perform loose routing (defined in > RFC 3261) of in-dialog requests. (Loose_route also performs strict routing) > > if (has_totag()){ > loose_route(); > t_relay(); > exit; > } > > Marius > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.sip-router.org/pipermail/sr-users/attachments/20101025/bc0d7d5d/attachment-0001.htm > > > > ------------------------------ > > Message: 4 > Date: Mon, 25 Oct 2010 18:25:17 +0200 > From: I?aki Baz Castillo <i...@aliax.net> > Subject: [SR-Users] bflag under failure_route (kamailio 1.5) > To: SR-Users <sr-users@lists.sip-router.org> > Message-ID: > > <aanlktim-gan9=vkdsfaggqfn1eppx+gla5atc0apz...@mail.gmail.com<vkdsfaggqfn1eppx%2bgla5atc0apz...@mail.gmail.com> > > > Content-Type: text/plain; charset=UTF-8 > > Hi, I know that handling bflags outside of branch_route is not a good > idea. Anyhow I have a doubt: > > 1) In a normal route I set "setbflag(i:1)", so the bflag will be set > for all the branches that could be generated for this incoming > transaction. This also involves creating new branches manually under > failure_route, am I right? > Note: I do know that it would be much better just to use flag instead of > bflags. > > 2) The outgoing transaction(s) fail so I enter into failure_route. If > I inspect here bflag(i:1) will it be set or not? I remember that it > will be set. > > 3) Then I call append_branch in failure_route, or perhaps call > loockup("location") and I expect that all the generated branches will > have the bflag set, am I right? > > Thanks a lot. > > -- > I?aki Baz Castillo > <i...@aliax.net> > > > > ------------------------------ > > Message: 5 > Date: Mon, 25 Oct 2010 18:31:41 +0200 > From: Daniel-Constantin Mierla <mico...@gmail.com> > Subject: Re: [SR-Users] bflag under failure_route (kamailio 1.5) > To: I?aki Baz Castillo <i...@aliax.net> > Cc: SR-Users <sr-users@lists.sip-router.org> > Message-ID: <4cc5b0ed.5080...@gmail.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Hello, > > On 10/25/10 6:25 PM, I?aki Baz Castillo wrote: > > Hi, I know that handling bflags outside of branch_route is not a good > > idea. Anyhow I have a doubt: > > > > 1) In a normal route I set "setbflag(i:1)" > > why are you using "i:1"? The parameter must be just 1. > > > , so the bflag will be set > > for all the branches that could be generated for this incoming > > transaction. This also involves creating new branches manually under > > failure_route, am I right? > > Note: I do know that it would be much better just to use flag instead of > bflags. > > > > 2) The outgoing transaction(s) fail so I enter into failure_route. If > > I inspect here bflag(i:1) will it be set or not? I remember that it > > will be set. > > > > 3) Then I call append_branch in failure_route, or perhaps call > > loockup("location") and I expect that all the generated branches will > > have the bflag set, am I right? > never used in this way, but the normal usage is per branch and when you > do it in the main route then it is just for first branch. > > Cheers, > Daniel > > Thanks a lot. > > > > -- > Daniel-Constantin Mierla > http://www.asipto.com > > > > > ------------------------------ > > Message: 6 > Date: Mon, 25 Oct 2010 18:35:46 +0200 > From: I?aki Baz Castillo <i...@aliax.net> > Subject: Re: [SR-Users] bflag under failure_route (kamailio 1.5) > To: mico...@gmail.com > Cc: SR-Users <sr-users@lists.sip-router.org> > Message-ID: > <aanlktikyqv+by1jtqiktgekorb+ac6trxjbo=jeah...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > 2010/10/25 Daniel-Constantin Mierla <mico...@gmail.com>: > > why are you using "i:1"? The parameter must be just 1. > > Sorry, just a typo in the mail :) > > > >> , so the bflag will be set > >> for all the branches that could be generated ?for this incoming > >> transaction. This also involves creating new branches manually under > >> failure_route, am I right? > >> Note: I do know that it would be much better just to use flag instead of > >> bflags. > >> > >> 2) The outgoing transaction(s) fail so I enter into failure_route. If > >> I inspect here bflag(i:1) will it be set or not? I remember that it > >> will be set. > >> > >> 3) Then I call append_branch in failure_route, or perhaps call > >> loockup("location") and I expect that all the generated branches will > >> have the bflag set, am I right? > > > > never used in this way, but the normal usage is per branch and when you > do > > it in the main route then it is just for first branch. > > It's more curiosity than need. But anyhow I'm 90% sure that if you set > a bflag in route then it will be set for all the branches generated > during loockup(location). Not sure what happens in case of serial > forking using append_branch() in failure_route... > > -- > I?aki Baz Castillo > <i...@aliax.net> > > > > ------------------------------ > > Message: 7 > Date: Mon, 25 Oct 2010 21:38:52 +0200 > From: Daniel-Constantin Mierla <mico...@gmail.com> > Subject: Re: [SR-Users] bflag under failure_route (kamailio 1.5) > To: I?aki Baz Castillo <i...@aliax.net> > Cc: SR-Users <sr-users@lists.sip-router.org> > Message-ID: <4cc5dccc.5010...@gmail.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > > > On 10/25/10 6:35 PM, I?aki Baz Castillo wrote: > > 2010/10/25 Daniel-Constantin Mierla<mico...@gmail.com>: > >> why are you using "i:1"? The parameter must be just 1. > > Sorry, just a typo in the mail :) > > > > > >>> , so the bflag will be set > >>> for all the branches that could be generated for this incoming > >>> transaction. This also involves creating new branches manually under > >>> failure_route, am I right? > >>> Note: I do know that it would be much better just to use flag instead > of > >>> bflags. > >>> > >>> 2) The outgoing transaction(s) fail so I enter into failure_route. If > >>> I inspect here bflag(i:1) will it be set or not? I remember that it > >>> will be set. > >>> > >>> 3) Then I call append_branch in failure_route, or perhaps call > >>> loockup("location") and I expect that all the generated branches will > >>> have the bflag set, am I right? > >> never used in this way, but the normal usage is per branch and when you > do > >> it in the main route then it is just for first branch. > > It's more curiosity than need. But anyhow I'm 90% sure that if you set > > a bflag in route then it will be set for all the branches generated > > during loockup(location). > > Looked in the code and I saw that only first branch inherits the branch > flags from main route, the other takes only the value from location > records. > > Cheers, > Daniel > > > Not sure what happens in case of serial > > forking using append_branch() in failure_route... > > > > -- > Daniel-Constantin Mierla > http://www.asipto.com > > > > > ------------------------------ > > Message: 8 > Date: Mon, 25 Oct 2010 22:08:27 +0200 > From: I?aki Baz Castillo <i...@aliax.net> > Subject: Re: [SR-Users] bflag under failure_route (kamailio 1.5) > To: Daniel-Constantin Mierla <mico...@gmail.com> > Cc: SR-Users <sr-users@lists.sip-router.org> > Message-ID: > <aanlkti=iuylwaignfockgsgfne57gnn45dgrrzszo...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > 2010/10/25 Daniel-Constantin Mierla <mico...@gmail.com>: > > Looked in the code and I saw that only first branch inherits the branch > > flags from main route, the other takes only the value from location > records. > > Ok, so better to be careful with this and use blfag just under branch_route > :) > > PS: Perhaps would it make sense a constrain so setbflag(), > isbflagset() and resetbflag() cannot be used in route and > failure_route anymore? > > -- > I?aki Baz Castillo > <i...@aliax.net> > > > > ------------------------------ > > _______________________________________________ > sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > > > End of sr-users Digest, Vol 65, Issue 99 > **************************************** >
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users