You can redirect calls to a PSTN gateway using this kind of routing :
if (method=="INVITE")
{
if (uri=~"sip:011[0-9]+@.*") # Here we check the number dialed
{
#authorize if a call is going to PSTN
if(!proxy_authorize("domain.net", "subscriber"))
{
proxy_challenge("domain.net", "0");
return;
};
xlog("L_INFO", "CALL: Call to international number\n");
rewritehostport("voip_gw.domain.net:5060"); # rewriting SIP headers
route(1);
}
By checking the uri and rewriting destination host you can route your PSTN calls to a PSTN
gateway. The gateway can be an Asterisk PBX, a SIP/PSTN appliance or any kind of SIP
provider, I guees you already know that. The example above is taken from openser and
asterisk realtime integration.
----- Original Message -----
From: "Marc LEURENT" <lftsy(a)free.fr>
To: users(a)openser.org
Sent: mercredi 18 juillet 2007 10 h 02 (GMT+0100) Europe/Berlin
Subject: [OpenSER-Users] Redirect to Trunk IP SIP/PSTN gateway + billing
Does anyone succeed in redirecting SIP calls like [0-9]*(a)sip.test.com to
a SIP/PSTN gateway provider without using asterisk?
Thanks
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
--
Julien REVERET
OSIATIS - LIFO
https://www.lifo-osiatis.com