SIP ASterisk Linphone error

Hi all,

We are using Asterisk server (version 1.8.11.0) to make calls from a SIP client (Linphone 3.6.1) using wireless connection.

Regarding the ports, there is no restriction for the Asterisk port. In Linphone we are setting the ports:
SIP/UDP 5060
Audio RTP/UDP: 7078

By checking the Asterisk logs we got an error: ’ – Got SIP MESSAGE response 500 “Server internal error” back from the host ’ on the server side.

Can anybody tell us why it happens? Is there a solution for it?

Thanks in advance for your help.

try RTP port
10000-20000

[quote=“numan82”]try RTP port
10000-20000[/quote]

Thanks for your answer.
We tried with the RTP 15000 as you suggest but we still have the error.

500 Server Internal Error

And a question : have you tried with different softphones ?

Is this you are getting from linphone only or this appear on all extensions?
Make sure audio codecs are selected on linphone.

Yes, we tried another SIP clients, such us MicroSIP.
Using MicroSIP we don’t get this error.

The audio is fine, the codecs are fine. The problem is receiving the SIP messages.

Thanks for your help!

You are using it on which device ? Mobile phone or computer
Please go into the SIP DEBUG Mode

capture the output and than paste it here.

We are using a mobile version, the Linphone Android 2.0

Our internal IP is: XX.XX.XX.XX
The external one is: YYY.YY.Y.YYY
The person who is calling is: ABCD@ZZZ.ZZZ.ZZZ.ZZZ

Going into the sip debug mode we get:


<------------->
--- (11 headers 0 lines) ---
Really destroying SIP dialog '78167b5078be360d6b88e6490f5c6ca1@XX.XX.XX.XX:5060' Method: OPTIONS
Really destroying SIP dialog 'bb5b9e2d6726792424499c8708d3646c' Method: INVITE

<--- SIP read from UDP:YYY.YY.Y.YYY:5061 --->

<------------->
Reliably Transmitting (NAT) to 137.195.108.150:5060:
OPTIONS sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK0b3d2f99;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as0b2eda97
To: <sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ>
Contact: <sip:Unknown@XX.XX.XX.XX:5060>
Call-ID: 3e8b1c05400bb5de7750b172284e386f@XX.XX.XX.XX:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Thu, 16 Jan 2014 16:14:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #1 (NAT) to 137.195.108.150:5060:
OPTIONS sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK0b3d2f99;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as0b2eda97
To: <sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ>
Contact: <sip:Unknown@XX.XX.XX.XX:5060>
Call-ID: 3e8b1c05400bb5de7750b172284e386f@XX.XX.XX.XX:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Thu, 16 Jan 2014 16:14:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #2 (NAT) to 137.195.108.150:5060:
OPTIONS sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK0b3d2f99;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as0b2eda97
To: <sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ>
Contact: <sip:Unknown@XX.XX.XX.XX:5060>
Call-ID: 3e8b1c05400bb5de7750b172284e386f@XX.XX.XX.XX:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Thu, 16 Jan 2014 16:14:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #3 (NAT) to 137.195.108.150:5060:
OPTIONS sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK0b3d2f99;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as0b2eda97
To: <sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ>
Contact: <sip:Unknown@XX.XX.XX.XX:5060>
Call-ID: 3e8b1c05400bb5de7750b172284e386f@XX.XX.XX.XX:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Thu, 16 Jan 2014 16:14:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #4 (NAT) to 137.195.108.150:5060:
OPTIONS sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK0b3d2f99;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as0b2eda97
To: <sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ>
Contact: <sip:Unknown@XX.XX.XX.XX:5060>
Call-ID: 3e8b1c05400bb5de7750b172284e386f@XX.XX.XX.XX:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Thu, 16 Jan 2014 16:14:41 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---
Really destroying SIP dialog '3e8b1c05400bb5de7750b172284e386f@XX.XX.XX.XX:5060' Method: OPTIONS

<--- SIP read from UDP:172.18.2.79:5060 --->

<------------->
Reliably Transmitting (NAT) to YYY.YY.Y.YYY:5061:
OPTIONS sip:1020@YYY.YY.Y.YYY:5061;ob SIP/2.0
Via: SIP/2.0/UDP 172.16.0.230:5060;branch=z9hG4bK51fd5adb;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@172.16.0.230>;tag=as1b008805
To: <sip:1020@YYY.YY.Y.YYY:5061;ob>
Contact: <sip:Unknown@172.16.0.230:5060>
Call-ID: 2679e78d56a2b30d0046974716c4fe99@172.16.0.230:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Thu, 16 Jan 2014 16:14:51 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:YYY.YY.Y.YYY:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.0.230:5060;rport=5060;received=172.16.0.230;branch=z9hG4bK51fd5adb
Call-ID: 2679e78d56a2b30d0046974716c4fe99@172.16.0.230:5060
From: "Unknown" <sip:Unknown@172.16.0.230>;tag=as1b008805
To: <sip:1020@YYY.YY.Y.YYY;ob>;tag=z9hG4bK51fd5adb
CSeq: 102 OPTIONS
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Accept: application/sdp, application/pidf+xml, application/xpidf+xml, application/simple-message-summary, 

message/sipfrag;version=2.0, application/im-iscomposing+xml, text/plain
Supported: replaces, 100rel, timer, norefersub
Allow-Events: presence, message-summary, refer
Content-Type: application/sdp
Content-Length: 441

v=0
o=- 3598876802 3598876802 IN IP4 YYY.YY.Y.YYY
s=pjmedia
c=IN IP4 YYY.YY.Y.YYY
t=0 0
m=audio 10002 RTP/AVP 98 97 99 104 3 0 8 9 96
a=rtcp:10003 IN IP4 YYY.YY.Y.YYY
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=sendrecv
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
<------------->
--- (12 headers 19 lines) ---
Really destroying SIP dialog '2679e78d56a2b30d0046974716c4fe99@172.16.0.230:5060' Method: OPTIONS

<--- SIP read from UDP:YYY.YY.Y.YYY:5061 --->

<------------->
Reliably Transmitting (NAT) to 137.195.108.150:5060:
OPTIONS sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ SIP/2.0
Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK7bfae194;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@XX.XX.XX.XX>;tag=as2366e50e
To: <sip:ABCD@ZZZ.ZZZ.ZZZ.ZZZ>
Contact: <sip:Unknown@XX.XX.XX.XX:5060>
Call-ID: 2e91a44d02f42c531ff4da7b612736b8@XX.XX.XX.XX:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Thu, 16 Jan 2014 16:14:55 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---

Many thanks in advance for your help.

Any suggestion after having a look to the output?
Many thanks!

Hi guys,

i am going to start developing my own voip ios app using linephone, i’m new in voip technologies for now and need some assistance. i have downloaded the linephone ios app and built all the libraries regarding instructions, i also managed to make some calls from device to device and from simulator to device using a linephone test SIP server and the app works perfect. My next target is to use a personal SIP service to accomplish sip calls via openVPN tunneling server. Could you please guide me step by step what should i do to set up proxy, domain, certificate, keys and so on what it takes in order to have proper configuration to make client to server calls. If i’m not quite clear in my target please correct me. Any suggestions would be gratefully appreciated. Thanks in advance.

It is not clear whether any of this relates to Asterisk, but for custom step by step guidance on Asterisk, you should hire a consultant on the Biz and Jobs forum.

the SIP server is Asterisk based. first i need to accomplish a voip call to SIP server directly via LAN 192.168.1.x and then try to make external connection by doing it over openVPN. By the way i am using an iOS linphone mobile app to make calls, i believe i am supposed to change some settings in linphone config files, but i’m not quite sure what exactly i have to change. Any suggestions?

asteriskdocs.org/