[OpenSIPS-Devel] [ opensips-Patches-2102475 ] Add callID testing to registrar:registered()

SourceForge.net noreply at sourceforge.net
Thu Sep 17 23:00:22 CEST 2009


Patches item #2102475, was opened at 2008-09-09 21:45
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2102475&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Kobi Eshun (ekobi)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Add callID testing to registrar:registered()

Initial Comment:
Attached is a small patch to facilitate managing multiple registration instances using the same credentials. It introduces a new module AVP, reg_callid_avp. If reg_callid_avp is defined and populated when registered() is invoked, the result is TRUE only if an active registration with the specified callID is found.

We use the enhanced functionality to facilitate provisioning and management of our clients -- it allows us to reliably distinguish between new registrations and re-registration of an existing sessions.

This is an updated version of patch #1824748 submitted to OpenSER that did not get accepted until after The Fork. It includes corrections by Henning Westerholt, but omits his changes to the documentation.  Would you consider applying it to OpenSIPS?

Cheers,
--
kobi

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-09-18 00:00

Message:
I made a slightly modify version of this patch - instead of using an AVP to
pass the callid, the  "registered" function do take a third optional
parameter :
....
if (registered("location","$tu","$ci"))
      setsflag(SFLAG_IS_REGISTERED);
else
     resetsflag(SFLAG_IS_REGISTERED);
...


Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Kobi Eshun (ekobi)
Date: 2009-09-17 21:22

Message:
Bogdan,

I pull the callID straight from the REGISTER request.

Cheers,
--
kobi

avp_aliases = "
	reg_aor_avp=i:988;
	reg_callid_avp=i:989;
...
"
...
modparam("registrar", "aor_avp", "$avp(i:988)")
modparam("registrar", "reg_callid_avp", "$avp(i:989)")

...
route
{
...
	if (is_method("REGISTER")) {
...
		$avp(reg_aor_avp)=$tu;
		$avp(reg_callid_avp)=$ci;
		if (registered("location"))
			setsflag(SFLAG_IS_REGISTERED);
		else 
			resetsflag(SFLAG_IS_REGISTERED);
...
    };
}

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-09-17 15:22

Message:
Kobi, the value you pass in the AVP (the callid to check) - where do you
get it from (I'm from scenario point of view) ?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2102475&group_id=232389



More information about the Devel mailing list