Disa is hanging up after dialtone


#1

Hi,

I am working on asterisk 13. I want to use the Disa to provide the dial-tone and allow the user to enter the number when a specific extension is dialed.

Also, I am setting up the system with the SLA. The I want to use disa for SLA station also. In the following example, if the user presses the line key then it should be called the disa and allow the user to dial the number(phone number/multiple digits) or if user dial 1111 then the user should hear the dial tone and should be able to enter the dial the number.

In the following setup, extension/station 8883 is on an IP phone and 8884 is on another IP phone.

Following are my asterisk config files. Please check the issues/question in the bottom.

–> sla.conf

[general]
attemptcallerid = yes

[user1Line]
type = trunk
attemptcallerid = yes
device = Local/disa@outbound1
barge=yes

[user2Line]
type = trunk
attemptcallerid = yes
device = Local/disa@outbound2
barge=yes

[station](!)
type=station
trunk=user1Line
trunk=user2Line

[8883](station)
device = PJSIP/8883

[8884](station)
device = PJSIP/8884

[8885](station)
device = PJSIP/8885

–> extensions.conf

[user1Line]
exten => s,1,NoOp(Transfering to available line)
same => n,SLATrunk(user1Line);

[user2Line]
exten => s,1,NoOp(Transfering to available line)
same => n,SLATrunk(user2Line);

[outbound1]
exten => disa,1,NoOp(disa1)
same => n,DISA(no-password,line1_outbound)

[line1_outbound]
exten => _[+*0-9].,NoOp(outbound-line1)
same => n,Dial(PJSIP/${EXTEN}@user1,60,r)

[outbound2]
exten => disa,1,NoOp(disa2)
same => n,DISA(no-password, line2_outbound)

[line2_outbound]
exten => _[+*0-9].,NoOp(outbound-line2)
same => n,Dial(PJSIP/${EXTEN}@user2,60,r)

[sla_stations]
exten => 8883,1,SLAStation(8883)
exten => 8883_user1Line,hint,SLA:8883_user1Line
exten => 8883_user1Line,1,NoOp(caller id ${CALLERIDNUM})
same => n,SLAStation(8883_user1Line)

exten => 8883_user2Line,hint,SLA:8883_user2Line
exten => 8883_user2Line,1,NoOp(caller id ${CALLERIDNUM})
same => n,SLAStation(8883_user2Line)

exten => 8884,1,SLAStation(8884)
exten => 8884_user1Line,hint,SLA:8884_user1Line
exten => 8884_user1Line,1,NoOp(caller id ${CALLERIDNUM})
same => n,SLAStation(8884_user1Line)

exten => 8884_user2Line,hint,SLA:8884_user2Line
exten => 8884_user2Line,1,NoOp(caller id ${CALLERIDNUM})
same => n,SLAStation(8884_user2Line)

exten => 8885,1,SLAStation(8885)
exten => 8885_user1Line,hint,SLA:8885_user1Line
exten => 8885_user1Line,1,NoOp(caller id ${CALLERIDNUM})
same => n,SLAStation(8885_user1Line)

exten => 8885_user2Line,hint,SLA:8885_user2Line
exten => 8885_user2Line,1,NoOp(caller id ${CALLERIDNUM})
same => n,SLAStation(8885_user2Line)

exten => 1111,1,NoOp(disa2 from the sla_station)
same => n,DISA(no-password, line2_outbound)

–> pjsip.conf


[global]
type=global
keep_alive_interval=20
endpoint_identifier_order=username,ip,anonymous

[simple]
type=transport
protocol=udp
bind=0.0.0.0
tos=cs7
cos=7

[simpletrans]
type=transport
protocol=tcp
bind=0.0.0.0:5060
tos=cs7
cos=7
local_net=192.168.145.0/24
external_media_address=71.225.187.142
external_signaling_address=71.225.187.142

[user1]
type=registration
outbound_auth=user1
outbound_proxy=sip:abcd.sip.com\;transport=tcp
transport=simpletrans
line=yes
retry_interval=60
endpoint=user1
expiration=600
max_retries=240
server_uri=sip:abcd.sip.com\;transport=tcp
client_uri=sip:user1@abcd.sip.com\;transport=tcp

[user1]
type=auth
auth_type=userpass
password=1234567890
username=user1

[user1]
type=aor
remove_existing=yes
contact=sip:abcd.sip.com\;transport=tcp

[user1]
type=endpoint
tos_audio=cs7
cos_audio=7
direct_media=no
force_rport=yes
context=user1Line
rewrite_contact=yes
transport=simpletrans
mailboxes=999@vm_setup
disallow=all
allow=ulaw,h263,h264
from_user=user1
from_domain=abcd.sip.com\;transport=tcp
aors=user1
outbound_auth=user1

[user2]
type=registration
outbound_auth=user2
outbound_proxy=sip:abcd.sip.com\;transport=tcp
transport=simpletrans
line=yes
retry_interval=60
endpoint=user2
expiration=600
max_retries=240
server_uri=sip:abcd.sip.com\;transport=tcp
client_uri=sip:user2@abcd.sip.com\;transport=tcp

[user2]
type=auth
auth_type=userpass
password=0987654321
username=user2

[user2]
type=aor
remove_existing=yes
contact=sip:abcd.sip.com\;transport=tcp

[user2]
type=endpoint
tos_audio=cs7
cos_audio=7
direct_media=no
force_rport=yes
context=user2Line
rewrite_contact=yes
transport=simpletrans
mailboxes=999@vm_setup
disallow=all
allow=ulaw,h263,h264
from_user=user2
from_domain=abcd.sip.com\;transport=tcp
aors=user2
outbound_auth=user2

[8883]
type=endpoint
transport=simple
context=sla_stations
send_pai=yes
send_rpid=yes
disallow=all
tos_audio=cs7
cos_audio=7
rewrite_contact=yes
dtmf_mode=rfc4733
allow=ulaw,h263,h264
mailboxes=999@vm_setup
auth=8883
aors=8883

[8883]
type=auth
auth_type=userpass
password=abcdabcdabcd1
username=8883

[8883]
type=aor
max_contacts=2

[8884]
type=endpoint
transport=simple
context=sla_stations
send_pai=yes
send_rpid=yes
disallow=all
tos_audio=cs7
cos_audio=7
rewrite_contact=yes
dtmf_mode=rfc4733
allow=ulaw,h263,h264
mailboxes=999@vm_setup
auth=8884
aors=8884

[8884]
type=auth
auth_type=userpass
password=abcdabcdabcd2
username=8884

[8884]
type=aor
max_contacts=2


[8885]
type=endpoint
transport=simple
context=sla_stations
send_pai=yes
send_rpid=yes
disallow=all
tos_audio=cs7
cos_audio=7
rewrite_contact=yes
dtmf_mode=rfc4733
allow=ulaw,h263,h264
mailboxes=999@vm_setup
auth=8885
aors=8885

[8885]
type=auth
auth_type=userpass
password=abcdabcdabcd3
username=8885

[8885]
type=aor
max_contacts=2

Issues/Questions:

  1. If I dial “1111” or “8885_user1Line” or “8885_user2Line”, the call is getting connected to the disa and I ma hearing the dial-tone. However, as soon as I press any number, the call is getting hung up.
  • why Disa is hanging up the call after the first DTMF?
  • How can I allow Disa to handle multiple digits(DTMF) which I can use with Dial() and make a call to that number?
  • If I don’t press anything during that dial tone then Disa will wait for 11-12 seconds and it will hang up the call after that. How can I increase the wait time?
  1. When I dial the “8883_user1Line” or “8883_user2Line” or “8884_user1Line” or “8884_user2Line” from the phones, I am getting “603 Decline” error on the phones and it is not connecting to the Disa at all.

Any help would be appreciated.

Thanks.


#2

There is an obvious syntax error on this line. The PBX (dialplan interpreter) rather than DISA is terminating the call because there are no valid extensions in the context.


#3

@david551 Thanks for your reply.

I also tried following and got the same results:

[outbound2]
exten => disa,1,NoOp(disa2)
 same => n,DISA(no-password, line2_outbound)


[line2_outbound]
exten => _1NXXNXXXXXX,NoOp(outbound-line2)
 same => n,Dial(PJSIP/${EXTEN}@user2,60,Hg)

so what should be the extensions? Can you provide some example?
I am trying to allow all the digits, + and * when they input the number.

Also when it hangs up, I am getting following logs on the Asterisk CLI:

Local/disa@outbound2-00000007;1 answered
    -- Created MeetMe conference 1018 for conference 'SLA_user2Line'
       > 0xea0aa0 -- Probation passed - setting RTP source address to 192.168.145.23.:5004
[Oct 26 18:47:01] DTMF[7744][C-00000013]: channel.c:4040 __ast_read: DTMF begin '1' received on PJSIP/8883-00000007
[Oct 26 18:47:01] DTMF[7744][C-00000013]: channel.c:4051 __ast_read: DTMF begin passthrough '1' on PJSIP/8883-00000007
[Oct 26 18:47:01] DTMF[7747][C-00000014]: channel.c:4040 __ast_read: DTMF begin '1' received on Local/disa@outbound2-00000007;2
[Oct 26 18:47:01] DTMF[7747][C-00000014]: channel.c:4044 __ast_read: DTMF begin ignored '1' on Local/disa@outbound2-00000007;2
[Oct 26 18:47:02] DTMF[7744][C-00000013]: channel.c:3947 __ast_read: DTMF end '1' received on PJSIP/8883-00000007, duration 160 ms
[Oct 26 18:47:02] DTMF[7744][C-00000013]: channel.c:3995 __ast_read: DTMF end accepted with begin '1' on PJSIP/8883-00000007
[Oct 26 18:47:02] DTMF[7744][C-00000013]: channel.c:4024 __ast_read: DTMF end passthrough '1' on PJSIP/8883-00000007
[Oct 26 18:47:02] DTMF[7747][C-00000014]: channel.c:3947 __ast_read: DTMF end '1' received on Local/disa@outbound2-00000007;2, duration 160 ms
[Oct 26 18:47:02] DTMF[7747][C-00000014]: channel.c:4024 __ast_read: DTMF end passthrough '1' on Local/disa@outbound2-00000007;2
  == Spawn extension (outbound2, disa, 2) exited non-zero on 'Local/disa@outbound2-00000007;2'
    -- Hungup 'DAHDI/pseudo-789530512'
[Oct 26 18:47:02] WARNING[7744][C-00000013]: app_meetme.c:5252 admin_exec: Conference number 'SLA_user2Line' not found!
  == Setting global variable 'MEETMEADMINSTATUS' to 'NOTFOUND'
    -- Auto fallthrough, channel 'PJSIP/8883-00000007' status is 'UNKNOWN'

#4

See the first line of your outbound2 context for the correct syntax.


#5

Do you mean following?

[outbound2]
exten => disa,1,NoOp(disa2)
 same => n,DISA(no-password, line2_outbound)


[line2_outbound]
exten => disa,NoOp(outbound-line2)
 same => n,Dial(PJSIP/${EXTEN}@user2,60,Hg)

That did not work either. Can you provide an example instead of just telling me where to look?


#6

Almost every line in your dialplan is an example of the correct syntax.

The syntax is:

"exten" "=>" <pattern> "," <priority> "," <application> [ "(" <parameters> ")" ]

you are missing one of the fields and one of the delimiters.


#7

@david551 Thanks for the help. The “1111” or “8885_user1Line” or “8885_user2Line” extensions started working. I am able to make the outgoing call using the DISA. (Note: extension 8885 is declared in the pjsip as an extension but it is not connected to any phone)


However, “8883_user1Line” or “8883_user2Line” or “8884_user1Line” or “8884_user2Line” are still hanging up. (Note: extension 8883 and 8884 are connected to the phone)

I am getting the following error:

 Executing [8883_user1Line@sla_stations:1] NoOp("PJSIP/8883-00000004", "caller id ") in new stack
    -- Executing [8883_user1Line@sla_stations:2] SLAStation("PJSIP/8883-00000004", "8883_user1Line") in new stack
    -- Called disa@outbound1
    -- Executing [8883_user1Line@sla_stations:3] Hangup("PJSIP/8883-00000004", "") in new stack
  == Spawn extension (sla_stations, 8883_user1Line, 3) exited non-zero on 'PJSIP/8883-00000004'
    -- Executing [disa@outbound1:1] NoOp("Local/disa@outbound1-00000002;2", "disa1") in new stack