Thanks Norm,
That is exactly what I am looking for. It solved my problem. I used the prefix to identify calls that should be routed to a particular carrier by Openser. But this added prefix affects the interop with some applications with the carrier, hence the need to strip off the tags i added.
Rgds,
Tolu
Perhaps the "uac_replace_from()" function is what you are looking for.
Note that modifying the "From:" header is NOT allowed by the standards. Please review the mailing lists in regard to this topic as it's been discussed many times.
OpenSER gives you enough control to "shoot yourself in the foot". It it possible to create a configuration that can solve your "internal business situation" but might cause interoperability problems with others.
Regards,
Norm
> Hi Norm,
>
> Thanks for the quick response.
>
> I was able to use s.substr to perform the string transformations and I got
> the correct value. However, what I am really trying to do is to actually
> re-write the PV ($fU) with the result of s.substr.
>
> For example, I want ($fU) be assigned the value $(fU{s.substr,3,0}); and
> this new value be used as my from_uri; and hence my CallerID.
>
> Thanks again.
>
> Tolu
>
> On 8/18/07, Norman Brandinger <norm@goes.com> wrote:
>>
>> Take a look at the following documentation. Take special note of 'substr'
>>
>> http://openser.org/dokuwiki/doku.php/transformations:1.2.x
>>
>> Regards,
>> Norm
>>
>>
>> > Hi all,
>> >
>> > I am trying to re-write the from_uri ($fU) for all calls coming from my
>> > Asterisk server before sending it to the PSTN. I usually prefix the ANI
>> in
>> > asterisk with "222" to route it to openser, and then openser simply
>> > forwards the call to the PSTN. The problem is that 222+ANI appears as my
>>
>> > caller id and is unacceptable. Can anyone give me hint to strip out this
>>
>> > prefix in openser.
>> >
>> > Thanks.
>> >
>> > Tolu
>> > _______________________________________________
>> > Users mailing list
>> > Users@openser.org
>> > http://openser.org/cgi-bin/mailman/listinfo/users
>> >