[Serusers] Routing unknown users to PSTN
Klaus Darilion
klaus.mailinglists at pernau.at
Wed Mar 24 14:43:33 CET 2004
Does your cients have random phone numbers or are they all in the same
block? IF you have a numer block, e.g. 321XXXX, just use
if (uri=~"^sip:321[0-9][0-9][0-9][0-9]")
lookup(location)
....
else
forward to PSTN
If the internal numbers are random, you can use e.g. a second location
table (let's call it location2). It will have the same structure as the
location (or alias) table and you have to enter every client, and using
its local account as contact (so lookups will not change the request-uri)
then the proxy could do:
if (lookup("location2")) {
user is a local user
if (lookup("location")) {
#user is online
t_relay()
} else {
sl_send_reply("404","offline");
}
else {
#no local client
t_relay_to_tcp("gateway-ip");
}
If someone knows an easier solution I'm pleased to hear it.
regards,
klaus
Andreas Granig wrote:
> Hi,
>
> I'd like to use official phone numbers inside my voip network (the
> numbers are assigned to me and are routed to my Cisco-5300 gateway in
> case of an incoming call from PSTN), and I don't want to use a prefix
> when calling from voip to PSTN.
>
> Now when I want to perform a call from the voip net, how can I decide
> wether it's an internal voip call or should be routed to the PSTN gateway?
>
> Would it be a proper solution to just lookup in the aliases- and
> location-table, and, if not found there, just forward it to the PSTN
> gateway? The PSTN gateway should then route it back to my SER if it's a
> number assigned to me, and I'd get a loop, which should be detected by
> the mf_process_maxfwd_header() function.
>
> Sounds like a ugly hack, and I'm really not shure if this would work, so
> how would be the standard solution for such a task? (beside using a PSTN
> prefix)
>
> Regards,
> Andy
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>
More information about the sr-users
mailing list