[Pdns-users] alter enum cnam response
Joli Martinez
mrjoli021 at gmail.com
Thu Aug 29 13:48:00 UTC 2019
Hello,
Our VoIP provider is giving us cnam services via Enum. We built a
PDNS-Recursor server to comunicate with the provider. The way the callerid
is returned by the provider does not match the format our VoIP systems are
used to. I need to change the format the name is returned to us. Not sure
how to go about doing this. According to the DNS records page below, there
are only Name, Place, TTL, and type that can be changed.
https://doc.powerdns.com/recursor/lua-scripting/dnsrecord.html
My response from the provider is as follows
;; ANSWER SECTION:
4.4.4.4.3.3.3.2.2.2.1.e164.arpa. 86400 IN NAPTR 100 10 "u"
"E2U+pstndata:cnam"
"!^.*$!pstndata:cnam/+12223334444;charset=us-ascii,Smith, John!" .
I need to be able to change Smith John to John Smith, and in some cases we
want to customize the result like make John Smith be John Doe.
How can I go about doing this? What is the name of the field where the
callerid is? If I knew that then I should be able to change it, but could
not find it in your documentation.
I have tried to print out all the fields of the response but can’t seem to
get this working either. I keep getting the error below
“localhost pdns_recursor[5269]: STL error
(4.4.4.4.3.3.3.2.2.2.1.e164.arpa/NAPTR from 10.4.79.31): Unable to convert
parameter from string to N5boost8optionalIiEE”
------------------------------------------------
function postresolve (dq)
pdnslog("This is PostResolve Unaltered at this point")
pdnslog("postresolve called for ",dq.qname:toString())
local records = dq:getRecords()
for k,v in pairs(records) do
pdnslog(k, v.name:toString(), v:getContent())
end
return false;
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20190829/c72952d1/attachment.htm>
More information about the Pdns-users
mailing list