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