Answer the question
In order to leave comments, you need to log in
How to find a problem in a call via DAHDI?
There is a link between two automatic telephone exchanges Panasonic and Asterisk. A call to MSC goes as follows:
A call to numbers 8495ххххххх from PBX Panasonic 1 is sent to Asterisk and via DAHDI goes to PBX Panasonic 2 from where the call is already being made. When calling DAHDI, Asterisk checks the status. If OK, then the call goes through DAHDI, and if congestion, or chanunavail goes to SIP and makes a call through SIP.
Code below:
exten => s,1,NoOp(subMoscowCalling)
exten => s,n,Set(CALLERID(num)=123456) ;подмена CLIPID
exten => s,n,Set(TRANSFER_CONTEXT=from-internal)
exten => s,n,Dial(DAHDI/g1/9468${ARG1},30,T) ;звонок через АТС МСК
exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) ;получение статуса звонка
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,NoOp()
exten => s-CONGESTION,3,Dial(SIP/TR/${ARG1:1},,T) ;если сеть перегружена, то звонок через SIP
exten => s-CANCEL,1,Hangup()
exten => s-CHANUNAVAIL,3,Dial(SIP/TR/${ARG1:1},,T) ;если канал не доступна то звонок через SIP
Answer the question
In order to leave comments, you need to log in
Insert the script execution before switching to SIP
and in the script itself write:
/usr/sbin/asterisk -r -x "core show channels" | grep DAHDI >> /var/log/asterisk/dahdi-chanell.log
And then using tail -f /var/log/asterisk/dahdi-chanell.log
see what is written there, you will see the channel statuses.
In general, you can also enter the
same => n , ChanIsAvail(DAHDI/g1&SIP/TR)
same => n , NoOp(Available channel ${AVAILCHAN})
Before the first call (at the same time you will learn about the wonderful construction same with which you can not repeat once again exten)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question