[OpenSIPS-Devel] [ opensips-Patches-2123828 ] registrar: new AVP to add extra headers to the REGISTER repl

SourceForge.net noreply at sourceforge.net
Tue Sep 30 11:34:34 CEST 2008


Patches item #2123828, was opened at 2008-09-23 05:49
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2123828&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: Open
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Phil Vandry (vandry)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: registrar: new AVP to add extra headers to the REGISTER repl

Initial Comment:
This patch adds the ability to add custom headers to the successful reply to a REGISTER request.

The user must load the extra headers into an AVP from the request route before calling save(). During the construction of the 200 OK reply inside save() this AVP is consulted and its contents are inserted into the reply.

Motivating use case:

In IMS environments, the SIP registrar supplies the terminal with a list of PUIs (public user identities) that are associated with the registering endpoint. This list is passed in the reply to a successful REGISTER by the endpoint as a list of "P-Associated-URI" headers.

In OpenSIPS there is no existing general way to customize the reply to a REGISTER request.

The patch is for opensips-1.4.1-tls

-Phil

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

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-09-30 12:34

Message:
Hi Phil,

If I understand correctly what you try to achieve, I would say you 
already can do it -  before  doing save("location") you can do 
append_to_reply("P-Associated-URI: ..................\r\n");  - this new 
header will be added to the reply generated by the save() function.

Please let me know if I'm missing something.

Thanks and regards,
Bogdan

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

Comment By: Phil Vandry (vandry)
Date: 2008-09-26 03:24

Message:
Thank you for your suggestion. I didn't know about append_to_reply().

I tried your method but it has a big drawback: there is no Contact header
generated in the REGISTER reply. One of the functions of the builtin reply
function of save() is to generate the Contact header. Using your method I
would have to somehow build the Contact header manually, which means
querying the usrloc database and iterating over each contact with its
expiry time and q value and formatting them. I definitely expect the
registrar module to do all that work for me.

So I maintain that there is a requirement for a method of taking advantage
of save()'s builtin reply generator while still adding extra headers.

-Phil

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

Comment By: Nobody/Anonymous (nobody)
Date: 2008-09-23 13:08

Message:
I just wonder if save_no_reply(), append_to_reply() and
sl_send_reply("200","")
does not work

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

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



More information about the Devel mailing list