Re: [reSIProcate-users] Checking if user=ip or user=phone in To/From field
- From: Andrew Wood <ajwood@xxxxxxx>
- Date: Sun, 21 Dec 2008 20:18:06 +0000
Thanks Adam & Jason
On 20 Dec 2008, at 17:17, Adam Roach wrote:
Andrew Wood wrote:
How do you do this? I thought it was maybe the userParameters()
method in the Uri class but it hasnt returned anything/
userParameters() will return parameters in the user portion of the
URI. So, for example, if you have a URI like this:
sip:adam;foo=bar@xxxxxxxxxxx;user=phone
Then you could get the "foo=bar" part of the user with
uri.userParameters().
What you want is uri.param(p_user). Be sure to check
uri.exists(p_user) before trying to read it (unless you're prepared
to catch the exception that's thrown when you try to read a non-
existent parameter).
/a
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Andrew
Recommends you try OpenOffice.org - I'm
Microsoft free, you too can be.