From cb76edccf69abaa400e4dcf1f075de02c4e6e0cc Mon Sep 17 00:00:00 2001 From: Emir Aganovic Date: Sun, 29 Oct 2023 20:26:30 +0100 Subject: [PATCH] fix: psip update readme --- psip/README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/psip/README.md b/psip/README.md index 80fc133..56ec267 100644 --- a/psip/README.md +++ b/psip/README.md @@ -85,7 +85,8 @@ With this simple logic proxy builder can do: - Digest auth out of box - Dialog routing out of box -## Inbound Outbound targets +## Building proxy options +### Inbound Outbound targets Here how to configure proxy inbound/outbound targets. @@ -107,6 +108,26 @@ WithProxyOutboundTarget( 0.5 // In case multiple matching carrier < 1.0 request is loadbalanced ) ``` + +### Running as registrar + +```go + +store := NewRegistryMemory() +WithProxyRegistry(store) +``` +`WithProxyRegistry` receives interface so any external database can be implemented. +In this case `RelayRequest` will call internal registry handler + +### Presence + +```go + +presence := NewUserPresenceMemory() +WithProxyUserPresence(presence) +``` +SUBSCRIBE and NOTIFY will be handled by local presence service +In this case `RelayRequest` will call internal presence handler ## RelayRequest `RelayRequest` flow: