Caller hung up before dial problem

if i try call, I can see caller hung up before dial
what is the problem?

this is my dial plan
[out1]
exten=>.,1,Set(CALLERID(num)=${cid})
exten=>
.,n,Gosub(monitor,${EXTEN},1)
same=>n,Dial(SIP/${EXTEN}@${trunk})
same=>n,Playback(account-balance-is.alaw)

[monitor]
exten=>.,1,set(path=/var/www/html/rec/)
same=>n,Mixmonitor(${path}${STRFTIME(${EPOCH},%Y-%m-%d
%H-%M-%S)}-${EXTEN}${type}${src}.wav)
same=>n,return()

[out2]
exten=>.,1,ResetCDR()
exten=>
.,n,Set(CALLERID(num)=${cid})
exten=>.,n,Set(CALLERID(name)=${cidname})
exten=>
.,n,Playback(account-balance-is.alaw)
same=>n,hangup()

pleaes check and help me
how to do to make dial calling successfull?

You have a channel not implemented error.
Do you have chan_sip.so module loaded?

current chan_sip.so module loaded
and currently in trunk, one pjsip trunk created.
have to create sip trunk instead of pjsip trunk?

If you are using PJSIP, you should keep doing that and not switch to chan_sip.
In the Dial application though, you have to specify PJSIP as the technology instead of SIP.

same => n,Dial(PJSIP/${EXTEN}@${trunk})

https://wiki.asterisk.org/wiki/display/AST/Dialing+PJSIP+Channels

sorry. I did as your guide.
but I can see caller hung up before dial error continually.

when create sip trunk, what information i have to write in peer details?
host=216.53.4.1
username=userid —?
secret=password ----?
type=peer

I found solution
the problem is related with sip trunk.
after created sip trunk correctly, I can connect calling.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.