[OpenSIPS-Users] How to modify the 100 Trying packet

Tyler Merritt tyler at fonality.com
Mon Feb 7 12:48:28 CET 2011


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 <tyler at fonality.com> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110207/50a7c44d/attachment.htm>


More information about the Users mailing list