TIPS CSipSimple - Internal Server Error

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
Hi all,

Finished finally installing full version of PIF. Created new extension. Did port forwading of the following UDP ports 10000:20000 and 5060 to my box. Tried to register using CSipSimple app from my android and it worked in the begging after that I'm not sure at what point it stopped.
It would say "internal server error" on the app. Nothing was showed in CLI that any attempts were made.
Finally found this thread and solution #2 worked for me as well. But now all of my calls are silent. I can see in CLI how the call comes in but nothing on the phone is heard.
 

progs_00

Active Member
Joined
Jan 6, 2014
Messages
132
Reaction score
37
Hello JohnnyBeGood
I don't have a solution to your particular problem with CSipSimple. I just wanted to share that although it is a really complete application it can be a PITA to setup and use. In my case after giving it a shot without ever getting reliable results I switched to Zoiper and never had any problems (note that you can also use IAX2 with Zoiper that I highly recommend given the fact that it uses only one port on your router)
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
Hello JohnnyBeGood
I don't have a solution to your particular problem with CSipSimple. I just wanted to share that although it is a really complete application it can be a PITA to setup and use. In my case after giving it a shot without ever getting reliable results I switched to Zoiper and never had any problems (note that you can also use IAX2 with Zoiper that I highly recommend given the fact that it uses only one port on your router)
Thank you for taking the time to reply!
I'm downloading zoiper right now and will post back results.
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
Installed Zoiper and configured same extension. Same effect, I can register but no audio at all when dial *97
 

progs_00

Active Member
Joined
Jan 6, 2014
Messages
132
Reaction score
37
Now JohnnyBeGood I believe it's time to give us a few more details on your configuration. Start by posting the status screen and then the router model. Also tell us if you are using something like an ATA device. Then try the following.
1) Download a soft phone on your pc, create an extension and test with that. Test with SIP and IAX2. Do you still have problems with audio and dtmf recognition? If yes post the log of the test call.
2) If everything is fine proceed with disabling iptables TEMPORARILY. This can be done with the following command:
iptables -P INPUT ACCEPT

ATTENTION that you must test this for a couple of minutes and then reboot your system to return it to the safe, default settings.

There are other things to check but start with this and we will see how it goes
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
progs_00
Thanks for taking time to reply!
Here's requested info.
No ATA device is being used just remote extensions.
Router: ASUS RT-AC68U running stable release of Asuswrt-Merlin v374.41
Ran "iptables -P INPUT ACCEPT" command and still with SIP extension no sound, once in while it would say a word, but almost every time I've called it was silence.
Did port forward UDP 4569 did test call to voicemail (*97) and I was able to hear it and dtmf worked!
When I connect to WiFi it works both SIP and IAX.

Please let me know what else I can try.



 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
Sip log

Code:
pbx*CLI>
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [*97@from-internal:1] Answer("SIP/200-0000009b", "") in new stack
    -- Executing [*97@from-internal:2] Wait("SIP/200-0000009b", "1") in new stack
    -- Executing [*97@from-internal:3] Macro("SIP/200-0000009b", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/200-0000009b", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/200-0000009b", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/200-0000009b", "1?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/200-0000009b", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/200-0000009b", "AMPUSERCIDNAME=200") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/200-0000009b", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/200-0000009b", "AMPUSERCID=200") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/200-0000009b", "CALLERID(all)="200" <200>") in new stack
    -- Executing [s@macro-user-callerid:9] GotoIf("SIP/200-0000009b", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:10] ExecIf("SIP/200-0000009b", "0?Set(GROUP(concurrency_limit)=200)") in new stack
    -- Executing [s@macro-user-callerid:11] GosubIf("SIP/200-0000009b", "7?sub-ccss,s,1(from-internal,*97)") in new stack
    -- Executing [s@sub-ccss:1] ExecIf("SIP/200-0000009b", "0?Return()") in new stack
    -- Executing [s@sub-ccss:2] Set("SIP/200-0000009b", "CCSS_SETUP=TRUE") in new stack
    -- Executing [s@sub-ccss:3] GosubIf("SIP/200-0000009b", "0?monitor_config,1(from-internal,*97):monitor_default,1(from-internal,*97)") in new stack
    -- Executing [monitor_default@sub-ccss:1] GotoIf("SIP/200-0000009b", "0?is_exten") in new stack
    -- Executing [monitor_default@sub-ccss:2] StackPop("SIP/200-0000009b", "") in new stack
    -- Executing [monitor_default@sub-ccss:3] Return("SIP/200-0000009b", "FALSE") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("SIP/200-0000009b", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:13] GotoIf("SIP/200-0000009b", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:14] Set("SIP/200-0000009b", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("SIP/200-0000009b", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,26)
    -- Executing [s@macro-user-callerid:26] Set("SIP/200-0000009b", "CALLERID(number)=200") in new stack
    -- Executing [s@macro-user-callerid:27] Set("SIP/200-0000009b", "CALLERID(name)=200") in new stack
    -- Executing [s@macro-user-callerid:28] Set("SIP/200-0000009b", "CHANNEL(language)=en") in new stack
    -- Executing [*97@from-internal:4] Macro("SIP/200-0000009b", "get-vmcontext,200") in new stack
    -- Executing [s@macro-get-vmcontext:1] Set("SIP/200-0000009b", "VMCONTEXT=default") in new stack
    -- Executing [s@macro-get-vmcontext:2] GotoIf("SIP/200-0000009b", "0?200:300") in new stack
    -- Goto (macro-get-vmcontext,s,300)
    -- Executing [s@macro-get-vmcontext:300] NoOp("SIP/200-0000009b", "") in new stack
    -- Executing [*97@from-internal:5] Set("SIP/200-0000009b", "VMBOXEXISTSSTATUS=SUCCESS") in new stack
    -- Executing [*97@from-internal:6] GotoIf("SIP/200-0000009b", "1?mbexist") in new stack
    -- Goto (from-internal,*97,106)
    -- Executing [*97@from-internal:106] VoiceMailMain("SIP/200-0000009b", "200@default") in new stack
    -- <SIP/200-0000009b> Playing 'vm-password.gsm' (language 'en')
    -- Incorrect password '' for user '200' (context = default)
    -- <SIP/200-0000009b> Playing 'vm-incorrect.gsm' (language 'en')
    -- <SIP/200-0000009b> Playing 'vm-password.gsm' (language 'en')
    -- Incorrect password '' for user '200' (context = default)
    -- <SIP/200-0000009b> Playing 'vm-incorrect.gsm' (language 'en')
    -- <SIP/200-0000009b> Playing 'vm-password.gsm' (language 'en')
    -- Incorrect password '' for user '200' (context = default)
    -- <SIP/200-0000009b> Playing 'vm-incorrect.gsm' (language 'en')
    -- <SIP/200-0000009b> Playing 'vm-goodbye.gsm' (language 'en')
    -- Executing [*97@from-internal:107] GotoIf("SIP/200-0000009b", "0?playret") in new stack
    -- Executing [*97@from-internal:108] Macro("SIP/200-0000009b", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/200-0000009b", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("SIP/200-0000009b", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("SIP/200-0000009b", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/200-0000009b' in macro 'hangupcall'
  == Spawn extension (from-internal, *97, 108) exited non-zero on 'SIP/200-0000009b'
    -- Executing [h@from-internal:1] Hangup("SIP/200-0000009b", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/200-0000009b'
pbx*CLI>
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
IAX log

Code:
pbx*CLI>
    -- Registered IAX2 '300' (AUTHENTICATED) at 70.199.132.XXX:7870
    -- Unregistered IAX2 '300' (AUTHENTICATED)
    -- Accepting AUTHENTICATED call from 70.199.132.XXX:
      > requested format = speex,
      > requested prefs = (),
      > actual format = ulaw,
      > host prefs = (ulaw|alaw|gsm),
      > priority = mine
    -- Executing [*97@from-internal:1] Answer("IAX2/300-4816", "") in new stack
    -- Executing [*97@from-internal:2] Wait("IAX2/300-4816", "1") in new stack
    -- Executing [*97@from-internal:3] Macro("IAX2/300-4816", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("IAX2/300-4816", "AMPUSER=300") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("IAX2/300-4816", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("IAX2/300-4816", "0?Set(REALCALLERIDNUM=300)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("IAX2/300-4816", "AMPUSER=300") in new stack
    -- Executing [s@macro-user-callerid:5] Set("IAX2/300-4816", "AMPUSERCIDNAME=300") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("IAX2/300-4816", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("IAX2/300-4816", "AMPUSERCID=300") in new stack
    -- Executing [s@macro-user-callerid:8] Set("IAX2/300-4816", "CALLERID(all)="300" <300>") in new stack
    -- Executing [s@macro-user-callerid:9] GotoIf("IAX2/300-4816", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:10] ExecIf("IAX2/300-4816", "0?Set(GROUP(concurrency_limit)=300)") in new stack
    -- Executing [s@macro-user-callerid:11] GosubIf("IAX2/300-4816", "7?sub-ccss,s,1(from-internal,*97)") in new stack
    -- Executing [s@sub-ccss:1] ExecIf("IAX2/300-4816", "0?Return()") in new stack
    -- Executing [s@sub-ccss:2] Set("IAX2/300-4816", "CCSS_SETUP=TRUE") in new stack
    -- Executing [s@sub-ccss:3] GosubIf("IAX2/300-4816", "0?monitor_config,1(from-internal,*97):monitor_default,1(from-internal,*97)") in new stack
    -- Executing [monitor_default@sub-ccss:1] GotoIf("IAX2/300-4816", "0?is_exten") in new stack
    -- Executing [monitor_default@sub-ccss:2] StackPop("IAX2/300-4816", "") in new stack
    -- Executing [monitor_default@sub-ccss:3] Return("IAX2/300-4816", "FALSE") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("IAX2/300-4816", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:13] GotoIf("IAX2/300-4816", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:14] Set("IAX2/300-4816", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("IAX2/300-4816", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,26)
    -- Executing [s@macro-user-callerid:26] Set("IAX2/300-4816", "CALLERID(number)=300") in new stack
    -- Executing [s@macro-user-callerid:27] Set("IAX2/300-4816", "CALLERID(name)=300") in new stack
    -- Executing [s@macro-user-callerid:28] Set("IAX2/300-4816", "CHANNEL(language)=en") in new stack
    -- Executing [*97@from-internal:4] Macro("IAX2/300-4816", "get-vmcontext,300") in new stack
    -- Executing [s@macro-get-vmcontext:1] Set("IAX2/300-4816", "VMCONTEXT=default") in new stack
    -- Executing [s@macro-get-vmcontext:2] GotoIf("IAX2/300-4816", "0?200:300") in new stack
    -- Goto (macro-get-vmcontext,s,300)
    -- Executing [s@macro-get-vmcontext:300] NoOp("IAX2/300-4816", "") in new stack
    -- Executing [*97@from-internal:5] Set("IAX2/300-4816", "VMBOXEXISTSSTATUS=SUCCESS") in new stack
    -- Executing [*97@from-internal:6] GotoIf("IAX2/300-4816", "1?mbexist") in new stack
    -- Goto (from-internal,*97,106)
    -- Executing [*97@from-internal:106] VoiceMailMain("IAX2/300-4816", "300@default") in new stack
    -- <IAX2/300-4816> Playing 'vm-password.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-youhave.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-no.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-messages.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-opts.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-helpexit.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-options.gsm' (language 'en')
    -- Recording the message
    -- <IAX2/300-4816> Playing 'vm-rec-name.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'beep.gsm' (language 'en')
    -- x=0, open writing:  /var/spool/asterisk/voicemail/default/300/greet.tmp format: wav49, 0xb623e100
    -- x=1, open writing:  /var/spool/asterisk/voicemail/default/300/greet.tmp format: gsm, 0xb73070d8
    -- x=2, open writing:  /var/spool/asterisk/voicemail/default/300/greet.tmp format: wav, 0xb64f27a8
    -- Registered IAX2 '300' (AUTHENTICATED) at 70.199.132.231:7870
    -- User ended message by pressing #
    -- <IAX2/300-4816> Playing 'auth-thankyou.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-review.gsm' (language 'en')
    -- Reviewing the message
    -- <IAX2/300-4816> Playing '/var/spool/asterisk/voicemail/default/300/greet.tmp.slin' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-review.gsm' (language 'en')
    -- Re-recording the message
    -- <IAX2/300-4816> Playing 'vm-rec-name.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'beep.gsm' (language 'en')
    -- x=0, open writing:  /var/spool/asterisk/voicemail/default/300/greet.tmp format: wav49, 0xb623e100
    -- x=1, open writing:  /var/spool/asterisk/voicemail/default/300/greet.tmp format: gsm, 0xb73070d8
    -- x=2, open writing:  /var/spool/asterisk/voicemail/default/300/greet.tmp format: wav, 0xb64f27a8
    -- User ended message by pressing #
    -- <IAX2/300-4816> Playing 'auth-thankyou.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-review.gsm' (language 'en')
    -- Reviewing the message
    -- <IAX2/300-4816> Playing '/var/spool/asterisk/voicemail/default/300/greet.tmp.slin' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-review.gsm' (language 'en')
    -- Saving message as is
    -- <IAX2/300-4816> Playing 'vm-msgsaved.gsm' (language 'en')
    -- <IAX2/300-4816> Playing 'vm-options.gsm' (language 'en')
  == Spawn extension (from-internal, *97, 106) exited non-zero on 'IAX2/300-4816'
    -- Executing [h@from-internal:1] Hangup("IAX2/300-4816", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'IAX2/300-4816'
    -- Hungup 'IAX2/300-4816'
pbx*CLI>
 

progs_00

Active Member
Joined
Jan 6, 2014
Messages
132
Reaction score
37
Hi Johnny,
Although I'm not an expert on sip debugging, from the info you posted I can see no problem in neither SIP nor IAX call. Also the fact that IAX just works, makes me think that you've got a router issue, so first of all check for SIP ALG (I believe it's called SIP Helper in your router) and change its status. From what I saw it seems that it must be off if you use a PBX
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
Hi Johnny,
Although I'm not an expert on sip debugging, from the info you posted I can see no problem in neither SIP nor IAX call. Also the fact that IAX just works, makes me think that you've got a router issue, so first of all check for SIP ALG (I believe it's called SIP Helper in your router) and change its status. From what I saw it seems that it must be off if you use a PBX
Howdy,

Closest info on how to disable SIP ALG was here. I guess its called "SIP Passthrough" and its under WAN >> NAT Passthrough in my case.
It was already enabled and disabling it did not help, so I enabled it again.

Any other suggestions? I'm willing to try anything else.
 

progs_00

Active Member
Joined
Jan 6, 2014
Messages
132
Reaction score
37
I'm going to ask you something trivial but better be sure. In your extension in Asterisk is NAT enabled? (it should be if you are connecting from an outside IP)
The first thing I'd try before going any further would be to test with a different router if possible. I remember a case where after losing weeks behind a similar problem, I reflashed the router's firmware and everything just worked without any trouble. Had I used a different router right from the beginning, I wouldn't have lost all this time

Bye for now and keep me posted
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
:seeya:
Yes, NAT on this extension is set to enabled. I've flashed back router with original firmware did tests and still no joy. Unfortunately I don't have other router to try.
Can someone post their working extension settings please?
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
pbx*CLI> SIP SHOW PEER 200


* Name : 200
Secret : <Set>
MD5Secret : <Not set>
Remote Secret: <Not set>
Context : from-internal
Subscr.Cont. : <Not set>
Language :
AMA flags : Unknown
Transfer mode: open
CallingPres : Presentation Allowed, Not Screened
Callgroup :
Pickupgroup :
MOH Suggest :
Mailbox : 200@default
VM Extension : *97
LastMsgsSent : 0/0
Call limit : 2147483647
Max forwards : 0
Dynamic : Yes
Callerid : "200" <200>
MaxCallBR : 384 kbps
Expire : 49
Insecure : no
Force rport : Yes
ACL : Yes
DirectMedACL : No
T.38 support : No
T.38 EC mode : Unknown
T.38 MaxDtgrm: -1
DirectMedia : No
PromiscRedir : No
User=Phone : No
Video Support: No
Text Support : No
Ign SDP ver : No
Trust RPID : Yes
Send RPID : No
Subscriptions: Yes
Overlap dial : Yes
DTMFmode : rfc2833
Timer T1 : 500
Timer B : 32000
ToHost :
Addr->IP : 70.210.xxx.xxx:9251
Defaddr->IP : (null)
Prim.Transp. : UDP
Allowed.Trsp : UDP
Def. Username: 200
SIP Options : (none)
Codecs : 0x4 (ulaw)
Codec Order : (ulaw:20)
Auto-Framing : No
Status : OK (298 ms)
Useragent : Zoiper r23496
Reg. Contact : sip:[email protected]:9251;transport=udp;rinstance=af20a0c00d08c0ae
Qualify Freq : 60000 ms
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Min-Sess : 90 secs
RTP Engine : asterisk
Parkinglot :
Use Reason : No
Encryption : No

pbx*CLI>
 

progs_00

Active Member
Joined
Jan 6, 2014
Messages
132
Reaction score
37
Your extension settings seem perfectly fine. Can you try adding gsm codec in both Asterisk and Zoiper and test with that (be sure to make gsm the first on the list in Zoiper)
 

JohnnyBeGood

Member
Joined
May 6, 2008
Messages
35
Reaction score
0
I've set GSM on my Audio Codecs and in Zoiper left only GSM still same issue :(

Also, I've got confirmation that SIP helper is actually called SIP Passthrough on my router/firmware and I got that disabled now.

The SIP helper is a Linux Netfilter module that helps passing SIP packages through NAT. While it helps when you use a SIP phone (which only does outbound connections), it will create problems if you host a PBX such as Asterisk that needs to accept inbound connections.

So basically: enable this for a phone, and disable it if you host a server.
 

matthew

Guru
Joined
May 22, 2013
Messages
83
Reaction score
26
I gather you are using the data plan on your cellphone. A lot of mobile providers use NAT, so in effect, you have a double NAT to your pbx. Try setting up STUN etc in your client.
 

Members online

Forum statistics

Threads
25,812
Messages
167,763
Members
19,241
Latest member
bellabos
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top