< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate-users] Proxying Registrations with a B2BUA


I know this is pretty late, but here's an answer.

It sounds like a B2BUA isn't exactly suited to what you're trying to do; it seems that having a simple proxy would be the way to go here. DUM's ServerRegistration assumes that it is performing the role of registrar, and DUM's CLientRegistration assumes that it is performing the role of an endpoint (ie, it will automatically send refreshes). You would have a few problems to work around in order to do this with DUM:

1) In order to have digest challenges work, you have to find a way to put the Authorization headers from the upstream 407 into the downstream 407. Calling ServerRegistration::reject() allows you to send a 407, but provides no opportunity to put any headers in the response. DialogUsage::onReadyToSend() allows you to have a crack at every outgoing message, but ServerRegistration is not a DialogUsage, so you don't have this tool. This is probably your biggest problem.

2) ServerRegistration uses an instance of RegistrationPersistenceManager to fill out the Contacts in any REGISTER/200 response it sends. Getting ServerRegistration to put the contacts that your B2BUA received for the forwarded REGISTER would probably involve temporarily writing those contacts to your impl of RegistrationPersistenceManager, so that the ServerRegistration can use them, and then calling ServerRegistration::accept().

3) ClientRegistration is geared towards automatically sending refreshes (you'd basically have to create it, and then destroy it as soon as the response comes in, or you'd end up sending refreshes of the forwarded REGISTER!). This wouldn't be particularly hard, really.

In the end, I would certainly recommend doing this with a proxy (I'm pretty sure repro could do this if you disabled the registrar functionality).

Best regards,
Byron Campen

 

Hi,  

 

I am writing a SIP server that is a B2BUA.

I will configure UAs to point to my server as an outbound proxy.

So my server will receive REGISTERs from UAs, rewrite Via and Contact header-fields and forward them to the domain SIP Registrar.

My B2BUA is not a registrar, I am doing this so any future incoming INVITEs reach B2BUA instead of getting to the UAs.

      

 

Flow below shows what I need. Symbol “*” means a rewrite of parts of a SIP message as it is forwarded:

 

UA                      B2BUA(my app)                  REGISTRAR  

                                                                   

|           REGISTER          ||                             |     

|--------------------------->>||           REGISTER*         |     

|                             ||--------------------------->>|     

|                             ||                             |     

|                             ||   407 Proxy Auth.Required   |     

|                             ||<<---------------------------|     

|   407 Proxy Auth.Required   ||                             |     

|<<---------------------------||                             |     

|                             ||                             |     

|           REGISTER          ||                             |     

|--------------------------->>||                             |     

|                             ||           REGISTER*         |     

|                             ||--------------------------->>|     

|                             ||                             |     

|                             ||            200 OK           |      

|                             ||<<---------------------------|      

|            200 OK           ||                             |     

|<<---------------------------||                             |     

|                             ||                             |     

 

 

I am using DUM for the B2BUA and I wonder if someone has some clues of what and where to do in reciprocate/my B2BUA to achieve that.

Can it be done by merely subclassing stack/DUM classes or will I need to rewrite stack/DUM classes ?

 

 

Thank you all,

Julio Cabezas

 

 

 

_______________________________________________
resiprocate-users mailing list

Attachment: smime.p7s
Description: S/MIME cryptographic signature