Dave,<div><br></div><div>Thanks for your reply. I see you reply a lot and I appreciate you taking the time to help us.</div><div><br></div><div>I read the page you linked - and I've stumbled across that before, but it's not what I want to do sadly :(</div>
<div><br></div><div>The carrier basically wants me to strip the "Server" header from the 100 message. That's it - if this message went through the routing logic, I could just "remove_hf("Server");" but alas...</div>
<div><br></div><div>I've told them this is a no-go for now. Seems that we would have to modify the OpenSIPs core to make it happen. Not worth the time or effort for this reason.<br>
<br><br><div class="gmail_quote">On Tue, Feb 8, 2011 at 3:10 AM, Dave Singer <span dir="ltr"><<a href="mailto:dave.singer@wideideas.com">dave.singer@wideideas.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The 100 Trying is sent out to the originating server/user<br>
automatically when you send the invite off to the next destination<br>
with t_relay and exit in the main routing script.<br>
The 100 Trying you receive in the on_reply is just to let you know<br>
that the next hop is not dead and it is working on it. Your server<br>
only uses it for it's timeout for the call to that server.<br>
See the optional flags in the t_relay docs:<br>
<a href="http://www.opensips.org/html/docs/modules/1.4.x/tm.html#id271564" target="_blank">http://www.opensips.org/html/docs/modules/1.4.x/tm.html#id271564</a><br>
That should get you going.<br>
FYI if (is_method("TRYING")) would always be false since the method is<br>
INVITE and the status message would be Trying or "Giving a try" or<br>
something else. Never count on the status message, just the code.<br>
Different servers send back different messages. Unless you are<br>
factoring that in.<br>
I think you actually might be looking for fix_nated_contact. Check<br>
that out. Depends on what you are trying to accomplish.<br>
<br>
Dave<br>
<div><div></div><div class="h5"><br>
On Mon, Feb 7, 2011 at 3:48 AM, Tyler Merritt <<a href="mailto:tyler@fonality.com">tyler@fonality.com</a>> wrote:<br>
> This started working - but the problem is that it's matching both sides of<br>
> the conversation. I'm searching for a concrete method to say "only if<br>
> you're going to send this packet to the upstream provider" but the closest I<br>
> found was "is_destination" which has to be called from loose_route, and<br>
> unfortunately it looks like we don't have any HF setup for this particular<br>
> situation, so loose_route always returns 0 and exits (confirmed in the<br>
> logs).<br>
> The provider won't let me add stuff - maybe I can just add stuff one-way<br>
> then rip it off on the return?<br>
> if (is_method("INVITE") && status=="200" && $(ct.fields(uri){s.substr,4,12})<br>
> !~ '^8150*') {<br>
> xlog("L_INFO", "Modifying the outbound<br>
> Contact header to Carrier... $(ct.fields(uri){s.substr,5,12})");<br>
><br>
> subst('/^Contact:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/Contact:<br>
> <sip:$avp(oriUri)@<a href="http://192.168.0.2" target="_blank">192.168.0.2</a>>/ig');<br>
> }<br>
> Any tips?<br>
> On Mon, Feb 7, 2011 at 11:19 AM, Tyler Merritt <<a href="mailto:tyler@fonality.com">tyler@fonality.com</a>> wrote:<br>
>><br>
>> I have used "if (status=="100")" and "if (is_method("TRYING"))" and placed<br>
>> these in a variety of places, at the top of route[0], in route[1], in<br>
>> onreply_route (where it actually works), but nowhere can I get the OUTGOING<br>
>> 100 TRYING packet to change...<br>
>> I can't figure this out - there isn't very good documentation surrounding<br>
>> this particular packet, and if I were to guess, I would say that the method<br>
>> is hard-coded somewhere in the routing module.<br>
>> Any pointers on where this packet might be modified before sending it to<br>
>> the upstream provider would be welcome.<br>
><br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
</blockquote></div><br></div>