code to get CNAM with VOIP.MS

Support zone
Post Reply
rybshik
Posts: 33
Joined: Mon Jun 08, 2009 2:20 am

code to get CNAM with VOIP.MS

Post by rybshik » Wed Feb 04, 2015 6:43 pm

Provider VOIP.MS supports CNAM for incoming calls.
What would a code to get CNAM information and write it to a variable/string 'cnam'?

Solved:

Code: Select all

cnam = req.Header.From.FromName.ToString()
BTW, I tried

Code: Select all

sys.Log("** Call from #{req.Header.From.FromDisplayName}**")
but it produced the following error

Code: Select all

 DialPlan 21:31:14:652 sip1(4700): There was a missing method exception in your dial plan: undefined method `FromDisplayName'
Last edited by rybshik on Thu Feb 05, 2015 3:38 am, edited 1 time in total.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: code to get CNAM with VOIP.MS

Post by Aaron » Thu Feb 05, 2015 10:13 am

As you've discovered there is no FromDisplayName property on the From header it's FromName.

If you saw FromDisplayName listed somewhere can you let me know and I'll correct it.

rybshik
Posts: 33
Joined: Mon Jun 08, 2009 2:20 am

Re: code to get CNAM with VOIP.MS

Post by rybshik » Fri Feb 06, 2015 6:37 am

Aaron wrote:If you saw FromDisplayName listed somewhere can you let me know and I'll correct it.
If you search the forum for "FromDisplayName", you will find one post of yours dated "Thu Sep 05, 2013 11:13 am"

Post Reply