[Serusers] forward to PSTN

Ri Liang rliang at callmyway.com
Tue May 25 22:24:37 CEST 2004


Please adivise if there any variable that i can get some data from the
MySql.

My problem is as follow:

When a particular user (for example 123 at foo.bar)  need to call to PSTN, we
need to sent in the "From" part as 456 at foo.bar, because the PSTN provider
needs the 456 to authenticate.

so we need some way to transform the "From" part of the user from
123 at foo.bar ----> 456 at foo.bar before forward the call to PSTN.

I think that it may be someting like (of course, the lookup2() is what i am
looking for)
......

 if  ( PSTN_pin = lookup2 ("pin_table") ) {

subst('/^From:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/From:\1sip:PSTN_pin at pstn.foo.
bar\2/g');
            forward( pstn.foo.bar, 5060 );
           break;
}
........

Thanks

Ri Liang





More information about the sr-users mailing list