No audio when using LinPhone

Hi I am using Linphone as a softphone. It is work well with “hello world”, and I can hear the sound. However, I cant hear the audio from another linphone. Here is my settings:

/etc/asterisk/pjsip.conf

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[2001]
type=endpoint
context=from-internal
allow=alaw,ulaw
auth=2001
aors=2001

[2001]
type=auth
auth_type=userpass
password=12345678
username=2001

[2001]
type=aor
max_contacts=1

[2002]
type=endpoint
context=from-internal
auth=2002
aors=2002
allow=ulaw,alaw

[2002]
type=auth
auth_type=userpass
password=12345678
username=2002

[2002]
type=aor
max_contacts=1

/etc/asterisk/extensions.conf

[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)

exten => 2001,1,Dial(PJSIP/2001)
exten => 2002,1,Dial(PJSIP/2002)

Linphone settings

Thanks for help.

Does it work if you try this ?

exten => 2001,1,Answer()
exten => 2001,2,Dial(PJSIP/2001)

No, it doesn’t work.
In this setting, 2001 hang up and no action in 2002 when I use 2001 to call 2002.

How about something more generic…

exten = _200[12],1,Answer()
 same = n,Wait(1)
 same = n,Playback(hello-world)
 same = n,Dial(PJSIP/${EXTEN},,T)

…the point being that this appears to be a re-invite issue, causing direct RTP attempts between the extensions; and one work-around is to keep Asterisk in the media path eg. using T option to Dial() to allow the calling party to initiate transfers using DTMF.

Another work-around is to check firewall settings on the PCs running Linphone.

I discovered there are some errors pop up when calling the “hello world” or other endpoints.

[Nov 16 04:39:55] WARNING[1199652]: db.c:316 db_execute_sql: Error executing SQL (COMMIT): cannot commit - no transaction is active
[Nov 16 04:39:55] WARNING[1199652]: db.c:316 db_execute_sql: Error executing SQL (ROLLBACK): cannot rollback - no transaction is active
[Nov 16 04:39:56] WARNING[1199682]: res_pjsip_pubsub.c:3396 pubsub_on_rx_publish_request: No registered publish handler for event presence from 2002
[Nov 16 04:40:42] ERROR[1199682]: res_pjsip_session.c:937 handle_incoming_sdp:  2001: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)
  == Spawn extension (from-internal, 100, 4) exited non-zero on 'PJSIP/2001-00000000'
[Nov 16 04:40:58] ERROR[1199682]: res_pjsip_session.c:937 handle_incoming_sdp:  2001: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)
  == Spawn extension (from-internal, 100, 4) exited non-zero on 'PJSIP/2001-00000001'
[Nov 16 04:41:06] ERROR[1199682]: res_pjsip_session.c:937 handle_incoming_sdp:  2001: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)
  == Spawn extension (from-internal, 100, 4) exited non-zero on 'PJSIP/2001-00000002'

Could it be related to a firewall issue in the softphone?

More debug output would be helpful, including the output on the Asterisk CLI of commands such as rtp set debug on and pjsip set logger on, then placing the calls again and copying the text of the output with any sensitive issues masked (such as public IP addresses in particular.) Very beneficial would be output from capturing the SIP INVITE messages sent at the start of the call.

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