Hi all,
I have a question about routing a call to GW when user isn't in location table.
If I have a user with SIP address:
sip:mister@no.com,
and his alias in form of his business phone on office PBX:
alias = 1234
can SER use number in aliases and rewrite sip:mister@no.com to mailto:1234@no.com 1234@no.com?
sip:mister@no.com -> "404 Not Found" -> use aliases -> sip:1234@no.com -> t_relay -> GW -> PBX
or something like that. So if someone could explain me how can I do this. Do I need some external application to do that and return PSTN number to SER? Or how can I do forking with SER?
thanks
davor jovanovic wrote:
sip:mister@no.com -> “404 Not Found” -> use aliases -> sip:1234@no.com -> t_relay -> GW -> PBX
Maybe something like that?
route{ ... t_on_failure("1"); t_relay(); } failure_route[1]{ if(t_check_status("404")){ lookup("aliases"); rewritehostport("your.gateway", "5060"); t_relay(); } }
HTH, Andy
Hi,
Andreas Granig wrote:
davor jovanovic wrote:
sip:mister@no.com -> “404 Not Found” -> use aliases -> sip:1234@no.com -> t_relay -> GW -> PBX
Maybe something like that?
route{ ... t_on_failure("1"); t_relay(); } failure_route[1]{ if(t_check_status("404")){ lookup("aliases"); rewritehostport("your.gateway", "5060"); t_relay(); } }
If you want to use something external (e.g. LDAP directory lookup) instead of using aliases, substitute lookup("aliases"); with exec_dset("/your/external/script");
You will need to write "/your/external/script" to suit your needs.
Nimal R.
Thanks,
Using SER and LDAP directory is my next step, because all my users are in LDAP but I was wondering is it possible extract phone number from alias...
I already checked SER and LADP script from Columbia University, and will try to implement something like that.
davor
-----Original Message----- From: serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] On Behalf Of Nimal Ratnayake Sent: Tuesday, August 09, 2005 10:07 AM To: serusers@lists.iptel.org Subject: Re: [Serusers] forking with SER
Hi,
Andreas Granig wrote:
davor jovanovic wrote:
sip:mister@no.com -> "404 Not Found" -> use aliases -> sip:1234@no.com -> t_relay -> GW -> PBX
Maybe something like that?
route{ ... t_on_failure("1"); t_relay(); } failure_route[1]{ if(t_check_status("404")){ lookup("aliases"); rewritehostport("your.gateway", "5060"); t_relay(); } }
If you want to use something external (e.g. LDAP directory lookup) instead of using aliases, substitute lookup("aliases"); with exec_dset("/your/external/script");
You will need to write "/your/external/script" to suit your needs.
Nimal R.
_______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi Andreas,
Thank you very much for replay!
I have already tried something like that but it doesn't work. I already have failure route and it works fine for numerical destinations, that is, if user isn't in usrloc call is redirected to GW (if I call him by alias). But when I try to replace original sip address with one in aliases [lookup("aliases"); -> rewritehostport] SER doesn't do it. Instead of "rewritehostport" I should have something that will rewrite username with alias not just host and port.
I'm not even sure if this is possible, can SER work this way?
davor
-----Original Message----- From: Andreas Granig [mailto:andreas.granig@inode.info] Sent: Monday, August 08, 2005 8:32 PM To: davor jovanovic Cc: serusers@lists.iptel.org Subject: Re: [Serusers] forking with SER
davor jovanovic wrote:
sip:mister@no.com -> "404 Not Found" -> use aliases -> sip:1234@no.com -> t_relay -> GW -> PBX
Maybe something like that?
route{ ... t_on_failure("1"); t_relay(); } failure_route[1]{ if(t_check_status("404")){ lookup("aliases"); rewritehostport("your.gateway", "5060"); t_relay(); } }
HTH, Andy
-----Original Message-----
Hi all,
I have a question about routing a call to GW when user isn't in location table.
If I have a user with SIP address:
sip:mister@no.com,
and his alias in form of his business phone on office PBX:
alias = 1234
can SER use number in aliases and rewrite sip:mister@no.com to 1234@no.com?
sip:mister@no.com -> "404 Not Found" -> use aliases -> sip:1234@no.com -> t_relay -> GW -> PBX
or something like that. So if someone could explain me how can I do this. Do I need some external application to do that and return PSTN number to SER? Or how can I do forking with SER?
thanks
davor jovanovic wrote:
I have already tried something like that but it doesn't work. I already have failure route and it works fine for numerical destinations, that is, if user isn't in usrloc call is redirected to GW (if I call him by alias). But when I try to replace original sip address with one in aliases [lookup("aliases"); -> rewritehostport] SER doesn't do it. Instead of "rewritehostport" I should have something that will rewrite username with alias not just host and port.
But that's exactly what lookup("aliases") does.
Let's say you have a user "foo" with the URI "sip:foo@bar.com" in your location table, and an alias "sip:+12345@your.gw.ip" for this user, then in failure route the URI "sip:foo@bar.com" is replaced by "sip:+12345@your.gw.ip" when calling lookup("aliases");
The rewritehostport() is only needed when the host/port part in the aliases table doesn't reflect your real PSTN gateway.
Andy