8

I almost managed to init a 2 sided call (click to call): 1st to my office and the 2nd to my cell using Michal Niklas answer (thanks Michal) on Asterisk click to call.

The major ISSUE is that the 2 call participants can not hear one each other, I used from-internal context for both of them. The system status web UI shows me 4 active channels and 2 external calls when the call is connected with both sides.

I configured the Channel: local/MY OFFICE PHONE@from-internal Extension: MY CELL PHONE

when I set the Channel to Sip/1 and check it with soft phone it works great!

Thanks for helping...

Community
  • 1
  • 1
Sam
  • 81
  • 1
  • 1
  • 2

6 Answers6

12

seems to be NAT issue. here are some suggestions for sip.conf

put nat=yes in user definition and in [general] tag, put externip and localnet

e.g.

[general]
externip=<your global IP>
localnet=192.168.2.0/255.255.0.0
Suresh Kumar
  • 749
  • 7
  • 19
  • Hello, I have done as you have mention in your answer, then also I am not getting voice.. I am getting Beep sound ... but no voice any help? – Nik Jun 06 '18 at 11:50
1

configure in /etc/asterisk/rtp.conf

[general]
rtpstart=10000
rtpend=20000

go to asterisk cli

rasterisk -vvvvvvvvvvvvvvvv
core reload
1

Sounds like a NAT issue; did you correctly forward the RTP ports? Did you configure the STUN server in the softphone (if any)?

Andrea Spadaccini
  • 11,456
  • 3
  • 35
  • 52
1

In my case, I had to go change the chan sip settings (freepbx.tld/admin/config.php?display=sipsettings) from nat to route

enter image description here

Pedro Lobito
  • 75,541
  • 25
  • 200
  • 222
1

Besides NAT problems I've also faced this issues on 3 cases:

1) Missconfigured parameter localnet: on /etc/asterisk/sip.conf make sure you set the network address for the phones. You can alos add multiple networks, for example: localnet=172.16.1.0/24 localnet=192.168.1.0/24

2) Not answered calls: in your dialplan (/etc/asterisk/extensions.conf) you need to answer calls before they can send any audio (RTP), make sure every call runs through an Answer().

3) Multiple answers in a single call: a call can be answered only a single time, in some asterisk versions you won't receive audio if a call is answered twice or more times so make sure you don't.

Anyways, why is Asterisk placing 2 calls? The general workaround for a click to call is: to call Alice and when Alice answers (and only when it answers) place a call to Bob, which will be connected directly to Alice, so you should have only 1 call with 2 channels anytime.

Maybe this can help: https://community.asterisk.org/t/how-to-make-a-click-to-call/74080/2

tpalanques
  • 73
  • 7
-1

Try adding/changing you're IPAddress in sip_nat.conf

vi /etc/asterisk/sip_nat.conf

Add/change

nat=yes
externip=XXX.XXX.XXX.XXX

Save, quit and restart

Slipstream
  • 9,418
  • 2
  • 47
  • 41