thank you
Le 31/05/2010 10:34, Klaus Darilion a écrit :
Am 31.05.2010 13:57, schrieb Meftah Tayeb:
> hello,
> how do i route calls from local registered users to a pstn gateway?
1. analyze the RURI to find out if the called user is a phone number,
e.g.:
if ($rU ~= "\+1[1-9]*") {
route(11); # PSTN
} else {
route(12); # local user
}
exit;
2. route to gateway
route[11] {
# if needed apply number reformating if the dialing plan
# of the SIP proxy is different then the dialing plan of the
# gateway. we change the userpart of the request URI (RURI)
strip(1);
prefix("00");
# send to gateway. for example by changing the host-part
# of RURI
$rd = "1.2.3.4"; # IP address of the gateway
# forward to gateway and exit;
t_relay();
exit;
}
regards
Klaus
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users