Re: [cisco-voip] UDS Searches not sanitizing the Plus Symbol

2017-04-13 Thread Justin Steinberg
i meant to say it will also find numbers with hypens (the documentation
mentions they are ignored)

On Thu, Apr 13, 2017 at 8:05 AM, Justin Steinberg 
wrote:

> While Anthony's encoding is right, I actually think the documentation does
> intend to actually mean you can act as though the + was not in the phone
> number value as stored in AD.
>
> I have used the query below
>
> https://{host}:8443/cucm-uds/users?numberlast=3175551234
> <(317)%20555-1234>
>
> To search for phone numbers in AD.  This finds any number with right
> justified digits above.  This should find results for +13175551234
> <(317)%20555-1234>, 13175551234 <(317)%20555-1234>, and 3175551234
> <(317)%20555-1234>.   If there are hypens in the numbers in AD (e.g.
> 317-555-1234 <(317)%20555-1234>).
>
> On Thu, Apr 13, 2017 at 12:16 AM, Anthony Holloway <
> avholloway+cisco-v...@gmail.com> wrote:
>
>> No worries.  Transitioning to app dev will be a bumpy road for a lot of
>> UC Engineers, we might as well help each other progress forward.
>>
>> On Wed, Apr 12, 2017 at 9:37 PM Nathan Reeves 
>> wrote:
>>
>>> lol, cheers for that, should have picked that up earlier.  Quick test
>>> shows that works perfectly.
>>>
>>> When the docs mention that it ignores the plus symbol, I was working on
>>> the assumption that it therefore would ignore the plus symbol in the actual
>>> number.  Wrong assumption.
>>>
>>> Thanks again
>>>
>>>
>>> On Wed, Apr 12, 2017 at 11:57 PM, Anthony Holloway <
>>> avholloway+cisco-v...@gmail.com> wrote:
>>>
 Plus signs (+) in URL query parameters (the part after the question
 mark [?]) are treated as spaces.  E.g., ?name=anthony+holloway == "anthony
 holloway"  So, you're effectively asking UDS for " 6140011" (note the
 leading space, and omission of the plus sign [+]).

 The work around is to use some sort of URL encoding library, which will
 build your URL with the plus sign (+) encoded with it's percent sign (%)
 equivelent, which happens to be %2B.

 So, your submitted UDS request would actually look like:

 https://172.20.2.21:8443/cucm-uds/users?number=%2B6140011

 Finally, this is not a function of UDS at all, and something you'll
 need to know, now that you are explorely RESTful APIs which rely on URL
 structures to work with data.

 On Wed, Apr 12, 2017 at 10:46 AM Nathan Reeves <
 nathan.a.ree...@gmail.com> wrote:

> Taking a look around at what options we have to drive additional
> directories for our IP phones and decided to take a quick look at using 
> UDS
> as the data source, accessing it via the published API.
>
> One thing I'm finding (which I can't see any bug report on), is that
> number searches, where the number in UDS contains a plus, does not return
> search results based on the query submitted.
>
> I have a user configured with a mobile number in PlusE164
> (+6140011 <+61%20400%20111%20111> for example) which is pulled
> into the CUCM directory via LDAP sync.
>
> The API docs note that brackets, plus symbols etc are all ignored in
> the search.  When I access the UDS API and construct a query string in a
> URL along the lines of 'https://172.20.2.21:8443/cucm
> -uds/users?number=61400', the returned response is 0 results.  If I
> update the Mobile number to remove just the plus (and resync LDAP), the
> same search now returns my user with the mobile number correctly searched.
>
> Running 11.5(1)SU1 (haven't yet checked this against SU2), attempted
> to use native UDS but also tried searching while UDS Proxy is enabled.
> Same results either way.
>
> Anyone seen this issue or am I missing something?  I can only assume
> that the sanitized query doesn't correctly ignore the plus symbol.
>
> Cheers
>
> Nathan
> ___
> cisco-voip mailing list
> cisco-voip@puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>

>>>
>> ___
>> cisco-voip mailing list
>> cisco-voip@puck.nether.net
>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>
>>
>
___
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


Re: [cisco-voip] UDS Searches not sanitizing the Plus Symbol

2017-04-13 Thread Justin Steinberg
While Anthony's encoding is right, I actually think the documentation does
intend to actually mean you can act as though the + was not in the phone
number value as stored in AD.

I have used the query below

https://{host}:8443/cucm-uds/users?numberlast=3175551234

To search for phone numbers in AD.  This finds any number with right
justified digits above.  This should find results for +13175551234,
13175551234, and 3175551234.   If there are hypens in the numbers in AD
(e.g. 317-555-1234).

On Thu, Apr 13, 2017 at 12:16 AM, Anthony Holloway <
avholloway+cisco-v...@gmail.com> wrote:

> No worries.  Transitioning to app dev will be a bumpy road for a lot of UC
> Engineers, we might as well help each other progress forward.
>
> On Wed, Apr 12, 2017 at 9:37 PM Nathan Reeves 
> wrote:
>
>> lol, cheers for that, should have picked that up earlier.  Quick test
>> shows that works perfectly.
>>
>> When the docs mention that it ignores the plus symbol, I was working on
>> the assumption that it therefore would ignore the plus symbol in the actual
>> number.  Wrong assumption.
>>
>> Thanks again
>>
>>
>> On Wed, Apr 12, 2017 at 11:57 PM, Anthony Holloway <
>> avholloway+cisco-v...@gmail.com> wrote:
>>
>>> Plus signs (+) in URL query parameters (the part after the question mark
>>> [?]) are treated as spaces.  E.g., ?name=anthony+holloway == "anthony
>>> holloway"  So, you're effectively asking UDS for " 6140011" (note the
>>> leading space, and omission of the plus sign [+]).
>>>
>>> The work around is to use some sort of URL encoding library, which will
>>> build your URL with the plus sign (+) encoded with it's percent sign (%)
>>> equivelent, which happens to be %2B.
>>>
>>> So, your submitted UDS request would actually look like:
>>>
>>> https://172.20.2.21:8443/cucm-uds/users?number=%2B6140011
>>>
>>> Finally, this is not a function of UDS at all, and something you'll need
>>> to know, now that you are explorely RESTful APIs which rely on URL
>>> structures to work with data.
>>>
>>> On Wed, Apr 12, 2017 at 10:46 AM Nathan Reeves <
>>> nathan.a.ree...@gmail.com> wrote:
>>>
 Taking a look around at what options we have to drive additional
 directories for our IP phones and decided to take a quick look at using UDS
 as the data source, accessing it via the published API.

 One thing I'm finding (which I can't see any bug report on), is that
 number searches, where the number in UDS contains a plus, does not return
 search results based on the query submitted.

 I have a user configured with a mobile number in PlusE164 (+6140011
 <+61%20400%20111%20111> for example) which is pulled into the CUCM
 directory via LDAP sync.

 The API docs note that brackets, plus symbols etc are all ignored in
 the search.  When I access the UDS API and construct a query string in a
 URL along the lines of 'https://172.20.2.21:8443/
 cucm-uds/users?number=61400', the returned response is 0 results.  If
 I update the Mobile number to remove just the plus (and resync LDAP), the
 same search now returns my user with the mobile number correctly searched.

 Running 11.5(1)SU1 (haven't yet checked this against SU2), attempted to
 use native UDS but also tried searching while UDS Proxy is enabled.  Same
 results either way.

 Anyone seen this issue or am I missing something?  I can only assume
 that the sanitized query doesn't correctly ignore the plus symbol.

 Cheers

 Nathan
 ___
 cisco-voip mailing list
 cisco-voip@puck.nether.net
 https://puck.nether.net/mailman/listinfo/cisco-voip

>>>
>>
> ___
> cisco-voip mailing list
> cisco-voip@puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
___
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


Re: [cisco-voip] UDS Searches not sanitizing the Plus Symbol

2017-04-12 Thread Anthony Holloway
No worries.  Transitioning to app dev will be a bumpy road for a lot of UC
Engineers, we might as well help each other progress forward.

On Wed, Apr 12, 2017 at 9:37 PM Nathan Reeves 
wrote:

> lol, cheers for that, should have picked that up earlier.  Quick test
> shows that works perfectly.
>
> When the docs mention that it ignores the plus symbol, I was working on
> the assumption that it therefore would ignore the plus symbol in the actual
> number.  Wrong assumption.
>
> Thanks again
>
>
> On Wed, Apr 12, 2017 at 11:57 PM, Anthony Holloway <
> avholloway+cisco-v...@gmail.com> wrote:
>
>> Plus signs (+) in URL query parameters (the part after the question mark
>> [?]) are treated as spaces.  E.g., ?name=anthony+holloway == "anthony
>> holloway"  So, you're effectively asking UDS for " 6140011" (note the
>> leading space, and omission of the plus sign [+]).
>>
>> The work around is to use some sort of URL encoding library, which will
>> build your URL with the plus sign (+) encoded with it's percent sign (%)
>> equivelent, which happens to be %2B.
>>
>> So, your submitted UDS request would actually look like:
>>
>> https://172.20.2.21:8443/cucm-uds/users?number=%2B6140011
>>
>> Finally, this is not a function of UDS at all, and something you'll need
>> to know, now that you are explorely RESTful APIs which rely on URL
>> structures to work with data.
>>
>> On Wed, Apr 12, 2017 at 10:46 AM Nathan Reeves 
>> wrote:
>>
>>> Taking a look around at what options we have to drive additional
>>> directories for our IP phones and decided to take a quick look at using UDS
>>> as the data source, accessing it via the published API.
>>>
>>> One thing I'm finding (which I can't see any bug report on), is that
>>> number searches, where the number in UDS contains a plus, does not return
>>> search results based on the query submitted.
>>>
>>> I have a user configured with a mobile number in PlusE164 (+6140011
>>> <+61%20400%20111%20111> for example) which is pulled into the CUCM
>>> directory via LDAP sync.
>>>
>>> The API docs note that brackets, plus symbols etc are all ignored in the
>>> search.  When I access the UDS API and construct a query string in a URL
>>> along the lines of 'https://172.20.2.21:8443/cucm-uds/users?number=61400',
>>> the returned response is 0 results.  If I update the Mobile number to
>>> remove just the plus (and resync LDAP), the same search now returns my user
>>> with the mobile number correctly searched.
>>>
>>> Running 11.5(1)SU1 (haven't yet checked this against SU2), attempted to
>>> use native UDS but also tried searching while UDS Proxy is enabled.  Same
>>> results either way.
>>>
>>> Anyone seen this issue or am I missing something?  I can only assume
>>> that the sanitized query doesn't correctly ignore the plus symbol.
>>>
>>> Cheers
>>>
>>> Nathan
>>> ___
>>> cisco-voip mailing list
>>> cisco-voip@puck.nether.net
>>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>>
>>
>
___
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


Re: [cisco-voip] UDS Searches not sanitizing the Plus Symbol

2017-04-12 Thread Nathan Reeves
lol, cheers for that, should have picked that up earlier.  Quick test shows
that works perfectly.

When the docs mention that it ignores the plus symbol, I was working on the
assumption that it therefore would ignore the plus symbol in the actual
number.  Wrong assumption.

Thanks again


On Wed, Apr 12, 2017 at 11:57 PM, Anthony Holloway <
avholloway+cisco-v...@gmail.com> wrote:

> Plus signs (+) in URL query parameters (the part after the question mark
> [?]) are treated as spaces.  E.g., ?name=anthony+holloway == "anthony
> holloway"  So, you're effectively asking UDS for " 6140011" (note the
> leading space, and omission of the plus sign [+]).
>
> The work around is to use some sort of URL encoding library, which will
> build your URL with the plus sign (+) encoded with it's percent sign (%)
> equivelent, which happens to be %2B.
>
> So, your submitted UDS request would actually look like:
>
> https://172.20.2.21:8443/cucm-uds/users?number=%2B6140011
>
> Finally, this is not a function of UDS at all, and something you'll need
> to know, now that you are explorely RESTful APIs which rely on URL
> structures to work with data.
>
> On Wed, Apr 12, 2017 at 10:46 AM Nathan Reeves 
> wrote:
>
>> Taking a look around at what options we have to drive additional
>> directories for our IP phones and decided to take a quick look at using UDS
>> as the data source, accessing it via the published API.
>>
>> One thing I'm finding (which I can't see any bug report on), is that
>> number searches, where the number in UDS contains a plus, does not return
>> search results based on the query submitted.
>>
>> I have a user configured with a mobile number in PlusE164 (+6140011
>> <+61%20400%20111%20111> for example) which is pulled into the CUCM
>> directory via LDAP sync.
>>
>> The API docs note that brackets, plus symbols etc are all ignored in the
>> search.  When I access the UDS API and construct a query string in a URL
>> along the lines of 'https://172.20.2.21:8443/cucm-uds/users?number=61400',
>> the returned response is 0 results.  If I update the Mobile number to
>> remove just the plus (and resync LDAP), the same search now returns my user
>> with the mobile number correctly searched.
>>
>> Running 11.5(1)SU1 (haven't yet checked this against SU2), attempted to
>> use native UDS but also tried searching while UDS Proxy is enabled.  Same
>> results either way.
>>
>> Anyone seen this issue or am I missing something?  I can only assume that
>> the sanitized query doesn't correctly ignore the plus symbol.
>>
>> Cheers
>>
>> Nathan
>> ___
>> cisco-voip mailing list
>> cisco-voip@puck.nether.net
>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>
>
___
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


Re: [cisco-voip] UDS Searches not sanitizing the Plus Symbol

2017-04-12 Thread Anthony Holloway
Plus signs (+) in URL query parameters (the part after the question mark
[?]) are treated as spaces.  E.g., ?name=anthony+holloway == "anthony
holloway"  So, you're effectively asking UDS for " 6140011" (note the
leading space, and omission of the plus sign [+]).

The work around is to use some sort of URL encoding library, which will
build your URL with the plus sign (+) encoded with it's percent sign (%)
equivelent, which happens to be %2B.

So, your submitted UDS request would actually look like:

https://172.20.2.21:8443/cucm-uds/users?number=%2B6140011

Finally, this is not a function of UDS at all, and something you'll need to
know, now that you are explorely RESTful APIs which rely on URL structures
to work with data.

On Wed, Apr 12, 2017 at 10:46 AM Nathan Reeves 
wrote:

> Taking a look around at what options we have to drive additional
> directories for our IP phones and decided to take a quick look at using UDS
> as the data source, accessing it via the published API.
>
> One thing I'm finding (which I can't see any bug report on), is that
> number searches, where the number in UDS contains a plus, does not return
> search results based on the query submitted.
>
> I have a user configured with a mobile number in PlusE164 (+6140011
> <+61%20400%20111%20111> for example) which is pulled into the CUCM
> directory via LDAP sync.
>
> The API docs note that brackets, plus symbols etc are all ignored in the
> search.  When I access the UDS API and construct a query string in a URL
> along the lines of 'https://172.20.2.21:8443/cucm-uds/users?number=61400',
> the returned response is 0 results.  If I update the Mobile number to
> remove just the plus (and resync LDAP), the same search now returns my user
> with the mobile number correctly searched.
>
> Running 11.5(1)SU1 (haven't yet checked this against SU2), attempted to
> use native UDS but also tried searching while UDS Proxy is enabled.  Same
> results either way.
>
> Anyone seen this issue or am I missing something?  I can only assume that
> the sanitized query doesn't correctly ignore the plus symbol.
>
> Cheers
>
> Nathan
> ___
> cisco-voip mailing list
> cisco-voip@puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
___
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


[cisco-voip] UDS Searches not sanitizing the Plus Symbol

2017-04-12 Thread Nathan Reeves
Taking a look around at what options we have to drive additional
directories for our IP phones and decided to take a quick look at using UDS
as the data source, accessing it via the published API.

One thing I'm finding (which I can't see any bug report on), is that number
searches, where the number in UDS contains a plus, does not return search
results based on the query submitted.

I have a user configured with a mobile number in PlusE164 (+6140011 for
example) which is pulled into the CUCM directory via LDAP sync.

The API docs note that brackets, plus symbols etc are all ignored in the
search.  When I access the UDS API and construct a query string in a URL
along the lines of 'https://172.20.2.21:8443/cucm-uds/users?number=61400',
the returned response is 0 results.  If I update the Mobile number to
remove just the plus (and resync LDAP), the same search now returns my user
with the mobile number correctly searched.

Running 11.5(1)SU1 (haven't yet checked this against SU2), attempted to use
native UDS but also tried searching while UDS Proxy is enabled.  Same
results either way.

Anyone seen this issue or am I missing something?  I can only assume that
the sanitized query doesn't correctly ignore the plus symbol.

Cheers

Nathan
___
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip