[OpenSIPS-Users] PAID not in resent INVITE from Failure Block

Răzvan Crainea razvan at opensips.org
Tue Mar 7 09:58:13 UTC 2023


Hi, Richard!

When a transaction is created, either by t_newtran(), either by using a 
function that internally creates it, the request message, along with its 
changes are stored/cloned in the transaction. When failure_route is run, 
you are actually seeing the message stored in the transaction. This 
essentially means that if the headers had been added *after* the 
transaction was created, you will not be able to access them in failure 
route.
Of course, Ben is right as well - if you are adding the headers in the 
branch route, you will not see them in a different branch. And half of 
the reason is similar to the one above: when the transaction is created 
(i.e. by t_relay()), the request message is cloned in transaction, then 
branch routes are executed. Whatever change you make per branch, they 
are stored in each branch's structure (not in the message itself). 
Hence, when the failure route is executed, you will get the message 
cloned when the transaction was created (before branch routes are even 
executed).
Hope this helps you identify missing headers in failure route :)

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 2/24/23 17:14, Ben Newlin wrote:
> Richard,
> 
> Are you by chance adding the PAID/RPID headers in a branch route? 
> Changes to a SIP message made in a branch route exist only in that 
> branch, and will not be present in the failure route.
> 
> Ben Newlin
> 
> *From: *Users <users-bounces at lists.opensips.org> on behalf of Richard 
> Robson <richard.robson at 8x8.com>
> *Date: *Friday, February 24, 2023 at 6:58 AM
> *To: *users at lists.opensips.org <users at lists.opensips.org>
> *Subject: *[OpenSIPS-Users] PAID not in resent INVITE from Failure Block
> 
> * EXTERNAL EMAIL - Please use caution with links and attachments *
> 
> ------------------------------------------------------------------------
> 
> I have an OpenSIPS 2.3 instance, where we are sending a call to the next 
> hop and are receiving a 403 forbidden. This is expected and we need to 
> update the from or to header and resend the call to the same destination 
> whish will accept this. we do not make any other changed in the failure 
> route, nor want to.
> 
> This is working, however, the additional PAID and RPID headers, which 
> were added by OpenSIPs before the INVITE was t_relayed are missing from 
> the updated INVITE, ( the from header is modified.)
> 
> The documentation implies that the headers should be there:
> 
> *Processing* : the original SIP request (that was sent out)
> 
> There is nothing in the failure route to cause the headers to be dropped.
> 
> Therefore is this by design? i.e. additional headers are dropped and 
> need to be re-applied, they are missing because the 403 did not contain 
> them or is this a bug and the headers should be there?
> 
> INVITE (with PAID & RPID  headers) ->
> 
> <- 403 forbidden (no PAID or RPID)
> 
> INVITE (no PAID & RPID  headers) ->   (this just has the from header 
> modified)
> 
> Regards, Richard
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list