Topology Hiding Presence Proxy

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Topology Hiding Presence Proxy

Nathan Baker
Hello,

I have been looking for some examples on how to use the topology hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to how the mid_registrar module would handle registrations.  Does anyone have any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to another presence server), but I'm not sure how to store the subscriptions and how to route the presence messages.  For registrations you can just do save("location"), but is there an equivalent for subscriptions/presence?  It seems like the handle_subscribe() function from the presence module wouldn't apply because it's part of a presence server, or can you just use it for storing subscriptions but never publish anything?  I don't see a function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Topology Hiding Presence Proxy

Bogdan-Andrei Iancu-2
Hi Nathan,

Based on your description you do not want topology-hiding (to simply hide IPs from the end-points), but a mid-presence agent, right ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 11/17/2017 08:13 AM, Nathan Baker wrote:
Hello,

I have been looking for some examples on how to use the topology hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to how the mid_registrar module would handle registrations.  Does anyone have any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to another presence server), but I'm not sure how to store the subscriptions and how to route the presence messages.  For registrations you can just do save("location"), but is there an equivalent for subscriptions/presence?  It seems like the handle_subscribe() function from the presence module wouldn't apply because it's part of a presence server, or can you just use it for storing subscriptions but never publish anything?  I don't see a function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Topology Hiding Presence Proxy

Nathan Baker
Hi Bogdan,

Yes, I think that's correct, although I didn't see any module that would implement a mid-presence agent.  I don't so much need to hide IPs, but I do need to change the Contact header, so I started using topology_hiding for that since it has it built in.  I originally tried to use mid_registrar but stopped for now because it doesn't store locations in the database and doesn't support presence (yet).  Any insight or suggestions would be greatly appreciated, I would basically be fine with a B2BUA if there was one that did forward registrations and presence.

Thanks,
Nate


On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu" <[hidden email]> wrote:
Hi Nathan,

Based on your description you do not want topology-hiding (to simply hide IPs from the end-points), but a mid-presence agent, right ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 11/17/2017 08:13 AM, Nathan Baker wrote:
Hello,

I have been looking for some examples on how to use the topology hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to how the mid_registrar module would handle registrations.  Does anyone have any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to another presence server), but I'm not sure how to store the subscriptions and how to route the presence messages.  For registrations you can just do save("location"), but is there an equivalent for subscriptions/presence?  It seems like the handle_subscribe() function from the presence module wouldn't apply because it's part of a presence server, or can you just use it for storing subscriptions but never publish anything?  I don't see a function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Topology Hiding Presence Proxy

Nathan Baker
I just wanted to follow up on this one more time with some additional details.  In the topology hiding tutorial (http://www.opensips.org/Documentation/Tutorials-Topology-Hiding) it mentions that presence dialogs should be supported on top of the TM module:

"When running strictly on top of the TM module, the topology hiding SIP messages will be bigger when compared to the initial requests ( since OpenSIPS will encode all the needed information in a parameter of the Contact header ), but all type of SIP requests and dialogs will be supported ( INVITE dialogs, Presence dialogs, SIP MESSAGE, etc )."

When I attempt to do this, the SUBSCRIBE works fine, but when the NOTIFY comes back from the server I get errors when it does the topology_hiding_match(), usually something like:

ERROR:core:parse_params: invalid character, ; expected, found o
ERROR:core:do_parse_rr_body: failed to parse params
ERROR:core:do_parse_rr_body: failed to parse RR headers
ERROR:topology_hiding:topo_no_dlg_seq_handling: failed parsing route set

I can see the th_contact_encode_param value in the request URI, but there is no route set in the NOTIFY message.  Is it expecting that there is one?  I guess I need to turn on debugging or dig into the topology hiding module code to see what's causing the errors.  Any help would be greatly appreciated!

Thanks,
Nate


On Fri, Nov 17, 2017 at 8:57 AM, Nathan Baker <[hidden email]> wrote:
Hi Bogdan,

Yes, I think that's correct, although I didn't see any module that would implement a mid-presence agent.  I don't so much need to hide IPs, but I do need to change the Contact header, so I started using topology_hiding for that since it has it built in.  I originally tried to use mid_registrar but stopped for now because it doesn't store locations in the database and doesn't support presence (yet).  Any insight or suggestions would be greatly appreciated, I would basically be fine with a B2BUA if there was one that did forward registrations and presence.

Thanks,
Nate


On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu" <[hidden email]> wrote:
Hi Nathan,

Based on your description you do not want topology-hiding (to simply hide IPs from the end-points), but a mid-presence agent, right ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 11/17/2017 08:13 AM, Nathan Baker wrote:
Hello,

I have been looking for some examples on how to use the topology hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to how the mid_registrar module would handle registrations.  Does anyone have any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to another presence server), but I'm not sure how to store the subscriptions and how to route the presence messages.  For registrations you can just do save("location"), but is there an equivalent for subscriptions/presence?  It seems like the handle_subscribe() function from the presence module wouldn't apply because it's part of a presence server, or can you just use it for storing subscriptions but never publish anything?  I don't see a function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Topology Hiding Presence Proxy

Bogdan-Andrei Iancu-2
In reply to this post by Nathan Baker
Hi Nate,

If you just need to change the Contact hdr, the topology-hiding will do the job - have you tried to simply use the the topology_hiding() function when routing the initial SUBSCRIBE request ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 11/17/2017 03:57 PM, Nathan Baker wrote:
Hi Bogdan,

Yes, I think that's correct, although I didn't see any module that would implement a mid-presence agent.  I don't so much need to hide IPs, but I do need to change the Contact header, so I started using topology_hiding for that since it has it built in.  I originally tried to use mid_registrar but stopped for now because it doesn't store locations in the database and doesn't support presence (yet).  Any insight or suggestions would be greatly appreciated, I would basically be fine with a B2BUA if there was one that did forward registrations and presence.

Thanks,
Nate


On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu" <[hidden email]> wrote:
Hi Nathan,

Based on your description you do not want topology-hiding (to simply hide IPs from the end-points), but a mid-presence agent, right ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 11/17/2017 08:13 AM, Nathan Baker wrote:
Hello,

I have been looking for some examples on how to use the topology hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to how the mid_registrar module would handle registrations.  Does anyone have any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to another presence server), but I'm not sure how to store the subscriptions and how to route the presence messages.  For registrations you can just do save("location"), but is there an equivalent for subscriptions/presence?  It seems like the handle_subscribe() function from the presence module wouldn't apply because it's part of a presence server, or can you just use it for storing subscriptions but never publish anything?  I don't see a function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Topology Hiding Presence Proxy

Bogdan-Andrei Iancu-2
In reply to this post by Nathan Baker
Hi Nate,

I missed this update from you - you did what I just asked in my last email :).

Could you share (off-line if needed) the pcap for SUBSCRIBE+NOTIFY and the opensips logs in debug level ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 11/20/2017 08:57 PM, Nathan Baker wrote:
I just wanted to follow up on this one more time with some additional details.  In the topology hiding tutorial (http://www.opensips.org/Documentation/Tutorials-Topology-Hiding) it mentions that presence dialogs should be supported on top of the TM module:

"When running strictly on top of the TM module, the topology hiding SIP messages will be bigger when compared to the initial requests ( since OpenSIPS will encode all the needed information in a parameter of the Contact header ), but all type of SIP requests and dialogs will be supported ( INVITE dialogs, Presence dialogs, SIP MESSAGE, etc )."

When I attempt to do this, the SUBSCRIBE works fine, but when the NOTIFY comes back from the server I get errors when it does the topology_hiding_match(), usually something like:

ERROR:core:parse_params: invalid character, ; expected, found o
ERROR:core:do_parse_rr_body: failed to parse params
ERROR:core:do_parse_rr_body: failed to parse RR headers
ERROR:topology_hiding:topo_no_dlg_seq_handling: failed parsing route set

I can see the th_contact_encode_param value in the request URI, but there is no route set in the NOTIFY message.  Is it expecting that there is one?  I guess I need to turn on debugging or dig into the topology hiding module code to see what's causing the errors.  Any help would be greatly appreciated!

Thanks,
Nate


On Fri, Nov 17, 2017 at 8:57 AM, Nathan Baker <[hidden email]> wrote:
Hi Bogdan,

Yes, I think that's correct, although I didn't see any module that would implement a mid-presence agent.  I don't so much need to hide IPs, but I do need to change the Contact header, so I started using topology_hiding for that since it has it built in.  I originally tried to use mid_registrar but stopped for now because it doesn't store locations in the database and doesn't support presence (yet).  Any insight or suggestions would be greatly appreciated, I would basically be fine with a B2BUA if there was one that did forward registrations and presence.

Thanks,
Nate


On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu" <[hidden email]> wrote:
Hi Nathan,

Based on your description you do not want topology-hiding (to simply hide IPs from the end-points), but a mid-presence agent, right ?

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
On 11/17/2017 08:13 AM, Nathan Baker wrote:
Hello,

I have been looking for some examples on how to use the topology hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to how the mid_registrar module would handle registrations.  Does anyone have any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to another presence server), but I'm not sure how to store the subscriptions and how to route the presence messages.  For registrations you can just do save("location"), but is there an equivalent for subscriptions/presence?  It seems like the handle_subscribe() function from the presence module wouldn't apply because it's part of a presence server, or can you just use it for storing subscriptions but never publish anything?  I don't see a function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users