This started working - but the problem is that it's matching both sides of the conversation. I'm searching for a concrete method to say "only if you're going to send this packet to the upstream provider" but the closest I found was "is_destination" which has to be called from loose_route, and unfortunately it looks like we don't have any HF setup for this particular situation, so loose_route always returns 0 and exits (confirmed in the logs).<div>
<br></div><div>The provider won't let me add stuff - maybe I can just add stuff one-way then rip it off on the return? </div><div><br></div><div><div>if (is_method("INVITE") && status=="200" && $(ct.fields(uri){s.substr,4,12}) !~ '^8150*') {</div>
<div> xlog("L_INFO", "Modifying the outbound Contact header to Carrier... $(ct.fields(uri){s.substr,5,12})");</div><div> subst('/^Contact:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/Contact: <sip:$avp(oriUri)@<a href="http://192.168.0.2">192.168.0.2</a>>/ig');</div>
}</div><div><br></div><div>Any tips?</div><div><br><div class="gmail_quote">On Mon, Feb 7, 2011 at 11:19 AM, Tyler Merritt <span dir="ltr"><<a href="mailto:tyler@fonality.com">tyler@fonality.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have used "if (status=="100")" and "if (is_method("TRYING"))" and placed these in a variety of places, at the top of route[0], in route[1], in onreply_route (where it actually works), but nowhere can I get the OUTGOING 100 TRYING packet to change...
<div><br></div><div>I can't figure this out - there isn't very good documentation surrounding this particular packet, and if I were to guess, I would say that the method is hard-coded somewhere in the routing module. </div>
<div><br></div><div>Any pointers on where this packet might be modified before sending it to the upstream provider would be welcome. </div>
</blockquote></div><br></div>