}
// TODO: Verify that alias does not collide with existing SIP-adress
+ if ( is_kamailio_domain( $alias_domain) && is_kamailio_subscriber($alias_username, $alias_domain) )
+ {
+ print json_encode ( array( 'response' => 'failed', 'cause' => 'exists', 'detail' => 'The desired alias collides with an existing non-alias.' ));
+ break;
+ }
list ( $dest_username, $dest_domain ) = split_sipaddress( $_GET['destination']);
Returns 'response' as 'ok' with 'number' set to the number that was pulled from the pool.
numbers/inpool?number=%2B4761123456
- A debug-node, may disappear at any time ^_^
Tests if the given E164 number is in the pool.
Returns 'response' = 'ok' with 'number' = '<number>' If the number is in the pool
Returns response = 'failed' with 'cause' = 'nonexistant' if not.
alias/list
alias/user?destination=foo@bar.bz
-Add collision prevention for aliases, make sure that no alias can be added when the alias
-address would overlap/collide with a valid user-address
-
authentication-mechanism :)
+
+Add collision prevention for users, make sure that no user can be added when the user
+address would overlap/collide with a valid alias-address
+