Comments (6)
I think we should use SimpleXML (http://php.net/manual/en/book.simplexml.php) to create and read the XML needed used for communication with Envia.
It is much easier to handle than DOM and also able to handle attributes. Also there are some user written extensions to savely convert arrays to xml and back. This is not trivial because of the attributes and because there can be sibling tags.
There is no real marshalling in PHP (as it is e.g. in Java)…
by @xee8aifrom nmsprime.
It would be helpful if Envia could give us schema or DTD files for the API. With these files we could:
- Validate our generated XML (before sending and in unit tests).
- Get a clearer idea of the possible return data than from the example XML (and avoid surprises).
⇒ We should ask for this (I think they validate the input before processing it)!
by @xee8aifrom nmsprime.
There are several errors within the envia documentation: read with care!
Examples:
- https://www.enviatel.de/portal/api/rest/doc/v1/misc/get_free_numbers.html
- Einschränkung nach einer bestimmten Rufnummer oder einem konkreten Rufnummernanfang, nur in Verbindung mit einer Ortsnetzkennzahl möglich
Wertebereich:\A[-_.a-zA-Z0-9]{8,15}\z
- looks like copy-and-paste, this is not a RegEx for a phonenumber (or beginning of a phonenumber)…
- Einschränkung nach einer bestimmten Rufnummer oder einem konkreten Rufnummernanfang, nur in Verbindung mit einer Ortsnetzkennzahl möglich
- https://www.enviatel.de/portal/api/rest/doc/v1.html
- POST /api/rest/v1/contract/terminate: Diese Methode führt eine Bestellung eines Produktes durch.
- in reality this seems to delete the contract
- https://www.enviatel.de/portal/api/rest/doc/v1/contract/create.html
- in the example they use reseller_k123456 in the returned XML
- At the bottom man can read in “contract_create[customer_identifier][customerreference]”: Durch envia TEL vergebene eindeutige Kundenreferenz
Wertebereich:\A[A-Z0-9]{3,7}[0-9]{0,3}[_-][-_A-Za-z0-9]{1,50}\z
- the returned reference is invalid using this RegEx
- Also the information seems not to be complete :-/
We badly need more documentation or at least the data definition files (as described above)…
by @xee8aifrom nmsprime.
We will need some extra database fields: Here we can collect them.
XML leaf element | Database | Field | Content | optional |
---|---|---|---|---|
customerno | contract | customer_number | \A[-_\/.A-Za-z0-9]{1,60}\z |
|
customerreference | contract | external_customer_reference | \A[A-Z0-9]{3,7}[0-9]{0,3}[_-][-_A-Za-z0-9]{1,50}\z |
x |
by @xee8ai
from nmsprime.
List of carrier codes:
http://www.bundesnetzagentur.de/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Nummerierung/TechnischeNummern/Portierungskennungen/VerzeichnisPortKenn_Basepage.html
from nmsprime.
Progress report
After the merge into dev: time to reflect the current status…
General ToDo (Overview)
- write importer for configuration (to have an easy way to initialize a fresh system) ⇒
we should use parse_ini_file with models as sections and entries as key: value; this would also allow a partial update – we only touch models with a section in the uploaded file ⇒ initializing the possible list values for several phonebookentry related fields will make heavy use of this feature, later changes are easy to dowrite in plain SQL (to be as flexible as possible) - test voipaccount termination ⇒ possible if one is created at Envia
- ask Envia for possible orderstatus/orderstatus_id – maybe we have to update activation date if preferred date is not possible
- implement configurable tariff, variation, trcclass
- for more details read https://devel.roetzer-engineering.com/confluence/display/LAR/2016-04-13+Envia+API+going+production+discussion
Order API
API method | current state | ToDo | Priority |
---|---|---|---|
contract/change_method | – | nothing; ATM we only use SIP | 0 |
contract/change_sla | – | check if we use different SLA (Service Level Agreements) | 0 |
contract/change_tariff | nearly done | needed: this is the tariff between us and the customer (sales tariff) ⇒ therefore create table for phonetariffs ext_ref, name, type(purchase, sale) which then can be used by billing and contract | 2 |
contract/change_variation | nearly done | needed: this is the tariff between Envia and us (purchase tariff) ⇒ look at change_tariff | 2 |
contract/create | nearly complete | set phonebook entry to zero and implement this at phonenumber management level | 3 |
contract/get_reference | – | do we need this? we log these refs by ourself ⇒ should be straigt forward | 1 |
contract/get_voice_data | needs testing | as long as we only have SIP accounts we don't need this feature | 0 |
contract/lock | – | do we need this? Maybe we disable the complete modem? | 1 |
contract/terminate | – | not needed ATM ⇒ contract will be terminated with the termination of the last phonenumber | 1 |
contract/unlock | – | only needed if contract/lock is implemented | 0 |
customer/get_reference | – | not needed ATM (we log this by ourself ⇒ should be straigt forward | 1 |
customer/update | ready | check on changes in model contract | 3 |
misc/get_free_numbers | done | later this could be used to autofill not ported numbers | 2 |
misc/get_orders_csv | done | Attention: this returnes only phonenumber related orders! | 2 |
misc/get_usage_csv | partly done | call this via cron and write results into database (for later use in billing | 3 |
misc/ping | done | 1 | |
order/add_mgcp_details | – | not needed ATM (only SIP in use) | 0 |
order/cancel | done | 3 | |
order/create_attachment | done | 3 | |
order/get_status | done | 3 | |
phonebookentry/create | – | implement using extedended phonenumbermanagement | 2 |
phonebookentry/delete | – | implement using extedended phonenumbermanagement | 2 |
phonebookentry/get | – | implement using extedended phonenumbermanagement | 2 |
voipaccount/create | nearly done | update activation date using order data | 3 |
voipaccount/terminate | done | update deactivation date using order data | 3 |
voipaccount/update | to be tested | implement to change TRC class | 3 |
Selfcare API
ATM selfcare API is not activated
API method | current state | ToDo |
---|---|---|
blacklist/create_entry | – | ? |
blacklist/delete_entry | – | ? |
calllog/delete | – | ? |
calllog/delete_entry | – | ? |
calllog/disable | – | ? |
calllog/enable | – | ? |
calllog/get | – | ? |
calllog/get_status | – | ? |
configuration/get | – | ? |
configuration/update | – | ? |
customer/get_callnumbers | – | ? |
customer/set_password | – | ? |
by @xee8ai
from nmsprime.
Related Issues (20)
- Extend index tables
- Cleanup (envia) Blades
- Cleanup Controllers
- Improve generic form field generation (BaseViewController)
- extend SLA table towards online shop
- Small Adds for v2.6 HOT 2
- Small fixes v2.5.x HOT 2
- Ticket System requirements for ERZNET
- Creation of easy delivery notes HOT 1
- Strange behavior of “+” when creating PhonenumberManagement
- Add infos to customer control center
- missing pictures of modems HOT 7
- Implement ticket relations as polymorphic one-to-many HOT 1
- Installation Dependency error HOT 2
- Support for North American DOCSIS Standard
- Integration wirh other DHCP and CRM HOT 1
- SepaMandate status changed from FRST to RCUR when settlementrun was repeated
- Instalation error mongodb-server HOT 2
- Installation steps in README.md fail HOT 1
- MTA provisioning issue causing one way audio problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nmsprime.