nerdexam
Cisco

300-835 · Question #42

Drag and drop the code snippets from the bottom onto the blanks in the Python script to create an outbound dial plan rule using the Cisco Meeting Server API. Not all options are used.

Note on Missing Content The question you've shared is incomplete - the code snippet options field shows {} (empty). Without the actual drag-and-drop options, I can't tell you exactly which snippet goes in which blank. That said, here is a thorough explanation of what this type…

Cisco Meeting Server API

Question

Drag and drop the code snippets from the bottom onto the blanks in the Python script to create an outbound dial plan rule using the Cisco Meeting Server API. Not all options are used.

Exhibit

300-835 question #42 exhibit

Explanation

Note on Missing Content

The question you've shared is incomplete - the code snippet options field shows {} (empty). Without the actual drag-and-drop options, I can't tell you exactly which snippet goes in which blank.

That said, here is a thorough explanation of what this type of question is testing and the reasoning behind each step, so you can apply it once you have the actual options.


Overall Goal

Create an outbound dial plan rule on a Cisco Meeting Server (CMS) via its REST API using Python.

An outbound dial plan rule tells the CMS how to route outbound calls - matching call URI patterns and forwarding them to the correct SIP proxy or trunk. You use the API (rather than the GUI) to automate this at scale or in scripted provisioning workflows.


The Correct Approach: HTTP POST to the CMS API

The CMS exposes a REST API over HTTPS. To create a resource (like a dial plan rule), you send an HTTP POST request to the appropriate endpoint.

Typical Script Structure

import requests
from requests.auth import HTTPBasicAuth

# 1. Define the CMS host and credentials
host = "https://<cms-ip-or-fqdn>"
username = "admin"
password = "password"

# 2. Set the target API endpoint
url = host + "/api/v1/outboundDialPlanRules"

# 3. Define the rule parameters (form-encoded body)
payload = {
    "domain": "example.com",
    "sipProxy": "proxy.example.com",
    "priority": "25",
}

# 4. Send the POST request with Basic Auth, disable cert verification if lab
response = requests.post(
    url,
    auth=HTTPBasicAuth(username, password),
    data=payload,
    verify=False
)

# 5. Check the response
print(response.status_code)  # 200 or 201 = success

Step-by-Step Reasoning

Step 1 - import requests / from requests.auth import HTTPBasicAuth

Why: The requests library handles HTTPS and auth cleanly. HTTPBasicAuth encodes credentials as Base64 in the Authorization header, which CMS requires.

If skipped: No HTTP client; script fails immediately.


Step 2 - Build the URL: /api/v1/outboundDialPlanRules

Why: This is the specific CMS REST endpoint for outbound dial plan rules. Using the wrong path (e.g., /inboundDialPlanRules) creates the wrong object type.

If wrong: You get a 404 or create an unintended resource.


Step 3 - Define the payload dict with rule parameters

Why: CMS API expects application/x-www-form-urlencoded data (not JSON). Key parameters include:

  • domain - the URI domain to match
  • sipProxy - where to send matched calls
  • priority - rule evaluation order (lower = higher priority)

If skipped: POST succeeds but creates an empty/invalid rule.


Step 4 - requests.post(..., auth=..., data=payload, verify=False)

Why:

  • auth=HTTPBasicAuth(...) - CMS requires credentials on every request (stateless API)
  • data= (not json=) - CMS expects form encoding, not JSON
  • verify=False - disables SSL cert validation (common in lab/exam environments with self-signed certs)

If done wrong: Using json=payload returns a 400 Bad Request. Omitting auth returns 401 Unauthorized.


Step 5 - Check response.status_code

Why: Confirms whether the rule was actually created. CMS returns 200 or 201 on success, 4xx on error.

If skipped: You won't know if the rule was created, making troubleshooting impossible.


Memory Tip

"UPAR" - URL, Payload, Auth, Response

  1. URL → correct endpoint (/api/v1/outboundDialPlanRules)
  2. Payload → form-encoded rule data
  3. Auth → BasicAuth credentials
  4. Response → check the status code

If you can share the actual code snippet options from the exam, I can tell you exactly which snippet belongs in each blank.

Topics

#Cisco Meeting Server API#Outbound dial plan rule#Python API implementation

Community Discussion

No community discussion yet for this question.

Full 300-835 Practice