[Serusers] How Can I Rewrite The URI When Dialing 411 Directory Assistance
Java Rockx
javarockx at yahoo.com
Sun Dec 5 02:12:27 CET 2004
Hi All.
Just in case anyone needs to do this same thing here is how I got it to work:
Regards,
Paul
route {
# usual stuff
if (method=="INVITE" && uri=~"^sip:411 at .*") {
# flag 30 is set by a call to is_user_in() to check
# for membership in a group I called "411"
if (isflagset(30)) {
avp_write("$from", "i:34");
avp_pushto("$ruri", "i:34");
# this assumes **ALL** subscribers use a 10-digit
# telephone number as their username
strip_tail(7);
subst_uri('/^sip:([0-9]+)@(.*)$/sip:\15551212@\2/i');
route(3); # send to PSTN gateway
break;
};
# reply 503 since the user doesn't have acl 411 granted
sl_send_reply("503", "Service Unavailable");
break;
};
# lookup aliases, lookup location, etc, etc
}
--- Java Rockx <javarockx at yahoo.com> wrote:
> Hi All.
>
> When someone dials 411 I want to rewrite the request before sending it out to the PSTN gateway.
>
> For example if my SIP phone user name is 4071234567 and I dial 411 I want to send the request
> out
> to the PSTN gateway as 4075551212 for directory assistance so that the subscriber's __local__
> directory assistance is dialed.
>
> How can I do this using -dev23?
>
> Regards,
> Paul
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
More information about the sr-users
mailing list