How to configure Blink and Linphone

I have an asterisk (14.0.2) server setup on an AWS EC2 ubuntu 14.04 instance. I can make calls either from Twilio (using Skype) or with Zoiper and they have sound.

I can get registration from both Linphone and Blink but no sound. Each has every audio codec enabled. In all cases the server plays gsm files. Every codec available in menuselect was selected and custom wav sound files which have been converted to wav 8KHz, gsm, slin and g729 using the Digium online conversion site. The core and custom sounds work using Twilio and Zoiper but not Linphone or Blink.

Core show codecs shows all the codecs installed.

Here is my PJSIP config

[transport-udp-nat]
type = transport
protocol = udp
bind = 0.0.0.0
; NAT settings
local_net = 10.0.0.0/8
external_media_address = 12.45.67.254
external_signaling_address = 12.345.67.254

endpoint-internal
type = endpoint
transport = transport-udp-nat
context = Local
disallow=all
allow=ulaw
allow=alaw
allow=slin
allow=g729
allow=g722
allow=opus
allow=gsm
direct_media = no
trust_id_outbound = yes
device_state_busy_at = 1
dtmf_mode = rfc4733

Please provide the SIP signaling (pjsip set logger on) with a call attempt. As well - is your network config such that the RTP ports are open to Asterisk?

I have another test server at Digital Ocean with all ports open.

v=0
o=- 3685978112 3685978114 IN IP4 128.199.170.146
s=Asterisk
c=IN IP4 128.199.170.146
t=0 0
m=audio 15928 RTP/AVP 0 8 3 9 113 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:113 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:60
a=sendrecv

<— Received SIP request (429 bytes) from UDP:120.29.76.213:37920 —>
ACK sip:128.199.170.146:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.111:37920;rport;branch=z9hG4bKPjf6c1188c-0be6-4bfd-ac63-84ae8c2357dd
Max-Forwards: 70
From: “Mark” sip:mark@markhorrocks.com;tag=18a727b0-4244-42ab-8d95-8c246ba8b037
To: sip:1100@markhorrocks.com;tag=189b48c7-9053-4577-96b5-6c90c2e92f77
Call-ID: 4ddab932-8782-4ff5-861c-1ee968cab920
CSeq: 14863 ACK
User-Agent: Blink 2.0.0 (Linux)
Content-Length: 0

   > 0x26564e0 -- Probation passed - setting RTP source address to 120.29.76.213:60006
-- Executing [3674442211@Main-IVR:3] Set("PJSIP/mark-0000000f", "star_repeats=1") in new stack
-- Executing [3674442211@Main-IVR:4] Set("PJSIP/mark-0000000f", "invalid_attempts=1") in new stack
-- Executing [3674442211@Main-IVR:5] Set("PJSIP/mark-0000000f", "timeout_counts=1") in new stack
-- Executing [3674442211@Main-IVR:6] BackGround("PJSIP/mark-0000000f", "tt-monkeysintro") in new stack
-- <PJSIP/mark-0000000f> Playing 'tt-monkeysintro.g722' (language 'en')
-- Executing [3674442211@Main-IVR:7] WaitExten("PJSIP/mark-0000000f", "5") in new stack

<— Received SIP request (429 bytes) from UDP:120.29.76.213:37920 —>
BYE sip:128.199.170.146:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.111:37920;rport;branch=z9hG4bKPje5adbef8-5acc-4d4f-978d-6a0840c09c66
Max-Forwards: 70
From: “Mark” sip:mark@markhorrocks.com;tag=18a727b0-4244-42ab-8d95-8c246ba8b037
To: sip:1100@markhorrocks.com;tag=189b48c7-9053-4577-96b5-6c90c2e92f77
Call-ID: 4ddab932-8782-4ff5-861c-1ee968cab920
CSeq: 14864 BYE
User-Agent: Blink 2.0.0 (Linux)
Content-Length: 0

Media appears to be flowing in this case, do you still not hear it? What does “rtp set debug on” show?

<— Received SIP request (429 bytes) from UDP:120.29.76.213:37920 —>
ACK sip:128.199.170.146:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.111:37920;rport;branch=z9hG4bKPjb9938452-e685-421f-9f5f-43303ba91b65
Max-Forwards: 70
From: “Mark” sip:mark@markhorrocks.com;tag=f88bfc9d-385e-4b7a-97f3-8e92f3650def
To: sip:1100@markhorrocks.com;tag=153edd07-fede-44c6-a9c8-8a8961381ab6
Call-ID: 2184069f-d842-45cf-b54d-eb0fee1f6e17
CSeq: 15563 ACK
User-Agent: Blink 2.0.0 (Linux)
Content-Length: 0

   > 0x26564e0 -- Probation passed - setting RTP source address to 120.29.76.213:60008

Got RTP packet from 120.29.76.213:60008 (type 00, seq 016552, ts 000000, len 000000)
– Executing [3674442211@Main-IVR:3] Set(“PJSIP/mark-00000010”, “star_repeats=1”) in new stack
– Executing [3674442211@Main-IVR:4] Set(“PJSIP/mark-00000010”, “invalid_attempts=1”) in new stack
– Executing [3674442211@Main-IVR:5] Set(“PJSIP/mark-00000010”, “timeout_counts=1”) in new stack
– Executing [3674442211@Main-IVR:6] BackGround(“PJSIP/mark-00000010”, “tt-monkeysintro”) in new stack
Sent RTP packet to 192.168.1.111:60008 (type 09, seq 023046, ts 000160, len 000160)
– <PJSIP/mark-00000010> Playing ‘tt-monkeysintro.g722’ (language ‘en’)
Got RTP packet from 120.29.76.213:60008 (type 00, seq 016553, ts 000160, len 000160)
Sent RTP packet to 192.168.1.111:60008 (type 09, seq 023047, ts 000320, len 000160)
Got RTP packet from 120.29.76.213:60008 (type 00, seq 016554, ts 000320, len 000160)
Sent RTP packet to 192.168.1.111:60008 (type 09, seq 023048, ts 000480, len 000160)
Got RTP packet from 120.29.76.213:60008 (type 00, seq 016555, ts 000480, len 000160)

I still get no sound, audio device is set to system default.

You should set “rtp_symmetric” to “yes” in the endpoint configuration. As well you may be running into an issue[1] which can be resolved by explicitly setting your endpoint to force a single codec. IE: disallow=all and a single allow=g722

[1] https://issues.asterisk.org/jira/browse/ASTERISK-26423

1 Like

It works. The problem is rtp_symmetric.

I can set a single codec for each sip endpoint?

Yes, you can. Provided the codec is supported by the endpoint it’ll work.

1 Like