FreePBX | Register | Issues | Wiki | Portal | Support

No matching peer


(Lmon) #1

Hi, just installed asterisk and freepbx manually ( tar files, no ISO ) - Freepbx asterisk 16 - Freepbx 14.
Trying to register my client ( X-lite ) I get "no matching peer …Etc…"
** I don’t need any RTP or somehting else configured, it will be only internal communications ( ie : only SIP communications wihtout any connection to ‘external world’)
I then so created a basic extension under SIP :slight_smile: 1234, which has all set to 1234 ( id, password, PIN …etc…). so I don’t think an error of auth could be possible ? anyway …
I still get the error. Please find below the logs with SIP debug enabled :

<— SIP read from UDP:81.67.18.XX:50719 —>
INVITE sip:*65@18.218.41.XX:5160 SIP/2.0
Via: SIP/2.0/UDP 172.16.25.XX:50719;branch=z9hG4bK-524287-1—9c9ca66afbd93e67;rport
Max-Forwards: 70
Contact: sip:1234@172.16.25.XX:50719
To: sip:*65@18.218.41.XX:5160
From: "1234"sip:1234@18.218.41.XX:5160;tag=92f0d563
Call-ID: 97566NWE3ZTY2NWQ3NDQ5MGM4NTgxZjYzNzc1YTFkOTc4NzI
CSeq: 1 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 5.5.0 stamp 97566
Content-Length: 334

v=0
o=- 13202122695689513 1 IN IP4 172.16.25.XX
s=X-Lite release 5.5.0 stamp 97566
c=IN IP4 172.16.25.XX
t=0 0
m=audio 60590 RTP/AVP 9 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (13 headers 12 lines) —
Sending to 81.67.18.XX:50719 (NAT)
Sending to 81.67.18.XX:50719 (NAT)
Using INVITE request as basis request - 97566NWE3ZTY2NWQ3NDQ5MGM4NTgxZjYzNzc1YTFkOTc4NzI
No matching peer for ‘1234’ from ‘81.67.18.XX:50719’
[2019-05-12 08:18:16] ERROR[1018][C-0000000e]: rtp_engine.c:474 ast_rtp_instance_new: No RTP engine was found. Do you have one loaded?
[2019-05-12 08:18:16] NOTICE[1018][C-0000000e]: chan_sip.c:26596 handle_request_invite: Failed to authenticate device "1234"sip:1234@18.218.41.XX:5160;tag=92f0d563

<— Reliably Transmitting (NAT) to 81.67.18.XX:50719 —>
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 172.16.25.XX:50719;branch=z9hG4bK-524287-1—9c9ca66afbd93e67;received=81.67.18.XX;rport=50719
From: "1234"sip:1234@18.218.41.XX:5160;tag=92f0d563
To: sip:*65@18.218.41.XX:5160;tag=as097b0148
Call-ID: 97566NWE3ZTY2NWQ3NDQ5MGM4NTgxZjYzNzc1YTFkOTc4NzI
CSeq: 1 INVITE
Server: FPBX-14.0.11(16.3.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘97566NWE3ZTY2NWQ3NDQ5MGM4NTgxZjYzNzc1YTFkOTc4NzI’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:81.67.18.XX:50719 —>
ACK sip:*65@18.218.41.XX:5160 SIP/2.0
Via: SIP/2.0/UDP 172.16.25.XX:50719;branch=z9hG4bK-524287-1—9c9ca66afbd93e67;rport
Max-Forwards: 70
To: sip:*65@18.218.41.XX:5160;tag=as097b0148
From: "1234"sip:1234@18.218.41.XX:5160;tag=92f0d563
Call-ID: 97566NWE3ZTY2NWQ3NDQ5MGM4NTgxZjYzNzc1YTFkOTc4NzI
CSeq: 1 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Really destroying SIP dialog ‘97566NWE3ZTY2NWQ3NDQ5MGM4NTgxZjYzNzc1YTFkOTc4NzI’ Method: ACK

**Any insights ? **
Thanks


#2

Did you accidentally create a pjsip extension? Go to Applications -> Extensions and see what is shown for Type. If it’s pjsip and you want sip, edit the extension, Advanced tab and select Change SIP Driver.

If you want pjsip, you need to connect to the pjsip port (default is 5060). However, your system isn’t listening on 5060 (firewalled off, you disabled pjsip or you changed the port). Fix that issue and set X-Lite to connect to 5060 (or whatever you chose) and you should be good to go.

If the extension is sip and that’s what you want, look at the file
/etc/asterisk/sip_additional.conf
Find the section beginning with [1234] and post it here.


(Lmon) #3

Hi , Thanks for your interest !
I selected port 5160 as I checked and that’s the listening port of Asterisk. I did not changed any settings defined during the install by myself. Should I change the port manually to 5060 ? does it really makes a difference ? ( as I wil nto use pjsip at all ).
btw, I checked, my extension was indeed a sip one.
Here is the content of the file, for the 2 exentions I created to do my test together calling each other , below ( extension 1234 and 6666 ) :

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
[1234]
deny=0.0.0.0/0.0.0.0
secret=1234
dtmfmode=rfc2833
canreinvite=yes
context=from-internal
host=dynamic
defaultuser=
trustrpid=yes
sendrpid=pai
type=friend
session-timers=accept
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
force_avp=no
icesupport=no
rtcp_mux=no
encryption=no
namedcallgroup=
namedpickupgroup=
dial=SIP/1234
accountcode=
permit=0.0.0.0/0.0.0.0
callerid=1234 <1234>
recordonfeature=apprecord
recordofffeature=apprecord
callcounter=yes
faxdetect=no

[6666]
deny=0.0.0.0/0.0.0.0
secret=6666
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
defaultuser=
trustrpid=yes
sendrpid=pai
type=friend
session-timers=accept
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
force_avp=no
icesupport=no
rtcp_mux=no
encryption=no
namedcallgroup=
namedpickupgroup=
dial=SIP/6666
accountcode=
permit=0.0.0.0/0.0.0.0
callerid=6666 <6666>
recordonfeature=apprecord
recordofffeature=apprecord
callcounter=yes
faxdetect=no

Thanks !


#4

Sorry, I misinterpreted what was happening. Registration authenticates and works properly, but attempts to call fail. I suspect that the ‘Failed to authenticate …’ is bogus and the RTP engine error is what was detected.

On a system I built manually, the asterisk.conf file auto-generated by FreePBX was not correct. Instead, I built one manually, matching what a working system (Asterisk samples, but don’t actually install that) used.

My /etc/asterisk/asterisk.conf file:

[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin

[options]
transmit_silence_during_record = yes
languageprefix=yes
execincludes=yes
dontwarn=yes
hideconnect=yes

[files]
astctlpermissions=775

If yours doesn’t have a similar [directories] section, try shutting down FreePBX, putting the above data into the file, checking that user and group are still asterisk, restarting FreePBX. (My system runs under Centos 7; yours is Ubuntu. I don’t know whether that requires any changes in the directories section.)

If no luck, check whether the RTP modules are seen by Asterisk; see


#5

BTW, once you get past the RTP engine issue, you’ll need to set SIP nat to yes and SIP canreinvite to no in Advanced settings (Your extensions are behind Neufbox NAT). I believe that doesn’t change existing extensions, so edit them accordingly. If this is wrong, the call will connect but there will be no audio.

Based on ping times, I suspect that we are only a few km apart. I’m in Paris 6ème and also on SFR.


(Lmon) #6

Hi Stewart1,
indeed, we are not so far …( Sevres )
I tried to add the directories but it now fails asterisk to start. I need to investigate as some modules are indeed not starting, but I don’t see why it should create some problems as I’m not using RTP at all …


#7

My guess is that Ubuntu has a different directory layout that is conflicting. One possibility would be to revert to the old asterisk.conf, take a snapshot, run
make samples
confirm that Asterisk now runs correctly, make a copy of asterisk.conf, revert to the snapshot, set up asterisk.conf from your copy, test.

If that fails, I’d recommend starting over, using CentOS as the base.

Normally, Asterisk proxies media between the endpoints. If extension 101 calls 102, voice RTP packets flow from 101 to Asterisk, which then forwards them to 102. Likewise media from 102 is sent to Asterisk and gets forwarded to 101. It is possible to configure ‘directmedia’, where media packets flow directly between the endpoints, but for endpoints behind NAT, it requires careful configuration of the routers. Also, without RTP, Asterisk would be unable to provide voicemail, play error announcements, record calls, etc.

What you’re doing seems strange to me – setting up your own PBX just for an intercom system seems like using an elephant gun to kill an ant. If you require a PBX, please tell us a little about the application.

For a simple intercom system, I’d just use Skype, WhatsApp, etc.

If privacy is important, see https://signal.org/

If you specifically want SIP, e.g. to use a spare line key on your existing office phone, there are several organizations offering free SIP accounts (with no connection to the PSTN). http://sip2sip.info/ .

There are many VoIP providers (who primarily sell phone service) that offer free calling between customers. If you don’t have incoming numbers with them, there is usually no monthly cost. With some, internal calls can be made with an unfunded account. For example, see https://www.callcentric.com/rate/plans/ – the IP Freedom plan allows calling between extensions on an account, as well as to other Callcentric customers.

Some FreePBX competitors offer a free trial PBX in the cloud for as much as one year, limited to a few extensions or concurrent calls.

If you really want to set up your own cloud FreePBX, consider getting a KVM or similar VPS that can install from the official FreePBX Distro .iso file. A few clicks and you’re ready to go. Also, some VPS providers have ready-to-install templates with FreePBX or similar (PIAF, etc.)

If you want to run on AWS, GCP, etc. installing from scratch, it’s easiest if you start with the same base OS that the corresponding FreePBX version uses. Take a look at my script described at https://www.dslreports.com/forum/r32387107- . It’s designed for GCP but it’s unlikely to need much change to run on AWS.


#8

Debian doesn’t separate 64 bit and 32 libraries

But FreePBX doesn’t like the (!) On the first line anymore if you install from scratch.


#9

If lib64 is replaced with lib in the file posted earlier, do you think that should work correctly in Ubuntu?


#10

If you install from scratch, it will generate the paths as needed by the OS in force , but for whatever reason the (!) now causes a bitch, (I believe as you go from 13 to 14 or start with 14+)

Other than that, Yep :slight_smile:


(Lmon) #11

Hi all,
To aswers questions in order :

  • I’m using freepbx to have a PBX to perform demo for another product where I will need an IVR ( which will be my 2nd step when I will be able to perform calls )
  • I must stick to ubuntu as the other product is only working on ubuntu ( or Red hat … ).
  • for the same reason, I can not use the ISO distribution ( infortunatly … ), and can not use the free trial other competitors ( like 3CX …)

I’m still investigating on the issues around RTP then …will keep you posted


#12

The RTP issues are likely your edge router, so will likely be a problem with any SIP server, fusionPBX will give you a Debian based sip IVR in minutes (Ubuntu in this case IS Debian) , FreePBX takes a little longer if you don’t use ‘the distro’ which is basically RedHat.


(Lmon) #13

Will retry an install from scratch, after doing tests and tests… I now have a core dump when I start asterisk and no idea which causes this
Let’s close this thread,I will create a new one if required


(Lmon) #14

Thanks to both for your help and support


#15

Sorry, I misunderstood your application. You had stated “without any connection to ‘external world’” so it seemed like just an intercom system.

If the other product can connect to your IVR system over a network (by SIP, IAX, etc.) then there should be no need for them to use the same OS. In that case, I recommend you buy a service with a ready-to-go image such as http://www.rentpbx.com/ or a ready-to-install image such as https://clientarea.ramnode.com/knowledgebase/48/Operating-System-Templates-and-ISOs.html or a VPS that can directly load the official FreePBX Distro.

If the IVR must run in the same image as the other product, is it feasible for you to use plain Asterisk (writing a simple dialplan by hand)? This should be much easier than FreePBX to integrate with a ‘foreign’ application.

Note that CentOS (the native OS for FreePBX) is a derivative of RHEL and very similar. Getting FreePBX running under RHEL is probably much simpler than using Ubuntu.

If the above is not useful, please provide more details about the two applications.

Also, is this a one-time demo, such as bidding on a contract or research for a degree? If so, consider using a commercial service that you can just order and it works. It won’t be expensive because you’ll only have to pay for one month. You might even find one with a free trial sufficient to complete the demo.


(Lmon) #16

to conclude this thread … tried to reinstall with PHP 5.6 ( and not 7.1 )
worked almost straight forward …
No issues with modules.
@Stewart1, Thanks for the trick for the advanced conf. indeed, registration ok but no Audio. configured the 2 options and worked!
Let’s now play with the IVR now
Thanks


(system) closed #17

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.