Files
cgrates/data/conf/samples/dnsagent_internal/dryrun.json
2023-07-05 08:32:44 +02:00

52 lines
2.5 KiB
JSON

{
"dns_agent": {
"request_processors": [
{
"id": "DryRunNAPTR",
"filters": ["*string:~*vars.QueryType:NAPTR", "*string:~*vars.QueryName{*e164}:4986517174963"],
"flags": ["*dryrun","*log"],
"request_fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"}
],
"reply_fields":[
{"tag": "NAPTROrder", "path": "*rep.Answer.Order", "type": "*constant", "value": "100"},
{"tag": "NAPTRPreference", "path": "*rep.Answer.Preference", "type": "*constant", "value": "10"},
{"tag": "NAPTRFlags", "path": "*rep.Answer.Flags", "type": "*constant", "value": "U"},
{"tag": "NAPTRService", "path": "*rep.Answer.Service", "type": "*constant", "value": "E2U+SIP"},
{"tag": "NAPTRRegexp", "path": "*rep.Answer.Regexp", "type": "*constant", "value": "!^(.*)$!sip:\\1@172.16.1.10.!"},
{"tag": "NAPTRReplacement", "path": "*rep.Answer.Replacement", "type": "*constant", "value": "."}
]
},
{
"id": "DryRunA",
"filters": ["*string:~*vars.QueryType:A", "*string:~*vars.QueryName:cgrates.org."],
"flags": ["*dryrun","*log"],
"request_fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"}
],
"reply_fields":[
{"tag": "Aname", "path": "*rep.Answer.Hdr.Name", "type": "*constant", "value": "cgrates.org."},
{"tag": "Attl", "path": "*rep.Answer.Hdr.Ttl", "type": "*constant", "value": "300"},
{"tag": "Aclass", "path": "*rep.Answer.Hdr.Class", "type": "*constant", "value": "1"},
{"tag": "Arrtype", "path": "*rep.Answer.Hdr.Rrtype", "type": "*constant", "value": "1"},
{"tag": "Aip", "path": "*rep.Answer.A", "type": "*constant", "value": "51.38.77.188"}
]
},
{
"id": "DryRunSRV",
"filters": ["*string:~*vars.QueryType:SRV", "*string:~*vars.QueryName:_sip._tcp.opensips.org."],
"flags": ["*dryrun","*log"],
"request_fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"}
],
"reply_fields":[
{"tag": "SRVHdr", "path": "*rep.Answer.Hdr.Name", "type": "*constant", "value": "_sip._tcp.opensips.org."},
{"tag": "SRVPort", "path": "*rep.Answer.Port", "type": "*constant", "value": "5060"},
{"tag": "SRVPriority", "path": "*rep.Answer.Priority", "type": "*constant", "value": "0"},
{"tag": "SRVWeight", "path": "*rep.Answer.Weight", "type": "*constant", "value": "50"},
{"tag": "SRVTarget", "path": "*rep.Answer.Target", "type": "*constant", "value": "opensips.org."}
]
}
]
}
}