- Joined
- Sep 7, 2024
- Messages
- 2
- Reaction score
- 0
Hi all,
I build up 3cx on cloud, and setting extension 1003 username and password. but I can't login my extension by SIP.
```
Raw:
b'SIP/2.0 403 Invalid credentials\r\nVia: SIP/2.0/UDP 10.0.0.5:5060;branch=z9hG4bKdfbeb6c54bbd477b81da1c5c4;rport=5060;received=x.x.x.x\r\nTo: "1003"<sip:[email protected]>;tag=f8aef86a\r\nFrom: "1003" <sip:[email protected]>;tag=94f95b5b\r\nCall-ID: [email protected]:5060\r\nCSeq: 6 REGISTER\r\nContent-Length: 0\r\n\r\n'
Status: 403 Forbidden
Headers:
Via: [{'type': 'SIP/2.0/UDP', 'address': ('10.0.0.5', '5060'), 'branch': 'z9hG4bKdfbeb6c54bbd477b81da1c5c4', 'rport': '5060', 'received': 'x,x,x,x'}]
To: {'raw': '"1003"<sip:[email protected]>', 'tag': 'f8aef86a', 'address': '[email protected]', 'number': '1003', 'caller': '1003', 'host': 'xxx.3cx.com.tw'}
From: {'raw': '"1003" <sip:[email protected]>', 'tag': '94f95b5b', 'address': '[email protected]', 'number': '1003', 'caller': '1003" ', 'host': 'xxx.3cx.com.tw'}
Call-ID: [email protected]:5060
CSeq: {'check': '6', 'method': 'REGISTER'}
Content-Length: 0
Body:
Raw:
b'SIP/2.0 403 Invalid credentials\r\nVia: SIP/2.0/UDP 10.0.0.5:5060;branch=z9hG4bKdfbeb6c54bbd477b81da1c5c4;rport=5060;received=x.x.x.x\r\nTo: "1003"<sip:[email protected]>;tag=f8aef86a\r\nFrom: "1003" <sip:[email protected]>;tag=94f95b5b\r\nCall-ID: [email protected]:5060\r\nCSeq: 6 REGISTER\r\nContent-Length: 0\r\n\r\n'
```
pyVoip
serverIP = "xxxx.3cx.com.tw"
serverPort = 5060
username = "1003"
password = "xxxxx"
hostIP="10.0.0.5"
auth_username = "1003"
vp = VoIPPhone(serverIP, serverPort, username, password,callCallback=answer,auth_username=auth_username,myIP=hostIP)
vp.start()
print(vp._status)
input("Press any key to exist")
vp.stop()
```
I use proxy authentication version on below
https://github.com/tayler6000/pyVoIP/pull/216
I build up 3cx on cloud, and setting extension 1003 username and password. but I can't login my extension by SIP.
```
Raw:
b'SIP/2.0 403 Invalid credentials\r\nVia: SIP/2.0/UDP 10.0.0.5:5060;branch=z9hG4bKdfbeb6c54bbd477b81da1c5c4;rport=5060;received=x.x.x.x\r\nTo: "1003"<sip:[email protected]>;tag=f8aef86a\r\nFrom: "1003" <sip:[email protected]>;tag=94f95b5b\r\nCall-ID: [email protected]:5060\r\nCSeq: 6 REGISTER\r\nContent-Length: 0\r\n\r\n'
Status: 403 Forbidden
Headers:
Via: [{'type': 'SIP/2.0/UDP', 'address': ('10.0.0.5', '5060'), 'branch': 'z9hG4bKdfbeb6c54bbd477b81da1c5c4', 'rport': '5060', 'received': 'x,x,x,x'}]
To: {'raw': '"1003"<sip:[email protected]>', 'tag': 'f8aef86a', 'address': '[email protected]', 'number': '1003', 'caller': '1003', 'host': 'xxx.3cx.com.tw'}
From: {'raw': '"1003" <sip:[email protected]>', 'tag': '94f95b5b', 'address': '[email protected]', 'number': '1003', 'caller': '1003" ', 'host': 'xxx.3cx.com.tw'}
Call-ID: [email protected]:5060
CSeq: {'check': '6', 'method': 'REGISTER'}
Content-Length: 0
Body:
Raw:
b'SIP/2.0 403 Invalid credentials\r\nVia: SIP/2.0/UDP 10.0.0.5:5060;branch=z9hG4bKdfbeb6c54bbd477b81da1c5c4;rport=5060;received=x.x.x.x\r\nTo: "1003"<sip:[email protected]>;tag=f8aef86a\r\nFrom: "1003" <sip:[email protected]>;tag=94f95b5b\r\nCall-ID: [email protected]:5060\r\nCSeq: 6 REGISTER\r\nContent-Length: 0\r\n\r\n'
```
pyVoip
serverIP = "xxxx.3cx.com.tw"
serverPort = 5060
username = "1003"
password = "xxxxx"
hostIP="10.0.0.5"
auth_username = "1003"
vp = VoIPPhone(serverIP, serverPort, username, password,callCallback=answer,auth_username=auth_username,myIP=hostIP)
vp.start()
print(vp._status)
input("Press any key to exist")
vp.stop()
```
I use proxy authentication version on below
https://github.com/tayler6000/pyVoIP/pull/216