Well some of the details will depend upon the site you are trying to
reach. Basically
you want to determine the caller is part of your domain, authenticate
them if
you so choose the determine how to process the INVITE message. One possible
approach is:
if (uri=~"^sip:[3468][0-9]{4}@bigcompany.com")
{
xlog("L_INFO", "\n[SER]: Outbound on-campus call. Going to route
block #2\n");
route(2);
break;
};
This will check the request uri to see if it begins with sip: followed
by either a 3,4,6 or 8
followed by four digits with each digit ranging from 0-9. If there is a
match call
flow jumps to route block #2 (my own choice of numbering). Route block #2
does:
route[2] {
xlog("L_INFO", "\n[SER]: Route block #2 campus 5-digit extensions:
Time: [%Tf] Method: <%rm> From uri <%fu> To < %tu> IP source
address <%is>
R-uri: <%ru> Contact Header: <%ct> \n\n");
rewritehostport("18.9.6.8:5060");
t_on_failure("1");
t_relay();
break;
}
This is a scaled down version of what I actually do. It is for
illustration purposes only.
The IP address in the rewritehostport statement is the address of my
primary PSTN
gateway. The t_on_failure will cause call flow to be directed at the
backup PSTN
gateway should the primary be unavailable.
Good luck,
Steve
Edgardo O. Gonzales II wrote:
Hi!
Can somebody teach me how to enable call routing .. Meaning if the
called number is not on my
routing table, I will forward the request to another sip gatekeeper ..
Need it so badly.. please help ..
thanks,
ed
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
--
ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104
voice: 215-573-8396
215-746-8001
fax: 215-898-9348
sip:blairs@upenn.edu