CRM Template to public Number Information Provider w. API

Status
Not open for further replies.

Henning

Silver Partner
Basic Certified
Joined
Jan 28, 2019
Messages
7
Reaction score
2
Hi.

Yes, a newbie in CRM setup.
Trying to make a CRM Template against a public Numbering Information provider, offering this via API.
And we have an account. Doc: Number Information API Documentation (v1.0.3) | nrop.no
Intension is only to get Name of caller in Webclient/softphone, no adding of contacts.


Challenge
Url informed to use is: https://api.nrop.no/nrop/:telephonenumber
+ sign must be URL encoded as %2B

My question is: what to add after this url to get a JSON reply?
Is it like: /search?number=[%2B][Number]

The response should be a JSON document with the number information:

{
"href":"/nrop/%2B4798765432",
"created":"2016-12-12T04:39:12.000Z",
"updated":"2017-05-26T08:52:36.000Z",
"customerType":"P",
"phone":"+4798765432",
"firstName":"Kari",
"middleName":"",
"lastName":"Nordmann",
"organizationNumber":"987654321"
"companyName":"",
"address":"Storgata 10",
"postalCode":"0001",
"city":"OSLO",
"country":"NO",
"phoneBook":true,
"manualQuery":true,
"electronicQuery":true

}


Any good tips?
Not sure if this even is possibly.
Thanks in advance

/henning
 
If your SIP Trunk provides the number with the + prefix, you need to replace it with the encoded value, as follows:
/search?number=[[Number].Replace("+","%2B")]
 
  • Like
Reactions: Evolute IT
Ernesto, thanks. for Feedback. Bring that to my knowledgebase :)
After much testing, I earlier today I got this (main format) working to Nrop --> https://api.nrop.no/nrop/+[Number]
Have then set Max 10 digits. In norway it is Static 10 digits included Country Prefix, ie: 47xx xx xx xx.

Then I found out that I had to enable: Add CRM contacts to 3CX company phonebook .. to get Names in Clients.
Problem now is; It saves only 1 new contact in Contacts marked as CRM.
When a new Call arrives, earlier CRM contact is overwritten! Not sure if this is a obvious fault or...
IN CRM Template i have set ContactID=phone, since I dont receive any ID.
Attached CRM file.

best regards
Henning
 

Attachments

This is because you're specifying the same ContactUrl for all contacts:
<Output Type="ContactUrl" Passes="0" Value="https://api.nrop.no/nrop/show?/ContactID=[phone]" />

As [phone] is unknown (there is no variable with that name), that's replaced with an empty string, and all ContactUrl fields end up with the same value. You probably want to use:
<Output Type="ContactUrl" Passes="0" Value="https://api.nrop.no/nrop/show?/ContactID=[Number]" />
 
Ernesto, thanks for your input.
Shall try your suggestion.

Shall update after testing.

Brg
Henning
 
  • Like
Reactions: edossantos
Ernesto,
Changed to your suggestion, this work nice.
Thanks for good help.
brg
Henning
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Forum statistics

Threads
112,320
Messages
591,878
Members
165,466
Latest member
EMMEPICASA