[Serusers] Complex routing

andrew matthews exstatica at gmail.com
Thu Jul 14 20:00:58 CEST 2005


I'm looking for a way to look up a phone number and then prepending a prefix 
to the number then forwarding it to a host...


Basicly something like this

result=exec('/home/scripts/lookup.pl 800-555-1212')


if(result)
# Lookup failed, assume that this is a phonenumber URL until I setup pattern 
matching
# Send to the TNT
xlog("L_INFO", "Sending URI (%ru) to TNT");
prefix(result);
rewritehostport("10.1.1.5:5060 <http://10.1.1.5:5060>")
};



basicly then result would contain 333, or 555, or 777. Depending on then 
number that was returned from lookup.pl


is there anyway to do this? Or any other way to do it?

Thanks

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050714/97fff85d/attachment.htm>


More information about the sr-users mailing list