A
A
Anton18632019-08-30 17:06:06
Asterisk
Anton1863, 2019-08-30 17:06:06

How to fix call error between two sip lines in Asterisk?

I will briefly describe the details. Calling subscribers is carried out through call-files of the following content:

Channel: SIP/внешний транк/телефон вызова
Context: rko
Extension: телефон вызова
Priority: 1
Set: num=телефон вызова

Further, after the mobile phone that is being called is answered, a transition occurs through the context:
[rko]
exten => failed,1,System(echo "${num}" >> /var/log/asterisk/failed)
exten => failed,n,Hangup()
exten => _X.,1,Set(TIMEOUT(digit)=0.1)
exten => _X.,n,AMD()
exten => _X.,n,NoOp("AMD STATUS IS :"${AMDSTATUS}"...CAUSE:"${AMDCAUSE})
exten => _X.,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten => _X.,n(mach),System(echo "${EXTEN}" >> /var/log/asterisk/machine)
exten => _X.,n,Hangup()
exten => _X.,n(humn),Background(/var/lib/asterisk/moh/voicemail/rko_2)
exten => _X.,n,System(echo "${EXTEN}" >> /var/log/asterisk/unknown)
exten => _X.,n,Hangup()
exten => 1,1,Goto(want_rko,${num},1)

[want_rko]
exten => _X.,1,System(echo "${EXTEN}" >> /var/log/asterisk/wanted)
exten => _X.,n,Dial(SIP/внешний транк/логин второго внешнего транка@хост внешнего транка,,t&m) 
exten => _X.,n,Hangup()

In this context, an autoresponder is being defined, data is being logged, a background record is playing, if a person presses the number 1 on the phone, a transition occurs through the "want_rko" context. Again there is logging. And the most interesting line (exten => _X.,n,Dial(SIP/external trunk/login of the second external [email protected] trunk host,,t&m)), call redirection to another trunk attached to the dialer. In this scenario, Asterisk shows a 603 Decline error, i.e. as if the subscriber dropped the call. If you contact not by vulture, but by phone of this vulture, then the redirection works. Who can tell me how to implement this redirection by VIP?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Drill, 2019-08-30
@Drill

In my opinion, you overdid something with DIAL. Everything is much simpler:

exten => _X.,n,Dial(SIP/внешний транк/номер_телефона,,t&m)
или так
exten => _X.,n,Dial(SIP/номер_телефона@внешний транк,,t&m)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question