[Serusers] e164 rewrite script
Java Rockx
javarockx at gmail.com
Mon Apr 18 16:39:12 CEST 2005
Matt,
This is what I use to dial local directory assistance. When a user dials 411
we rewrite the R-URI. So if use account 4073191122 dials 411 the R-URI gets
massaged to 14075551212 and then sent out the PSTN gateway.
Regards,
Paul
avp_write("$from", "i:34");
avp_pushto("$ruri", "i:34");
strip_tail(7);
subst_uri('/^sip:([0-9]+)@(.*)$/sip:\15551212@\2/i');
avp_delete("i:34");
On 4/18/05, Matt Schulte <mschulte at netlogic.net> wrote:
>
> Ok this is all fairly easy except for 7 digit dialing (usa), the problem
> I'm having is how do I get the area code added to the 7 digits. I was
> going to use the user@ to produce this but am unsure how, eg:
>
> from: +16365551212
> dialed: 5551111
>
> should look like dialed: +16365551111
>
> Thoughts?
>
> -----Original Message-----
> From: Matt Schulte
> Sent: Friday, April 15, 2005 1:44 PM
> To: serusers at lists.iptel.org
> Subject: [Serusers] e164 rewrite script
>
> Does anyone have a config to convert phone numbers (user@) to e164
> numbers? Mainly american numbers.. Would save me a bit of time, else I
> can try to write something out.. Thanks.
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050418/3fbf2d0b/attachment.htm>
More information about the sr-users
mailing list