Skip to content

Commit 1e3633a

Browse files
committed
fix: replace 0.0.0.0/0 with RFC 5737 TEST-NET-3 range (203.0.113.0/24)
Replace all occurrences of 0.0.0.0/0 in test fixtures, test code, and README with the documentation-safe 203.0.113.0/24 range per RFC 5737.
1 parent 942e6a0 commit 1e3633a

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ from didww.resources.voice_out_trunk import VoiceOutTrunk
257257

258258
trunk = VoiceOutTrunk()
259259
trunk.name = "My Outbound Trunk"
260-
trunk.allowed_sip_ips = ["0.0.0.0/0"]
260+
trunk.allowed_sip_ips = ["203.0.113.0/24"]
261261
trunk.default_dst_action = DefaultDstAction.ALLOW_ALL
262262
trunk.on_cli_mismatch_action = OnCliMismatchAction.REJECT_CALL
263263
created = client.voice_out_trunks().create(trunk).data

tests/fixtures/voice_out_trunks/create.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ interactions:
22
- request:
33
body: '{"data": {"type": "voice_out_trunks", "attributes": {"name": "python-test",
44
"on_cli_mismatch_action": "replace_cli", "authentication_method": {"type": "ip_only",
5-
"attributes": {"allowed_sip_ips": ["0.0.0.0/0"], "tech_prefix": ""}}}, "relationships":
5+
"attributes": {"allowed_sip_ips": ["203.0.113.0/24"], "tech_prefix": ""}}}, "relationships":
66
{"default_did": {"data": {"type": "dids", "id": "7a028c32-e6b6-4c86-bf01-90f901b37012"}},
77
"dids": {"data": [{"type": "dids", "id": "7a028c32-e6b6-4c86-bf01-90f901b37012"}]}}}}'
88
headers:
@@ -23,7 +23,7 @@ interactions:
2323
false, "threshold_amount": null, "media_encryption_mode": "disabled", "default_dst_action":
2424
"allow_all", "dst_prefixes": [], "force_symmetric_rtp": false, "rtp_ping":
2525
false, "callback_url": null, "authentication_method": {"type": "ip_only",
26-
"attributes": {"allowed_sip_ips": ["0.0.0.0/0"], "tech_prefix": ""}}}, "relationships":
26+
"attributes": {"allowed_sip_ips": ["203.0.113.0/24"], "tech_prefix": ""}}}, "relationships":
2727
{"default_did": {"links": {"self": "https://sandbox-api.didww.com/v3/voice_out_trunks/b60201c1-21f0-4d9a-aafa-0e6d1e12f22e/relationships/default_did",
2828
"related": "https://sandbox-api.didww.com/v3/voice_out_trunks/b60201c1-21f0-4d9a-aafa-0e6d1e12f22e/default_did"}},
2929
"dids": {"links": {"self": "https://sandbox-api.didww.com/v3/voice_out_trunks/b60201c1-21f0-4d9a-aafa-0e6d1e12f22e/relationships/dids",

tests/fixtures/voice_out_trunks/list.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interactions:
3232
"threshold_reached": false, "threshold_amount": null, "media_encryption_mode":
3333
"disabled", "default_dst_action": "allow_all", "dst_prefixes": [], "force_symmetric_rtp":
3434
false, "rtp_ping": false, "callback_url": null, "authentication_method": {"type":
35-
"credentials_and_ip", "attributes": {"allowed_sip_ips": ["0.0.0.0/0"], "tech_prefix":
35+
"credentials_and_ip", "attributes": {"allowed_sip_ips": ["203.0.113.0/24"], "tech_prefix":
3636
"", "username": "50fb4hugfv", "password": "evhwkcfjm5"}}}, "relationships":
3737
{"default_did": {"links": {"self": "https://sandbox-api.didww.com/v3/voice_out_trunks/b7183e37-f660-4d67-87dc-b2d9faa7041d/relationships/default_did",
3838
"related": "https://sandbox-api.didww.com/v3/voice_out_trunks/b7183e37-f660-4d67-87dc-b2d9faa7041d/default_did"}},

tests/resources/test_voice_out_trunk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_create_voice_out_trunk(self, client):
5959
trunk = VoiceOutTrunk()
6060
trunk.name = "python-test"
6161
trunk.authentication_method = IpOnlyAuthenticationMethod(
62-
allowed_sip_ips=["0.0.0.0/0"],
62+
allowed_sip_ips=["203.0.113.0/24"],
6363
tech_prefix="",
6464
)
6565
trunk.on_cli_mismatch_action = OnCliMismatchAction.REPLACE_CLI

0 commit comments

Comments
 (0)