[Serusers] how to get calls from pstn
Jan Janak
jan at iptel.org
Sun May 9 18:58:00 CEST 2004
On 08-05 01:34, Kapil Dhawan wrote:
> 1. Static way, do the coding in ser.cfg
>
> add alias='gateway ip address' in ser.cfg to make it a local added domain
>
> if(uri=~"number at gateway.com")
> {
> rewriteuri("");
> rewritehost();
> break;
> }
>
>
> so if the call is coming from gateway....it will change the To field....to
> the respective SIP address..
Better configure the PSTN gateway to put the domain name of the proxy
into Request-URI -- then you don't have to rewrite anything. Any PSTN
gateway should be able to do that.
> 2. Dynamic way, write a module (C ocde), where you can create one file
> which will have all the incoming gateway pstn numbers and to which SIP
> address it should be transferred and write a function to do the replacement.
This is not necessary, simply configure the gateway to put
sip:1234 at domain.com if the called number is 1234 and the domain of the
SIP server is domain.com.
Then you can create aliases to forward the numbers wherever you want,
for example 1234 at domain.com -> joe at domain.com
Jan.
More information about the sr-users
mailing list