[OpenSIPS-Users] Pre append area code to dialed phone number

Mike O'Connor mike at oeg.com.au
Fri Sep 2 01:22:41 CEST 2011


Hi Brett

So I need to rewrite the R-URI, the command which does this is
'rewriteuser' which only touches the actual phone number in the
sip:1233 at domain.

Issue is when ever I try to use a stored value opensips will not start.

$var(new_ruri) = "08" + $tU;
rewriteuser($var(new_ruri));

or

$avp(s:new_ruri) = "08" + $tU;
rewriteuser($avp(s:new_ruri))

What is the correct method of do this ?

Also how would I break apart the TO field so that I can just edit the
phone number. (I'll only do this if I find I really need to do so)

Thanks for all the emails
Mike



On 1/09/11 11:22 PM, Brett Nemeroff wrote:
> On Thu, Sep 1, 2011 at 4:51 AM, Mike O'Connor <mike at oeg.com.au
> <mailto:mike at oeg.com.au>> wrote:
>
>
>     So I need another method of rewriting the phone number, the $tU
>     does not
>     allow R/W so I need another function which will allow me to edit
>     the $tU
>     field.
>
>
> Careful here.. Normally rewriting the TO or FROM headers is
> undesirable. This is only necessary when connecting to broken
> equipment. Normally you should only re-write the RURI and leave the TO
> as is.
>
> -Brett
>
>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list