-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Introduction
Registering a physical desk phone (Unify OpenScape CP710) is failing due to rustpbx rejecting the SIP REGISTER with authentication failed (401).
The same device is registering with asterisk and freeswitch. I have also tested other Unify OpenScape CP models, with the same results.
I can register and make calls with rustpbx using windows and android softphones without problems.
The device supports SIP over UDP, TCP and TLS protocols. Registration fails with every possible combinations with the same SIP username and password. I've also tried using IP and hostname for the connection string. All where added in the realms in proxy config.
I suspect that rustpbx/rsipstack or rsip does not parse the Digest Auth URI format in the same way as other PBX software.
###Logs
An example debug log over SIP is below, username and password are: 111
TLS:
2026-02-26T09:52:53.855975239Z DEBUG rsipstack::transport::stream: received message src=TLS 192.168.20.169:46723 raw_message=REGISTER sip:pbx.e36:5061;transport=TLS SIP/2.0
Accept: application/dls-contact-me
Via: SIP/2.0/TLS 192.168.20.169:5060;branch=z9hG4bK64964f4e5cad27a81
Max-Forwards: 70
From: "Deskphone" <sip:111@pbx.e36>;tag=a1a3406102;epid=SCde09a0
To: <sip:111@pbx.e36>
Call-ID: fd9623914bbc79b9
CSeq: 873199510 REGISTER
Authorization: Digest username="111",realm="pbx.e36",nonce="K1KmT96onZZVMvBB",uri="sip:pbx.e36:5061;transport=tls",response="0c9ba3a13fbcc4f342fd7eb9c2be6a83",algorithm=MD5
Contact: "Deskphone" <sip:111@192.168.20.169:5060;transport=tls>;expires=3600
Supported: X-Siemens-Proxy-State
User-Agent: Desk_Phone_IP_CP710_V2 R0.9.1 SIP 230221 simple-uaCSTA
X-UNIFY-Turn-addresses:
Content-Length: 0
2026-02-26T09:52:53.856377279Z INFO rustpbx::proxy::auth: Authentication failed, sending challenge from="sip:111@pbx.e36" realm="pbx.e36" status=401 Unauthorized source=TLS 192.168.20.169:5060
2026-02-26T09:52:53.856545367Z DEBUG rsipstack::transaction::transaction: transition key=s.REGISTER_873199510_fd9623914bbc79b9_a1a3406102_z9hG4bK64964f4e5cad27a81 from=Trying to=Terminated
2026-02-26T09:52:53.856568841Z DEBUG rustpbx::proxy::server: transaction processed in 355.851µs key=s.REGISTER_873199510_fd9623914bbc79b9_a1a3406102_z9hG4bK64964f4e5cad27a81 final_status=None
UDP:
2026-02-26T13:09:19.061859905Z DEBUG rsipstack::transport::udp: udp received len=756 src=192.168.20.169:5060 dest=UDP 192.168.201.31:5060 raw_message="REGISTER sip:pbx.e36:5060;transport=udp SIP/2.0\r\nAccept: application/dls-contact-me\r\nVia: SIP/2.0/UDP 192.168.20.169;branch=z9hG4bK4e23932cbd3f16ac0\r\nMax-Forwards: 70\r\nFrom: \"Deskphone\" <sip:111@pbx.e36>;tag=154c0d4567;epid=SCde09a0\r\nTo: <sip:111@pbx.e36>\r\nCall-ID: a252c85ab6870c31\r\nCSeq: 1607624514 REGISTER\r\nAuthorization: Digest username=\"111\",realm=\"pbx.e36\",nonce=\"MoLk0nzBonitjdoo\",uri=\"sip:pbx.e36:5060;transport=udp\",response=\"5a832a648a56b95f905b8db1d28d8f5b\",algorithm=MD5\r\nContact: \"Deskphone\" <sip:111@192.168.20.169:5060;transport=udp>;expires=3600\r\nSupported: X-Siemens-Proxy-State\r\nUser-Agent: Desk_Phone_IP_CP710_V2 R0.9.1 SIP 230221 simple-uaCSTA\r\nX-UNIFY-Turn-addresses: \r\nContent-Length: 0\r\n\r\n"
2026-02-26T13:09:19.062206003Z INFO rustpbx::proxy::auth: Authentication failed, sending challenge from="sip:111@pbx.e36" realm="pbx.e36" status=401 Unauthorized source=UDP 192.168.20.169:5060
2026-02-26T13:09:19.062277696Z DEBUG rsipstack::transport::udp: udp send len=449 dest=192.168.20.169:5060 src=UDP 192.168.201.31:5060 raw_message="SIP/2.0 401 Unauthorized\r\nVia: SIP/2.0/UDP 192.168.20.169;branch=z9hG4bK4e23932cbd3f16ac0;received=192.168.20.169;rport=5060\r\nFrom: \"Deskphone\" <sip:111@pbx.e36>;tag=154c0d4567;epid=SCde09a0\r\nCall-ID: a252c85ab6870c31\r\nCSeq: 1607624514 REGISTER\r\nTo: <sip:111@pbx.e36>;tag=ync3C1V1\r\nContent-Length: 0\r\nUser-Agent: rustpbx/0.3.18 (built 2026-02-21 rsipstack/0.4.7)\r\nWWW-Authenticate: Digest realm=\"pbx.e36\", nonce=\"r2BWLTb8RSnPsluy\", algorithm=MD5\r\n\r\n"
2026-02-26T13:09:19.062375178Z DEBUG rsipstack::transaction::transaction: transition key=s.REGISTER_1607624514_a252c85ab6870c31_154c0d4567_z9hG4bK4e23932cbd3f16ac0 from=Trying to=Terminated
Proxy Configuration
[proxy]
modules = ["acl", "auth", "registrar", "call"]
addr = "0.0.0.0"
udp_port = 5060
tcp_port = 5060
tls_port = 5061
registrar_expires = 60
ws_handler = "/ws"
media_proxy = "auto"
#Base directory for generated routing/trunk/ACL files
generated_dir = "./config"
routes_files = ["config/routes/*.toml"]
trunks_files = ["config/trunks/*.toml"]
realms = ["pbx.e36","192.168.201.31:5060","e36", "pbx.e36:5060", "pbx.e36:5061"]