2 # Written by Ryan Kereliuk <ryker@ryker.org>. This file may be
3 # distributed under the same terms as Perl itself.
5 # The RFC 3261 sip URI is <scheme>:<authority>;<params>?<query>.
11 require URI::_userpass;
12 @ISA=qw(URI::_server URI::_userpass);
15 use vars qw(@ISA $VERSION);
16 use URI::Escape qw(uri_unescape);
20 sub default_port { 5060 }
25 $$self =~ m,^($URI::scheme_re:)?([^;?]*)(.*)$,os or die;
30 $$self = defined($1) ? $1 : "";
33 $auth =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
44 $$self =~ m,^((?:$URI::scheme_re:)?)(?:([^;?]*))?(;[^?]*)?(.*)$,os or die;
52 for (my $i=0; $i < @args; $i += 2) {
53 push(@new, "$args[$i]=$args[$i+1]");
55 $paramstr = join(";", @new);
56 $$self .= ";" . $paramstr . $rest;
59 return split(/[;=]/, $paramstr);
65 $$self =~ m,^((?:$URI::scheme_re:)?)(?:([^;?]*))?(;[^?]*)?(.*)$,os or die;
72 $$self .= $paramstr . $rest;
78 # Inherited methods that make no sense for a SIP URI.