Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ForwardedFrom attribute #948

Open
justsomeofl opened this issue Jul 14, 2023 · 5 comments
Open

Missing ForwardedFrom attribute #948

justsomeofl opened this issue Jul 14, 2023 · 5 comments
Labels
status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library

Comments

@justsomeofl
Copy link

I did set up a webhook on a french phone number (+33).
Then I made a call to another phone number that is forwarding to the webhook phone number.
But the ForwardedFrom attribute is missing. Is it the expected behavior?

@AsabuHere
Copy link
Contributor

HI @justsomeofl, Thank you for the heads up! Can you please share more details on this issue? What were the other fields returned as part of the response? Can you share the code snippet used for this, after removing custom details?

@AsabuHere AsabuHere added type: question question directed at the library status: waiting for feedback waiting for feedback from the submitter labels Jul 17, 2023
@justsomeofl
Copy link
Author

Hi @AsabuHere,

here are the other fields:

{
  AccountSid: 'AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  ApiVersion: '2010-04-01',
  CallSid: 'CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  CallStatus: 'ringing',
  Called: '+331XXXXXXXX',
  CalledCity: '',
  CalledCountry: 'FR',
  CalledState: '',
  CalledZip: '',
  Caller: '+337XXXXXXXX',
  CallerCity: '',
  CallerCountry: 'FR',
  CallerState: '',
  CallerZip: '',
  Direction: 'inbound',
  From: '+337XXXXXXXX',
  FromCity: '',
  FromCountry: 'FR',
  FromState: '',
  FromZip: '',
  To: '+331XXXXXXXX',
  ToCity: '',
  ToCountry: 'FR',
  ToState: '',
  ToZip: ''
}
const call = await client.calls(request.body.CallSid)
        .fetch();

console.log("ForwardedFrom", request.body.CallSid, request.body.ForwardedFrom, call?.forwarded_from); 
//ForwardedFrom CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX undefined undefined

Thanks

@AsabuHere
Copy link
Contributor

Can you try accessing the attribute from call like this
client.calls
.create({
url: 'http://demo.twilio.com/docs/voice.xml',
to: '+1XXXXXXXXX',
from: '+1XXXXXXXXX'
})
.then(call => console.log(call.forwardedFrom));
I can access the value like this in the latest version of twilio-node

@justsomeofl
Copy link
Author

I am able to access it with the way you mentionned.
But when i catch a real call redirected to a webhook, this attribute is missing.
Maybe this value is filled only for twilio created calls ?

@tiwarishubham635 tiwarishubham635 added status: work in progress Twilio or the community is in the process of implementing and removed status: waiting for feedback waiting for feedback from the submitter labels Apr 15, 2024
@tiwarishubham635
Copy link
Contributor

Hi @justsomeofl! I rechecked it again and I am able to get the forwardedFrom field in the response of fetch. In my case it is not showing undefined. Can you recheck again?
I will list my steps here:

  1. I followed this documentation
  2. I created a call resource using this
  3. Then I fetched the call using this
  4. The response had forwardedFrom field as expected. It was set to null in my case.

Please let me know if we are doing something differently. Thanks!

@tiwarishubham635 tiwarishubham635 added status: waiting for feedback waiting for feedback from the submitter and removed status: work in progress Twilio or the community is in the process of implementing labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library
Projects
None yet
Development

No branches or pull requests

3 participants