Pull DNIS through API

  • 1
  • Question
  • Updated 5 months ago
  • (Edited)
Maybe I'm missing something, but I can't figure out how to pull the DNIS number from the API. Has anyone done this? Am I just missing the value somewhere? I've gone through all the documents and I'm convinced that I must have overlooked it. Can anyone point me in the right direction? 
Photo of SVRS DEV

SVRS DEV

  • 132 Points 100 badge 2x thumb
  • frustrated

Posted 5 months ago

  • 1
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,092 Points 2k badge 2x thumb
Can you share your use case in more details? Is it about call log API? What kind of setup you have so that DNIS is different from "to" number in response?
Photo of SVRS DEV

SVRS DEV

  • 132 Points 100 badge 2x thumb
I guess I'm asking how this would work with extensions in the Get User Call Log method. Would it just list the extension of the main line instead of the direct line? I'm in a sandbox account and can't test anything with an 800 number or extensions, so I want to know how the DNIS or "To" would work for an inbound call. I can't find examples of this so far. 
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,092 Points 2k badge 2x thumb
I think you still should be able to test it with local numbers. You can add direct number to your Sandbox account extensions and configure unconditional forwarding from your main number (local) to this extension. Then experiment trying to call to main number or direct extension number. I believe that "to" field in Call Log API should contain the number which was called. There is no difference in processing of toll free vs local numbers in this respect.