cfg_migrate
Migrate OpenSIPS configuration between versions by applying behavior-preserving rewrite rules across the version chain. Reports warnings for changes requiring manual intervention, with optional syntax validation.
Instructions
Migrate a configuration between OpenSIPS versions.
Walks the hop chain (2.4 → 3.0 → ... → 4.0) applying every
behaviour-preserving rewrite rule. Anything that cannot be safely
auto-applied is reported as a warning — the engineer must apply those
manually.
When validate is true and an opensips binary is available, the
migrated config is also run through opensips -C -f.
Parameters
config_content:
The current OpenSIPS configuration text.
from_version:
Current OpenSIPS version.
to_version:
Target OpenSIPS version.
validate:
Run the migrated config through opensips -C when available.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"config_content": "<config_content>",
"from_version": "<from_version>",
"to_version": "<to_version>"
},
"name": "cfg_migrate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config_content | Yes | ||
| from_version | Yes | ||
| to_version | Yes | ||
| validate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||