Re: [asterisk-users] PJSIP does not qualify contacts after starting Asterisk
pjsip realtime, especially related to contacts, has been worked on a bunch over the last few releases. Honestly I don't remember what went into which release but do try 13.9.1 and let us know. You can also try using the following statements in sorcery.conf and see if it changes anything. Don't use them in production because full_backend_cache and allow_unqualified_fetch have performance implications. aor/cache=memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=3600,full_backend_cache=yes aor=realtime,ps_aors,allow_unqualified_fetch=warn On Mon, Jun 13, 2016 at 9:42 AM, Francisco Valentin Vinagrero < francisco.valentin.vinagr...@cern.ch> wrote: > Hi, > > > > So basically you’re doubling all the lines with a failover to the > pjsip.conf file. What do you have in that file? > > > > For me it didn’t work. Whenever I add or update a contact in the ps_aors > table, I get that the contacts are created but not qualified. > > > > Cheers, Francisco. > > > > *From:* asterisk-users-boun...@lists.digium.com [mailto: > asterisk-users-boun...@lists.digium.com] *On Behalf Of *Annus Fictus > *Sent:* 13 June 2016 14:34 > > *To:* Asterisk Users Mailing List - Non-Commercial Discussion < > asterisk-users@lists.digium.com> > *Subject:* Re: [asterisk-users] PJSIP does not qualify contacts after > starting Asterisk > > > > Hello, > > in which moment Asterisk leave to qualify the realtime endpoint? When you > restart Asterisk? > > On my asterisk 13.9.1, qualify on realtime endpoints works correctly. My > sorcery.conf: > > [res_pjsip] > endpoint=realtime,ps_endpoints > endpoint=config,pjsip.conf,criteria=type=endpoint > auth=realtime,ps_auths > auth=config,pjsip.conf,criteria=type=auth > aor=realtime,ps_aors > aor=config,pjsip.conf,criteria=type=aor > domain_alias=realtime,ps_domain_aliases > domain_alias=config,pjsip.conf,criteria=type=domain_alias > contact=realtime,ps_contacts > contact=config,pjsip.conf,criteria=type=contact > > [res_pjsip_endpoint_identifier_ip] > identify=realtime,ps_endpoint_id_ips > identify=config,pjsip.conf,criteria=type=identify > > Regards > > > > El 13/06/2016 a las 14:16, Francisco Valentin Vinagrero escribió: > > Hi, > > > > Yes, we’re implementing the dialplan in realtime too. > > > > Here the contents of sorcery.conf: > > > > [res_pjsip] > > endpoint=realtime,ps_endpoints > > aor=realtime,ps_aors > > contact=realtime,ps_contacts > > > > [res_pjsip_endpoint_identifier_ip] > > identify=realtime,ps_endpoint_id_ips > > > > > > Cheers, Francisco. > > > > *From:* asterisk-users-boun...@lists.digium.com [ > mailto:asterisk-users-boun...@lists.digium.com >] *On Behalf Of *Annus Fictus > *Sent:* 13 June 2016 14:11 > *To:* Asterisk Users Mailing List - Non-Commercial Discussion > > *Subject:* Re: [asterisk-users] PJSIP does not qualify contacts after > starting Asterisk > > > > Hello Francisco, > > you have to use: > > extensions => odbc,asterisk > > only if you want use dialplan in Realtime > > can you share your sorcery.conf file? > > Regards > > El 13/06/2016 a las 10:21, Francisco Valentin Vinagrero escribió: > > Hi all, > > (sending this again from the correct address) > > > > I’m running Asterisk 13.8.0 (I need to check if that happens with 13.9.1 > too when I have the time to build it) with PJSIP realtime config. > > > > I’ve defined several aors in the table ps_aors, like this (real url > replaced by myurl): > > > > *CLI> pjsip show aor > pbx-node-1 > > > > > Aor: > > > Contact: > > > > = > > > > > > Aor: pbx-node-1 > 0 > > Contact: pbx-node-1/sip:myurl:5060 771bf6a7d4 Created > 0.000 > > > > > > > > ParameterName: > ParameterValue > > === > > > authenticate_qualify : > false > > contact : sip:myurl:5060 > > > default_expiration : > 3600 > > mailboxes > : > > max_contacts : > 0 > > maximum_expiration : > 7200 > > minimum_expiration : > 60 > > outbound_proxy : sip:myurl:5060 > > > qualify_frequency: > 30 > > qualify_timeout : 3.00 > > > remove_existing : > false > > support_path : > false > > > > > > > > > So I think that those aors should be qualified automatically when I run > Asterisk, but if I do “*pjsip show contacts”*, I get that it was just > Created but not qualified: > > > > > > *CLI> pjsip show contacts > > > > Contact: > > > > = > > Contact: pbx-node-1/sip:myurl:5060771bf6a7d4 Created > 0.000 > > > > > > And not a single OPTIONS message if I take a trace… > > > > > > If I want Asterisk to start sending OPTIONS, I need to do pjsip reload and > after that, they are qualified
Re: [asterisk-users] Pet project: one step Asterisk compile on Centos 7
Off-topic: On Tue, Jun 14, 2016 at 11:02:17AM +0200, Lenz Emilitri wrote: > Project located at https://github.com/l3nz/CompileAsteriskPBX >From the build script: # build Asterisk cd $TARGET_DIR/$ASTVERSION ./configure --libdir=/usr/lib64 cd $TARGET_DIR/$ASTVERSION/menuselect make menuselect cd $TARGET_DIR/$ASTVERSION make menuselect-tree ./menuselect/menuselect \ #[snip menuselect parameters] # we want mp3's ./contrib/scripts/get_mp3_source.sh make (This is not intended to criticise Lenz) All of this magic (specifically the bits before the menuselect) is needed for a proper build? * Why is an explicit libdir packameter needed? What break if it is not passed? * Why is there a need to build menuselect manually? What about 'make menuselect'? Do we need a Makefile target to build menuselect but not run it? -- Tzafrir Cohen icq#16849755 jabber:tzafrir.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Pet project: one step Asterisk compile on Centos 7
On Tue, Jun 14, 2016 at 06:22:05PM +0200, Lenz Emilitri wrote: > 2016-06-14 17:44 GMT+02:00 Tzafrir Cohen: > > > > 1. Asterisk basically has such a script inside. > > It is - as you say - inside. This is outside and does the download for you. > > > 2. Asterisk has an RPM package. An RPM package is exactly a reproducible > > build (listing dependecies, and such). > > It's true. They are very interesting, especially if you are a > historian of software. > http://packages.asterisk.org/centos/ > > If you need something less, say, "vintage", you may need to compile it > yourself. > > > 3. You are reinventing RPM. Badly. Do you people really want to run: > >- As root > >- A huge blob nobody can inspect > >- that is executable, and hence has tons of places to add nice hooks > > in? > > > > Learn how to use rpmbuild. > > I personally happen to have shipped RPMs for about 10 years now. But > building a RPM might be overkill if you are deploying a test, > throwaway box, or just once for a Docker image. Of course I would not > use this as an RPM substitute, and if I were to use something like > this I'd fork it or at least read it (it is maybe 20 lines). YMMV. > > And IIRC there is more places to ship "nice hooks" into a binary you > ship as an RPM than in a shell script that does what you would > manually from the terminal! RPM is one of the common formats to describe building of a package. There are other such similar formats, but if you're on Centos, RPM is already included with the platform, and hence it makes sense to use it. An RPM package is an archive (technically: cpio. But you don't get direct access to that) with a small dictionary attached in front of it. That dictionary specifies the name, version, revision, and many other fields. There are basically two types of RPM packages: source and binary. Binary ones ar ethe products of builds. Source ones describe how to build, and thus they are the ones that interest us. A source RPM package has in its archive a spec file, sources (one or more) and patches (zero or more). The spec includes instructions how to build a binary package. So if you don't have any patches, the one thing you need to maintain is ths spec file. Everything else (including the source tarball) could be automated using the standard RPM build toolchain. It would also be nice if you could verify the signature on the tarball[0]. I personally prefer git-buildpackage-rpm that allows keeping the "tarballs" in git. You can either use tags directly to get tarballs from, or use pristine tar to store the delta between a tarball and a tag. But right now this is not a standard tool on Centos systems, and you'll have to install it on your own[1]. The standard RPM+Git toolchain in Fedora seems to be fedpkg[2], but I think it would take quite some tweaking to make it work with your own seperate tarball repository. I don't think it is useful for your case, but maybe someone more familiar than me can give an answer. If you really want to avoid conaminating the build system with all of those packages, do a chroot build inside mock (supported by the above two, or directly). A bit slower, and a longer debugging cycle, but keeps your system clean. It has support for caching downloaded packages and such. So in short, one proposed method: 1. Install git-buildpackage-rpm 2. Clone the package asterisk 3. Create a branch called, say, packaging, with: rpm/asterisk.spec debian/gbp.conf # Why Debian. that's the way it is cat
Re: [asterisk-users] Pet project: one step Asterisk compile on Centos 7
2016-06-14 17:44 GMT+02:00 Tzafrir Cohen: > > 1. Asterisk basically has such a script inside. It is - as you say - inside. This is outside and does the download for you. > 2. Asterisk has an RPM package. An RPM package is exactly a reproducible > build (listing dependecies, and such). It's true. They are very interesting, especially if you are a historian of software. http://packages.asterisk.org/centos/ If you need something less, say, "vintage", you may need to compile it yourself. > 3. You are reinventing RPM. Badly. Do you people really want to run: >- As root >- A huge blob nobody can inspect >- that is executable, and hence has tons of places to add nice hooks > in? > > Learn how to use rpmbuild. I personally happen to have shipped RPMs for about 10 years now. But building a RPM might be overkill if you are deploying a test, throwaway box, or just once for a Docker image. Of course I would not use this as an RPM substitute, and if I were to use something like this I'd fork it or at least read it (it is maybe 20 lines). YMMV. And IIRC there is more places to ship "nice hooks" into a binary you ship as an RPM than in a shell script that does what you would manually from the terminal! l. -- Loway - home of QueueMetrics - http://queuemetrics.com Try the WombatDialer auto-dialer @ http://wombatdialer.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Pet project: one step Asterisk compile on Centos 7
On Tue, Jun 14, 2016 at 11:02:17AM +0200, Lenz Emilitri wrote: > Hi all, > I thought I'd share I script I made (based on some of Leif's works) > that lets you download, compile and install Asterisk all in one go; > and then removed the dev tools used. > > We use it quite a bit to provision systems using Ansible, but it is > easier than remembering everything every time even if you are using a > shell. > > At the moment I have scripts for Centos 7 and Asterisk 13, but plan to > port them to other versions of Asterisk as there is a need to do so. > Contribs welcome! > > Project located at https://github.com/l3nz/CompileAsteriskPBX 1. Asterisk basically has such a script inside. 2. Asterisk has an RPM package. An RPM package is exactly a reproducible build (listing dependecies, and such). 3. You are reinventing RPM. Badly. Do you people really want to run: - As root - A huge blob nobody can inspect - that is executable, and hence has tons of places to add nice hooks in? Learn how to use rpmbuild. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Pet project: one step Asterisk compile on Centos 7
Hi all, I thought I'd share I script I made (based on some of Leif's works) that lets you download, compile and install Asterisk all in one go; and then removed the dev tools used. We use it quite a bit to provision systems using Ansible, but it is easier than remembering everything every time even if you are using a shell. At the moment I have scripts for Centos 7 and Asterisk 13, but plan to port them to other versions of Asterisk as there is a need to do so. Contribs welcome! Project located at https://github.com/l3nz/CompileAsteriskPBX Thanks l. -- Loway - home of QueueMetrics - http://queuemetrics.com Try the WombatDialer auto-dialer @ http://wombatdialer.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users