# dispatch destinations to PSTN if not a subscriber
if (!is_subscriber("$ru", "subscriber", "3")) {
route(PSTN);
}
# user location service
route(LOCATION);
-----
Is it correctly understood that it first checks if the subscriber is local, if not, it routes to PSTN otherwise it routes locally?
Or does it do both local and PSTN route if the subscriber is local?
I'll look at the auth_db, as I'm not routing to any media-relay on simple calls between subscribers.Only for voicemail and such do I route the calls to my FreeSWITCH.On Sun, Aug 30, 2015 at 9:50 PM, Alexandru Covalschi <568691@gmail.com> wrote:Or well, if you don't use any media-relay you just need http://kamailio.org/docs/modules/4.4.x/modules/auth_db.html#idp155674802015-08-30 22:41 GMT+03:00 Alexandru Covalschi <568691@gmail.com>:it depends on which PBX you use for media relay and which codes when no user available does it return.What I'd suggest is to check if call is coming not from PSTN (if it comes from PSTN - it's for sure must be routed to PBX) and if TRUE, then first send call to PBX and if answer is not 180/183 200 etc. (you can catch that in a specific failure_route) route calls back to PSTN.2015-08-30 12:04 GMT+03:00 Michael Nielsen <mic.niel84@gmail.com>:_______________________________________________I have Kamailio running and connected to a PSTN gateway.My subscribers are named ex. +442071234567 - same as their real GSM number from my PSTN gateway.I'm using the standard kamailio.cfg which ships with version 4.3.When I'm trying to dial SIP client to SIP client I would like to have Kamailio route the call internally if a subscriber exists with ex. +442071234567.If no subscriber exists with ex. +442071234567 it should send it to my PSTN gateway.As it is now it seems as if it are trying to both call "internally" and via the PSTN gateway.How should one fix this issue the best way?
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
--Alexandru Covalschi
ABRISS-Solutions
--Alexandru Covalschi
ABRISS-Solutions
_______________________________________________
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