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?
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
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#idp15567480
2015-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 VoIP engineer and system administrator phone: +37367398493 web: http://abs-telecom.com/
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#idp15567480
2015-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 VoIP engineer and system administrator phone: +37367398493 web: http://abs-telecom.com/
-- Alexandru Covalschi ABRISS-Solutions VoIP engineer and system administrator phone: +37367398493 web: http://abs-telecom.com/
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
I've added this to my kamailio.cfg (the original which comes with the Debian package of Kamailio 4.2):
-----
# 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?
On Mon, Aug 31, 2015 at 8:57 AM, Michael Nielsen mic.niel84@gmail.com wrote:
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#idp15567480
2015-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 VoIP engineer and system administrator phone: +37367398493 web: http://abs-telecom.com/
-- Alexandru Covalschi ABRISS-Solutions VoIP engineer and system administrator phone: +37367398493 web: http://abs-telecom.com/
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
On 01/09/15 10:00, Michael Nielsen wrote:
I've added this to my kamailio.cfg (the original which comes with the Debian package of Kamailio 4.2):
# 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?
If you have the route[PSTN] from default config file, then inside it there are some checks to see if the dialed number is in international format. You may need to adjust those conditions to fit better your needs.
If the conditions in route[PSTN] are not met, then in some case it returns, meaning that (based on youre xample snippet above), route[LOCATION] is executed as well. Overall should be harmless, as there should be no active record in location table, but if you have other services like voicemail enabled, it is better to send not found if not local subscriber and route[PSTN] returns back.
Cheers, Daniel