2017-12-23 5 views
1
$numbers = $client->availablePhoneNumbers('US')->local->read(array(
"Capabilities" => "fax", 
"areaCode" => $areacode 
)); 

$number = $client->incomingPhoneNumbers->create(array(
"phoneNumber" => $numbers[0]->phoneNumber, 
"friendlyName" => "SpecialName", 
"VoiceUrl" => "myurlcode", 
"VoiceMethod" => "POST" 
)); 


$twilionumber = $number->phoneNumber; 

위의 PHP 코드를 사용하여 번호를 구입하면 성공합니다.
그러나 twilio 기능이 인식되지 않습니다.
Twilio Fax에서만 사용할 수있는 번호를 얻을 수 있어야합니다.특정 기능이있는 숫자 검색

Twilio의 api 문서를 기반으로 작동해야합니까? Twilio Rest API Documentation

내가 누락 된 것이 있습니까? 당신이 "Capabilities"

"Capabilities" => "fax", 
"areaCode" => $areacode 

를 발견 한 곳

답변

1

는 잘 모르겠어요하지만 난 당신이 대신하려고 제안 :

"faxEnabled" => "true", 
"areaCode" => $areacode 

그것은 여기에 언급 된 것 : https://www.twilio.com/docs/api/fax/receive#phone-number-setup

팩스 가능한 뉴가없는 경우 mber, 당신은 하나를 구입해야합니다. 사용 가능한 전화 번호 REST API 리소스 (FaxEnabled = true로 쿼리) 또는 콘솔 전화 번호 검색 (팩스 기능이있는 번호를 검색하려면 상자를 선택) 중 하나를 사용할 수 있습니다.

https://github.com/twilio/twilio-php/blob/master/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.php

:


또한, 상황 파악을 위하여 당신은 헬퍼 라이브러리의 소스 코드를 읽을 수 있습니다

관련 문제