Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Daniel Tryba
On Tuesday 01 September 2015 17:37:36 Michael Nielsen wrote: > What if I just want to lookup the country code IF the country code is not > set. > Then queries to MySQL for this would only be made in the cases where the > subscriber do not type in + or 00? if(!$rU!="^(\+|00)") > I've tried to loo

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Michael Nielsen
What if I just want to lookup the country code IF the country code is not set. Then queries to MySQL for this would only be made in the cases where the subscriber do not type in + or 00? I've tried to look at avpops which apparently uses the usr_preferences as standard - but without any luck... O

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Daniel Tryba
On Tuesday 01 September 2015 16:43:42 Michael Nielsen wrote: > If I want to load a user specific country code, using avp, how can I do > this? > > I've added kamctl avp add MY-SUBSCRIBER countrycode 0 +44, so +44 is added > to usr_preferences. > > But calling $avp(countrycode) doesn't seem to giv

Re: [SR-Users] during registration nonce expired, after backwards time shift

2015-09-01 Thread Vasiliy Ganchev
Hi Daniel! Any comments/idea about my last answer? cheers -- View this message in context: http://sip-router.1086192.n5.nabble.com/during-registration-nonce-expired-after-backwards-time-shift-tp140536p140945.html Sent from the Users mailing list archive at Nabble.com. ___

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Michael Nielsen
Perfect, thank you. It works - I'm not using your areacode in my code. If I want to load a user specific country code, using avp, how can I do this? I've added kamctl avp add MY-SUBSCRIBER countrycode 0 +44, so +44 is added to usr_preferences. But calling $avp(countrycode) doesn't seem to give m

Re: [SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Daniel Tryba
On Tuesday 01 September 2015 13:45:16 Michael Nielsen wrote: > Is it possible to, if a subscriber has not entered either + or 00, to > append the value from country_code of the specific subscriber to the > dialled number? > > And if the user has dialled 00, to replace it with +. Offcourse that is

Re: [SR-Users] OT: some github stuff

2015-09-01 Thread Daniel-Constantin Mierla
Hello, to update on this topic: at the end I added a new file README.md with informative details about project, mentioning the main README as the file for documentation and pointing to various resources of the project. The file can be seen at: * https://github.com/kamailio/kamailio/blob/master

[SR-Users] Add country code on incoming calls - if not present

2015-09-01 Thread Michael Nielsen
I've added a custom column in my subscriber table in MySQL - called country_code. This contains +44 etc. for subscribers. Is it possible to, if a subscriber has not entered either + or 00, to append the value from country_code of the specific subscriber to the dialled number? And if the user has

Re: [SR-Users] Add PSTN gateway with authentication credentials

2015-09-01 Thread Michael Nielsen
I see, it actually seems to work... I haven't added anything in the database, but just typed the username and password directly in kamailio.cfg - as mentioned in: http://kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth() On Tue, Sep 1, 2015 at 11:59 AM, Daniel-Constantin Mierla wr

Re: [SR-Users] blocking call in between two kamailio proxy

2015-09-01 Thread Daniel-Constantin Mierla
On 01/09/15 11:30, Daniel Tryba wrote: > On Tuesday 01 September 2015 02:12:04 sscc wrote: >> one more question where to put this code? in invite? or registrar? > > It only makes sense for invites. Propably best to do it immediatly after > lookup()/alias_db_lookup(). > > Actually, lookup will ch

Re: [SR-Users] Add PSTN gateway with authentication credentials

2015-09-01 Thread Daniel-Constantin Mierla
Hello, the documentation of the uac module has the relevant bits in the example of uac_auth() function: - http://kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth() In short, before relying to the PSTN gateway first time, set the failure_route handler as in the example pointed a

Re: [SR-Users] blocking call in between two kamailio proxy

2015-09-01 Thread Daniel Tryba
On Tuesday 01 September 2015 02:12:04 sscc wrote: > one more question where to put this code? in invite? or registrar? It only makes sense for invites. Propably best to do it immediatly after lookup()/alias_db_lookup(). ___ SIP Express Router (SER) an

Re: [SR-Users] blocking call in between two kamailio proxy

2015-09-01 Thread sscc
thank you so much Daniel-Constantin Mierla and Daniel Tryba for thew guidance. one more question where to put this code? in invite? or registrar? reards sscc. -- View this message in context: http://sip-router.1086192.n5.nabble.com/blocking-call-in-between-two-kamailio-proxy-tp140893p140911

Re: [SR-Users] blocking call in between two kamailio proxy

2015-09-01 Thread Daniel-Constantin Mierla
On 01/09/15 10:08, Daniel Tryba wrote: > On Tuesday 01 September 2015 08:58:30 Daniel-Constantin Mierla wrote: >> if($rd!=$fd) { >> send_reply("403", "Call outside the domain"); >> exit; >> } > What is stopping from people from setting $fd to the desired domain? Isn't > $ad > a better v

Re: [SR-Users] blocking call in between two kamailio proxy

2015-09-01 Thread Daniel Tryba
On Tuesday 01 September 2015 08:58:30 Daniel-Constantin Mierla wrote: > if($rd!=$fd) { > send_reply("403", "Call outside the domain"); > exit; > } What is stopping from people from setting $fd to the desired domain? Isn't $ad a better var. for this since it isn't dependend on user supplie

Re: [SR-Users] Using PSTN as "fallback"

2015-09-01 Thread Michael Nielsen
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 serv

Re: [SR-Users] Add PSTN gateway with authentication credentials

2015-09-01 Thread Michael Nielsen
So sorry, but do you know of any tutorial using the auc module for authenticating against a PSTN gateway? On Mon, Aug 31, 2015 at 8:57 AM, Michael Nielsen wrote: > Perfect, thanks. > > On Sun, Aug 30, 2015 at 9:37 PM, Alexandru Covalschi <568...@gmail.com> > wrote: > >> Take a look at UAC modul

Re: [SR-Users] authorize a client in bulk registration

2015-09-01 Thread Daniel-Constantin Mierla
It is up to you to require authentication for any of SIP requests processed by Kamailio. To be able to asist further why a call is not authenticated or how to add authentication for it, you have to provide the authentication part of your config (perhaps the route[AUTH]) and a ngrep output for the

Re: [SR-Users] core parameter onsend_route_reply=1 doesn't execute onsend_route block for received replies

2015-09-01 Thread Daniel-Constantin Mierla
Hello, then maybe the function from core that I spotted calling the onsend_route for replies is done only in stateless case. I will look at the tm code and come back with more details. Cheers, Daniel On 31/08/15 19:32, Julia Boudniatsky wrote: > Hello Daniel, > > When I run with debug=3, I don't