@@ -135,6 +135,58 @@ The following query string parameters allow you to limit the list returned. Note
135
135
|Beta |Include phone numbers new to the Restcomm platform. Possible values are either true or false. Default is true.
136
136
|============================================================================================================================================================
137
137
138
+ ====== Example - List of phone numbers
139
+
140
+ Gets all numbers created using *IncomingPhoneNumbers.json*
141
+
142
+ ....
143
+ curl -G https://\{account_sid}:\{auth_token}@127.0.0.1/restcomm/2012-04-24/Accounts/\{account_sid}/IncomingPhoneNumbers.json
144
+ ....
145
+
146
+ Result of the above command
147
+
148
+ ....
149
+ [
150
+ {
151
+ "sid": "PN0b4201c6c87749f29367e6cf000686cb",
152
+ "account_sid": "\{account_sid}",
153
+ "friendly_name": "This app calls registered restcomm client Alice ",
154
+ "phone_number": "+1238",
155
+ "voice_url": "/restcomm/demos/dial/client/dial-client.xml",
156
+ "voice_method": "POST",
157
+ "voice_fallback_url": null,
158
+ "voice_fallback_method": "POST",
159
+ "status_callback": null,
160
+ "status_callback_method": "POST",
161
+ "voice_caller_id_lookup": false,
162
+ "voice_application_sid": null,
163
+ "date_created": "Mon, 4 Nov 2013 12:14:11 +0000",
164
+ "date_updated": "Mon, 4 Nov 2013 12:14:11 +0000",
165
+ "sms_url": null,
166
+ "sms_method": "POST",
167
+ "sms_fallback_url": null,
168
+ "sms_fallback_method": "POST",
169
+ "sms_application_sid": null,
170
+ "ussd_url": null,
171
+ "ussd_method": null,
172
+ "ussd_fallback_url": null,
173
+ "ussd_fallback_method": null,
174
+ "ussd_application_sid": null,
175
+ "refer_url": null,
176
+ "refer_method": null,
177
+ "refer_application_sid": null,
178
+ "capabilities": {
179
+ "voice_capable": true,
180
+ "sms_capable": false,
181
+ "mms_capable": false,
182
+ "fax_capable": false
183
+ },
184
+ "api_version": "2012-04-24",
185
+ "uri": "/restcomm/2012-04-24/Accounts/\{account_sid}/IncomingPhoneNumbers/PN0b4201c6c87749f29367e6cf000686cb.json"
186
+ },...
187
+
188
+ ....
189
+
138
190
[[http-post]]
139
191
===== HTTP POST
140
192
@@ -402,21 +454,6 @@ Result of the above command
402
454
403
455
....
404
456
405
- == Incoming Phone Number Regex Support
406
- [cols=",",]
407
- |==================================================================================================================================================================================================================================================
408
- |*Regex Sample* |*Description*
409
- |7777\|8888 | Matches the numbers 7777 or 8888
410
- |^*77...33#$| Matches any number that starts with *77 and and the three dots matches any character and it must end with a # sign
411
- |^[12]2233#$| Matches any number that starts with 1 or 2 and ends with 2233#
412
- |^7688[456]#$ | matches any number that starts with 76884# or 76885# or 76886#
413
- |[45]234[23] | matches 42342, 42343, 52342 and 52343
414
- |^*222*...*...*500#$| the Regext (^*222*...*...*500#$) matches *222*888*999*500# or *222*444*321*500# the dots maches any character
415
- |999...| Matches 999222, 999123, 999555 the dots matches any character
416
-
417
- |=====================================================================================================================================================================================================================================================
418
-
419
-
420
457
== Delete a phone number
421
458
422
459
You have to get the SID of the phone and use curl to delete as follows
@@ -433,3 +470,16 @@ Gets all numbers created using *IncomingPhoneNumbers.json*
433
470
curl -X GET https://administrator%40company.com:[email protected] /restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/IncomingPhoneNumbers.json
434
471
....
435
472
473
+ == Incoming Phone Number Regex Support
474
+ [cols=",",]
475
+ |==================================================================================================================================================================================================================================================
476
+ |*Regex Sample* |*Description*
477
+ |7777\|8888 | Matches the numbers 7777 or 8888
478
+ |^*77...33#$| Matches any number that starts with *77 and and the three dots matches any character and it must end with a # sign
479
+ |^[12]2233#$| Matches any number that starts with 1 or 2 and ends with 2233#
480
+ |^7688[456]#$ | matches any number that starts with 76884# or 76885# or 76886#
481
+ |[45]234[23] | matches 42342, 42343, 52342 and 52343
482
+ |^*222*...*...*500#$| the Regext (^*222*...*...*500#$) matches *222*888*999*500# or *222*444*321*500# the dots maches any character
483
+ |999...| Matches 999222, 999123, 999555 the dots matches any character
484
+
485
+ |=====================================================================================================================================================================================================================================================
0 commit comments