How to get timeout parameter sent by a gateway

This is my first post here

I have an Asterisk Box (A) configured to handle traffic received from other SIP gateways (B). The box basically reroutes traffic to another SIP gateway©.

The Gateway B sends timeout values to Asterisk (A).

My problem is how do I read the parameters sent by B to A.

This is what Gateway (B) sends to Asterisk A.

I need to retrieve the timeout value 852 and pass on to Gateway C.

Is there any variable like ${EXTN} or something that stores the timeout parameter in A ?

thanks for you help


I have been trying to use function:

But nothing is working for me.

I don’t see those parameters in SIP headers ( with sip debug turned on).

So I was wondering if those paramters are passed via SIP headers or in a different way.

I will be glad if someone could point me to right direction…