New Installation, Can't get logs or make calls

Hello Everybody

I’m new to the FreePBX system, I’ve succesfuly installed it on a VPS on the internet and installed asterisk 1.6 and FreePBX 2.10 (I updated this from 2.9 in the GUI module admin).

I’ve set all my extensions and trunks, also the outbound routes, but when I try to make a call from an extension to an outside number I don’t even get an error message or something, the phone just makes an ocupied tone and says “not found” on the screen, the phone is a Yealink T22P.

My trunk provider has given me some configurations that I should add to the sip.conf file, I’ve read the documentation and wrote the configurations on the correct files (sip_general_custom.conf & extensions_override_freepbx.conf) but I might be doing something wrong because I still can not make outbound calls or receive inbound calls.

Also I can’t even get the error log to show on the GUI, I’ve tried to see it by SSH but haven’t find it neither.

So if someone could help me with all this I would really apreciate it.

Good Night,

Just a few updates on the status… I’ve been able to perform a call to my trunk directly, now I can make the calls, I noticed later after my first post that I couldn’t make calls to other extensions neither, now I can do them but still can’t get the outbound calls to another number.

This is what I get when I try to make an outbound call on asterisk SSH I get this warning:

[2012-12-05 01:02:55] WARNING[22024]: file.c:663 ast_openstream_full: File all-circuits-busy-now does not exist in any format
[2012-12-05 01:02:55] WARNING[22024]: file.c:954 ast_streamfile: Unable to open all-circuits-busy-now (format 0x8 (alaw)): No such file or directory
[2012-12-05 01:02:55] WARNING[22024]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/5230-0000003b for all-circuits-busy-now&pls-try-call-later, noanswer
[2012-12-05 01:02:55] WARNING[22024]: file.c:663 ast_openstream_full: File pls-try-call-later does not exist in any format
[2012-12-05 01:02:55] WARNING[22024]: file.c:954 ast_streamfile: Unable to open pls-try-call-later (format 0x8 (alaw)): No such file or directory
[2012-12-05 01:02:55] WARNING[22024]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/5230-0000003b for all-circuits-busy-now&pls-try-call-later, noanswer

Any idea on where to start?

Yes, you can put these settings in the trunk in FreePBX, that is the purpose of FreePBX it writes the code for you.

FreePBX creates the extension so you do not need to do that. Same with the inbound and outbound code (that is done by the inbound and outbound route module).

The SIP trunk in FreePBX has text boxes for the trunk details, I have changed the context as required for FreePBX and pasted below:

In Peer Details (put what was in the brackets in the name field above peer details):

type=peer
host=i2next.com.mx
fromuser=87800XXXXX
fromusername=87800XXXXX
dtmfmode=inband
fromdomain=i2next.com.mx
context=from-trunk
canreinvite=no
disallow=all
allow=alaw
secret=p4ssw0rd
user=87800XXXXX
username=87800XXXXX

IN USer details (put protel_incoming in user context)

type=peer
host=200.76.112.13
insecure=yes
insecure=very
dtmfmode=rfc2833
context=from-trunk
allow=alaw

I removed the g.729 because I assume you don’t have the license.

Also at the bottom of the trunk is the field to put the registration info.

This guide from your carrier was written for Asterisk without FreePBX.

Hello

This part of the log doesn’t quite tell why it failed only tells that you don’t have some sound files (or the permission in that directory where the sound files are in isn’t correct)

Perhaps you should provide the start and up until the end when a failed call happens.

Thank you for your answer sanjayws,

Here’s the full log on when the call fails:

– Executing [01XXXXXXXXXX@from-internal:1] Macro(“SIP/5230-0000003f”, “user-callerid,LIMIT,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/5230-0000003f”, “AMPUSER=5230”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/5230-0000003f”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/5230-0000003f”, “1?Set(REALCALLERIDNUM=5230)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/5230-0000003f”, “AMPUSER=5230”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/5230-0000003f”, “AMPUSERCIDNAME=Enrique del Valle”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/5230-0000003f”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/5230-0000003f”, “AMPUSERCID=5230”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/5230-0000003f”, “CALLERID(all)=“Enrique del Valle” <5230>”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/5230-0000003f”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:10] ExecIf(“SIP/5230-0000003f”, “1?Set(GROUP(concurrency_limit)=5230)”) in new stack
– Executing [s@macro-user-callerid:11] ExecIf(“SIP/5230-0000003f”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:12] GosubIf(“SIP/5230-0000003f”, “7?sub-ccss,s,1(from-internal,01XXXXXXXXXX)”) in new stack
– Executing [s@sub-ccss:1] ExecIf(“SIP/5230-0000003f”, “0?Return()”) in new stack
– Executing [s@sub-ccss:2] Set(“SIP/5230-0000003f”, “CCSS_SETUP=TRUE”) in new stack
– Executing [s@sub-ccss:3] GosubIf(“SIP/5230-0000003f”, “0?monitor_config,1(from-internal,01XXXXXXXXXX):monitor_default,1(from-internal,01XXXXXXXXXX)”) in new stack
– Executing [monitor_default@sub-ccss:1] GotoIf(“SIP/5230-0000003f”, “0?is_exten”) in new stack
– Executing [monitor_default@sub-ccss:2] StackPop(“SIP/5230-0000003f”, “”) in new stack
– Executing [monitor_default@sub-ccss:3] Return(“SIP/5230-0000003f”, “FALSE”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/5230-0000003f”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,26)
– Executing [s@macro-user-callerid:26] Set(“SIP/5230-0000003f”, “CALLERID(number)=5230”) in new stack
– Executing [s@macro-user-callerid:27] Set(“SIP/5230-0000003f”, “CALLERID(name)=Enrique del Valle”) in new stack
– Executing [s@macro-user-callerid:28] Set(“SIP/5230-0000003f”, “CHANNEL(language)=es”) in new stack
– Executing [01XXXXXXXXXX@from-internal:2] Set(“SIP/5230-0000003f”, “MOHCLASS=default”) in new stack
– Executing [01XXXXXXXXXX@from-internal:3] Set(“SIP/5230-0000003f”, “_NODEST=”) in new stack
– Executing [01XXXXXXXXXX@from-internal:4] Gosub(“SIP/5230-0000003f”, “sub-record-check,s,1(out,01XXXXXXXXXX,)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“SIP/5230-0000003f”, “1?check”) in new stack
– Goto (sub-record-check,s,6)
– Executing [s@sub-record-check:6] Set(“SIP/5230-0000003f”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:7] GotoIf(“SIP/5230-0000003f”, “1?next”) in new stack
– Goto (sub-record-check,s,10)
– Executing [s@sub-record-check:10] ExecIf(“SIP/5230-0000003f”, “0?Return()”) in new stack
– Executing [s@sub-record-check:11] GotoIf(“SIP/5230-0000003f”, “0?out,1”) in new stack
– Executing [s@sub-record-check:12] Set(“SIP/5230-0000003f”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“SIP/5230-0000003f”, “0?Set(__REC_POLICY_MODE=)”) in new stack
– Executing [s@sub-record-check:14] Set(“SIP/5230-0000003f”, “NOW=1354721283”) in new stack
– Executing [s@sub-record-check:15] Set(“SIP/5230-0000003f”, “__DAY=05”) in new stack
– Executing [s@sub-record-check:16] Set(“SIP/5230-0000003f”, “__MONTH=12”) in new stack
– Executing [s@sub-record-check:17] Set(“SIP/5230-0000003f”, “__YEAR=2012”) in new stack
– Executing [s@sub-record-check:18] Set(“SIP/5230-0000003f”, “__TIMESTR=20121205-152803”) in new stack
– Executing [s@sub-record-check:19] Set(“SIP/5230-0000003f”, “__FROMEXTEN=5230”) in new stack
– Executing [s@sub-record-check:20] Set(“SIP/5230-0000003f”, “__CALLFILENAME=out-01XXXXXXXXXX-5230-20121205-152803-1354721283.63”) in new stack
– Executing [s@sub-record-check:21] Goto(“SIP/5230-0000003f”, “out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] ExecIf(“SIP/5230-0000003f”, “1?Set(__REC_POLICY_MODE=)”) in new stack
– Executing [out@sub-record-check:2] GosubIf(“SIP/5230-0000003f”, “0?record,1(exten,01XXXXXXXXXX,5230)”) in new stack
– Executing [out@sub-record-check:3] Return(“SIP/5230-0000003f”, “”) in new stack
– Executing [01XXXXXXXXXX@from-internal:5] Macro(“SIP/5230-0000003f”, “dialout-trunk,1,XXXXXXXXXX,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/5230-0000003f”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/5230-0000003f”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/5230-0000003f”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/5230-0000003f”, “DIAL_NUMBER=XXXXXXXXXX”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/5230-0000003f”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/5230-0000003f”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/5230-0000003f”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/5230-0000003f”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/5230-0000003f”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/5230-0000003f”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/5230-0000003f”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/5230-0000003f”, “0?Set(REALCALLERIDNUM=5230)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/5230-0000003f”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/5230-0000003f”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/5230-0000003f”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/5230-0000003f”, “TRUNKOUTCID=XXXXXXXXXX”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/5230-0000003f”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/5230-0000003f”, “1?Set(CALLERID(all)=XXXXXXXXXX)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/5230-0000003f”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/5230-0000003f”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/5230-0000003f”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/5230-0000003f”, “0?sub-flp-1,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/5230-0000003f”, “OUTNUM=XXXXXXXXXX”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/5230-0000003f”, “custom=SIP/GCTELE”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/5230-0000003f”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/5230-0000003f”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/5230-0000003f”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/5230-0000003f”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/5230-0000003f”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/5230-0000003f”, “1?Set(CONNECTEDLINE(num,i)=XXXXXXXXXX)”) in new stack
– Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/5230-0000003f”, “1?Set(CONNECTEDLINE(name,i)=CID:XXXXXXXXXX)”) in new stack
– Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/5230-0000003f”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:22] Dial(“SIP/5230-0000003f”, “SIP/GCTELE/XXXXXXXXXX,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/GCTELE/XXXXXXXXXX
– Got SIP response 500 “Failed to do PSTN routing” back from 000.00.000.00:5060
– SIP/GCTELE-00000040 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:23] NoOp(“SIP/5230-0000003f”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 38”) in new stack
– Executing [s@macro-dialout-trunk:24] Goto(“SIP/5230-0000003f”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“SIP/5230-0000003f”, “RC=38”) in new stack
– Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“SIP/5230-0000003f”, “38,1”) in new stack
– Goto (macro-dialout-trunk,38,1)
– Executing [38@macro-dialout-trunk:1] Goto(“SIP/5230-0000003f”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] GotoIf(“SIP/5230-0000003f”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,continue,3)
– Executing [continue@macro-dialout-trunk:3] NoOp(“SIP/5230-0000003f”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 38 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:4] Set(“SIP/5230-0000003f”, “CALLERID(number)=5230”) in new stack
– Executing [01XXXXXXXXXX@from-internal:6] Macro(“SIP/5230-0000003f”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“SIP/5230-0000003f”, “”) in new stack
– Executing [s@macro-outisbusy:2] GotoIf(“SIP/5230-0000003f”, “0?emergency,1”) in new stack
– Executing [s@macro-outisbusy:3] GotoIf(“SIP/5230-0000003f”, “0?intracompany,1”) in new stack
– Executing [s@macro-outisbusy:4] Playback(“SIP/5230-0000003f”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
[2012-12-05 15:28:03] WARNING[26187]: file.c:663 ast_openstream_full: File all-circuits-busy-now does not exist in any format
[2012-12-05 15:28:03] WARNING[26187]: file.c:954 ast_streamfile: Unable to open all-circuits-busy-now (format 0x8 (alaw)): No such file or directory
[2012-12-05 15:28:03] WARNING[26187]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/5230-0000003f for all-circuits-busy-now&pls-try-call-later, noanswer
[2012-12-05 15:28:03] WARNING[26187]: file.c:663 ast_openstream_full: File pls-try-call-later does not exist in any format
[2012-12-05 15:28:03] WARNING[26187]: file.c:954 ast_streamfile: Unable to open pls-try-call-later (format 0x8 (alaw)): No such file or directory
[2012-12-05 15:28:03] WARNING[26187]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/5230-0000003f for all-circuits-busy-now&pls-try-call-later, noanswer
– Executing [s@macro-outisbusy:5] Congestion(“SIP/5230-0000003f”, “20”) in new stack
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘SIP/5230-0000003f’ in macro ‘outisbusy’
== Spawn extension (from-internal, 014421356497, 6) exited non-zero on ‘SIP/5230-0000003f’
– Executing [h@from-internal:1] Hangup(“SIP/5230-0000003f”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/5230-0000003f’

I hope this can help us more to find out what’s going on, as I’m sure is just something I forgot to configure…

Thank you for your support

Assuming XXXX is masked (i’m not too smart so need to clarify).

It looks like the remote side (your provider) is having problems or doesn’t like you (your server) calling them, i.e. not authorized or something like that. Probably you need to check with them?

Yes, it is masked.

I continued doing some tests, also I realised on the log that when the dial pattern changed to only 10 digits is when the call failed, I modified the dial pattern and now I can do outbound calls.

Now the problem stills on inbound calls, I’ve made a test call and this is what I get on the log:

[2012-12-05 15:54:31] WARNING[28005]: pbx.c:4235 pbx_extension_helper: No application ‘SetLanguage’ for extension (protel_incoming, 8780043341, 1)
== Spawn extension (protel_incoming, 87800XXXX1, 1) exited non-zero on ‘SIP/87800XXXX2-00000051’

We have 2 trunks with the same provider, the user name of each one is the one that’s masked. One account ends in “1” and the other one ends in “2”.

Maybe is a problem with a registration or something, if you have an idea on where to look it would be good.

Thanks again for your support.

It looks like calls are coming in that’s why you even have a log.

Can you show us what’s inside [protel_incoming] context? Probably a good thing to try is to keep that context simple at first, e.g.

[protel_incoming]
exten => _X.,1,NoOp(Incoming call)
same => n,Dial(SIP/1234)
same => n,Hangup()

Change 1234 to an extension that’s already registered…

This is what [protel_incoming] has:

[protel_incoming]
exten => 8780043341,1,SetLanguage(es)
exten => 8780043341,n,Answer()
exten => 8780043341,n,Dial(SIP/1000,120,r)
exten => 8780043342,1,SetLanguage(es)
exten => 8780043342,n,Answer()
exten => 8780043342,n,Dial(SIP/1000,120,r)

I’m changing it on how you told me and making some tests, will post my results in a few minutes

Well, I’ve made the changes and now I don’t even get anything on the log.
I’m deleting the trunk and getting it on again to check if there’s a problem there.

Any idea on where to continue?

You should not be making these manual changes to the files. It only adds another troubleshooting step.

Use the FreePBX SIP trunk module and put your settings there.

Thank you Skyking,

But as I said in the begining, my service provider asks for some configurations on the sip.conf file, I can paste the configurations here, because I don’t think that all of them are able to be added on the SIP trunk module. I might be wrong too.

This go in the sip.conf file:

[general]
context=protel_incoming
port=5060
bindaddr=0.0.0.0
srvlookup=yes
subscribecontext=siphint
notifyringing = yes
language=es
dtmfmode = rfc2833
autocreatepeer=yes

defaultexpirey = 1800
maxexpirey = 1800

;--------------Registros----------------

register => 87800XXXXX:[email protected]/87800XXXXX ;551204XXXX

;---------- Lineas de Salida-----------------

[551204XXXX]
type=peer
host=i2next.com.mx
fromuser=87800XXXXX
fromusername=87800XXXXX
dtmfmode=inband
fromdomain=i2next.com.mx
context=protel_incoming
canreinvite=no
disallow=all
allow=g729 ;requiere licencia digium
allow=alaw
secret=p4ssw0rd
user=87800XXXXX
username=87800XXXXX

;-------------Extensiones--------------

[1000]
type=friend
context=out-protel
callerid=Ext <1000>
secret=1000
host=dynamic
nat=no
canreinvite=yes
dtmfmode=RFC2833
callgroup=2
pickupgroup=2
disallow=all
allow=alaw
allow=ulaw
allow=gsm

;-----------Peer de entrada------------

;este debe ir siempre al final del archivo sip.conf

[Entrada_i2next]
type=peer
host=200.76.112.13
insecure=yes
insecure=very
dtmfmode=rfc2833
context=protel_incoming
;allow=g729
allow=alaw

and this ones go in the extensions.conf file:

[general]
static=yes
autofallthrought=yes
writeprotect=no
autofallthrough=yes
priorityjumping=no

;-----------------------Entrada--------------------

[protel_incoming]
exten => 87800XXXXX,1,SetLanguage(es)
exten => 87800XXXXX,n,Answer()
exten => 87800XXXXX,n,Dial(SIP/1000,120,r)

;------------------------Salida--------------------

[out_protel]
exten => _9X.,1,Dial(SIP/551204XXXX/${EXTEN:1},120,Tt)
exten => _9X.,n,Congestion()
exten => _9X.,n,Hangup

If I’m doing something wrong please let me know.

Thank you for your answer.

I’ve made the changes on the trunk as you told me to do them, but I still can get inbound calls.

Is there a way to restore the files so I can delete them from the troubleshooting? or should I just erease everything on the files?

Also, where should I look next? on the inbound route I have no DID or CID assigned to match any number who calls, so any call from any number would go to an IVR I already configured.

Thanks again for your support.

I don’t understand what you are asking.

We always need log files.

Remove any changes you made in the files, do not delete anything.

Okey, I removed the changes I made on the files.

I can make outbound calls but I can’t get inbound calls. I’ve been trying to get the logs when I do a test call, but on the asterisk CLI doesn’t show anything, here shows when I do a call and I see it is succesful, but also on the asterisk logs module on FreePBX I don’t get anything neither.

So any idea on how could this get fixed?

Thanks for your help

Okey, I don’t know how, but it is working now.

Maybe the changes on the modified files were not updated, I restared the VPS and bingo! inbound calls…

so thank you both for all your help. I just configured everything like Skyking told me so there was my problem.

Thanks again for your support.