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@foo.bar) need to call to PSTN, we need to sent in the "From" part as 456@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@foo.bar ----> 456@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@pstn.foo. bar\2/g'); forward( pstn.foo.bar, 5060 ); break; } ........
Thanks
Ri Liang