[OpenSIPS-Users] Provisional response handling in case of forking

Ramachandran, Agalya (Contractor) Agalya_Ramachandran at comcast.com
Mon Jun 13 21:48:40 CEST 2016


Hi Bogdan,

OK. Got it. One more to question to understand the snippet you gave..
I have just commented my understanding of each snippet at the same line.
I don't get why we need setflag(FLAG_180); after we drop the response.

if ($rs==180) { //We are checking response is equal to 180
    if (isflagset(FLAG_180)) // Checking the flag is set or not. If response is 180, flag will be set
        drop();             //If set we are dropping the consecutive same response.
    setflag(FALG_180); ??
}


(P.S) I tested without setting the flag after drop response. In this case it forwards both 180 response back to caller.
Am curious how it controls it.

Is onreply_avp_mode controls dropping the 2nd response or setflag(FLAG_180);?

I want to be clear on what am working with. Hence posting you this question.


Regards,
Agalya

From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
Sent: Monday, June 13, 2016 12:13 PM
To: Ramachandran, Agalya (Contractor) <Agalya_Ramachandran at comcast.com>; OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Provisional response handling in case of forking

Hi Agalya,

It is not a predefine flag. And you do not have to define the flags in OpenSIPS. Just pickup a name and start using it in script.

Regards,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 13.06.2016 17:27, Ramachandran, Agalya (Contractor) wrote:
Hi Bogdan,

Thank you for your kind response. I will try the logic you told me. But I have a question in the below logic.
"FLAG_180", is this something declared and maintained by opensips and set by default on its own if Ringing response is received or we need to define this flag explicitly ?

E.g for setting NAT flag, we are using 'usrloc' module and 'nat_bflag' as parameter and then value.
modparam("usrloc", "nat_bflag", "NAT")

Likewise if we need to define explicitly, what is the module in which we need to define the flag for FLAG_180?

Regards,
Agalya
From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
Sent: Monday, June 13, 2016 6:31 AM
To: OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at lists.opensips.org>; Ramachandran, Agalya (Contractor) <Agalya_Ramachandran at comcast.com><mailto:Agalya_Ramachandran at comcast.com>
Subject: Re: [OpenSIPS-Users] Provisional response handling in case of forking

Hi Agalya,

Use the onreply route (be sure to onreply_avp_mode to be set to 1 - see http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id294290) in combination with flags, to record when the an 180 reply was set.

Like:

if ($rs==180) {
    if (isflagset(FLAG_180))
        drop();
    setflag(FALG_180);
}

The onreply_avp_mode 1 will ensure that the onreply route will not overlap for 2 replies .

Regards,



Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 10.06.2016 23:07, Ramachandran, Agalya (Contractor) wrote:
Hi team,

We are using opensips for our project and we are currently using opensips as proxy.
Am forking the incoming sip call, to two destinations. It Rings in both Dest A and Dest B, as a result I get two 180 Ringing response from A and B.
I want to filter only the first incoming 180 Ringing response and send to the actual caller. Is there a way to do this in opensips config file?

I have seen drop() function which drops the complete provisional response. But in my case I have to forward one 180 Ringing to the caller.
Can it be achieved by the changes in config file? Please guide me.

Regards,
Agalya






_______________________________________________

Users mailing list

Users at lists.opensips.org<mailto:Users at lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160613/0ce59310/attachment-0001.htm>


More information about the Users mailing list