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).

The provider won't let me add stuff - maybe I can just add stuff one-way
then rip it off on the return?

if (is_method("INVITE") && status=="200" && $(ct.fields(uri){s.substr,4,12})
!~ '^8150*') {
                                xlog("L_INFO", "Modifying the outbound
Contact header to Carrier...  $(ct.fields(uri){s.substr,5,12})");

 subst('/^Contact:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/Contact:
<sip:$avp(oriUri)@192.168.0.2>/ig');
}

Any tips?

On Mon, Feb 7, 2011 at 11:19 AM, Tyler Merritt <[email protected]> wrote:

> 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...
>
> 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.
>
> Any pointers on where this packet might be modified before sending it to
> the upstream provider would be welcome.
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to