Asterisk 13.4 DTMF problem (Attended Transfer) and Snom 320

Hi,

I have an issue with snom 320 and attended transfer with asterisk 13.4.0 with PJSIP 2.4 . In festures.conf *2 is the code for attended transfer and it works ok, but when I digit the number of the sip phone to which transfer the call, it is not recognized and, therefore, the attended transfer not works…

A (229) call B (240) and B answer

-- Executing [240@interni:1] Gosub("PJSIP/229-00001cd1", "subInterni,s,1(0,240)") in new stack
    -- Executing [s@subInterni:1] Dial("PJSIP/229-00001cd1", "PJSIP/240,50,tTrkKxXwW") in new stack
    -- Called PJSIP/240
    -- PJSIP/240-00001cd2 is ringing
    -- PJSIP/240-00001cd2 answered PJSIP/229-00001cd1
    -- Channel PJSIP/229-00001cd1 joined 'simple_bridge' basic-bridge <b626b1b1-d5ed-4192-aea4-4f2ac1f46138>
    -- Channel PJSIP/240-00001cd2 joined 'simple_bridge' basic-bridge <b626b1b1-d5ed-4192-aea4-4f2ac1f46138>
       > Bridge b626b1b1-d5ed-4192-aea4-4f2ac1f46138: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'PJSIP/240-00001cd2' and 'PJSIP/229-00001cd1' in stack
       > Locally RTP bridged 'PJSIP/240-00001cd2' and 'PJSIP/229-00001cd1' in stack
       > 0x7f0b48a3f120 -- Probation passed - setting RTP source address to 192.168.5.79:62204
       > 0x7f0b48a3ac10 -- Probation passed - setting RTP source address to 192.168.5.129:54972

A press “Transfer” button configured as DTMF and code *2

[Jul  2 11:52:32] DTMF[32099][C-00000dd7]: channel.c:3947 __ast_read: DTMF end '*' received on PJSIP/229-00001cd1, duration 160 ms
[Jul  2 11:52:32] DTMF[32099][C-00000dd7]: channel.c:3974 __ast_read: DTMF begin emulation of '*' with duration 160 queued on PJSIP/229-00001cd1
[Jul  2 11:52:32] DTMF[32099][C-00000dd7]: channel.c:4067 __ast_read: DTMF end emulation of '*' queued on PJSIP/229-00001cd1
[Jul  2 11:52:33] DTMF[32099][C-00000dd7]: channel.c:3947 __ast_read: DTMF end '2' received on PJSIP/229-00001cd1, duration 160 ms
[Jul  2 11:52:33] DTMF[32099][C-00000dd7]: channel.c:3974 __ast_read: DTMF begin emulation of '2' with duration 160 queued on PJSIP/229-00001cd1
[Jul  2 11:52:33] DTMF[32099][C-00000dd7]: channel.c:4067 __ast_read: DTMF end emulation of '2' queued on PJSIP/229-00001cd1
    -- Started music on hold, class 'default', on channel 'PJSIP/240-00001cd2'
    -- <PJSIP/229-00001cd1> Playing 'pbx-transfer.g729' (language 'it')

A wants to transfer the call to C (221) and so digit 221:

[Jul  2 11:54:30] DTMF[32099][C-00000dd7]: channel.c:3947 __ast_read: DTMF end '2' received on PJSIP/229-00001cd1, duration 160 ms
[Jul  2 11:54:30] DTMF[32099][C-00000dd7]: channel.c:4017 __ast_read: DTMF end passthrough '2' on PJSIP/229-00001cd1
    -- <PJSIP/229-00001cd1> Playing 'pbx-invalid.g729' (language 'it')
[Jul  2 11:54:31] DTMF[32099][C-00000dd7]: channel.c:3947 __ast_read: DTMF end '2' received on PJSIP/229-00001cd1, duration 160 ms
[Jul  2 11:54:31] DTMF[32099][C-00000dd7]: channel.c:4017 __ast_read: DTMF end passthrough '2' on PJSIP/229-00001cd1
[Jul  2 11:54:32] DTMF[32099][C-00000dd7]: channel.c:3947 __ast_read: DTMF end '1' received on PJSIP/229-00001cd1, duration 160 ms
[Jul  2 11:54:32] DTMF[32099][C-00000dd7]: channel.c:4017 __ast_read: DTMF end passthrough '1' on PJSIP/229-00001cd1
    -- <PJSIP/229-00001cd1> Playing 'pbx-invalid.g729' (language 'it')

but 221 is not recognized…

Why when I use the transfer button Asterisk makes emulation of the code (*2) and when I digit 221 Asterisk doesn’t meke the emulation of the digit?

In PJSIP.conf

dtmf_mode=info
direct_media=no
allow_transfer=yes
inband_progress=no

In snom 320 (firmware v. 8.7.5.17) configuration I set Under Identity -> SIP :

DTMF via SIP INFO = On

Can someone help me please?

Thank you very much…

Not emulating is fine - it means that the what is waiting for DTMF doesn’t need to know when it begins. It just needs to know when the digit ends and what the digit is. That’s all.

What is the dialplan? Which context does the phone have access to?

It appears as the extension being entered does not exist in the context, thus it immediately rejects it as invalid.

Hi, in pjsip.conf I have:

; ####### GENERAL SECTION #######


[endpoint-generale](!)
type=endpoint
transport=transport-udp
tone_zone=it
language=it

[b]context=interni[/b]

[b]dtmf_mode=info[/b]
disallow=all
allow=g729
;allow=alaw
media_encryption=no
direct_media=no

allow_subscribe=yes 
sub_min_expiry=30
device_state_busy_at=0
allow_transfer=yes
inband_progress=no
send_pai=yes 
send_rpid=yes 

[aor-generale](!)
type=aor
max_contacts=1
remove_existing=no
default_expiration=3600
minimum_expiration=60
maximum_expiration=7200
qualify_frequency=300

[auth-generale](!)
type=auth
auth_type=userpass


; ####### ENDPOINT 221

[221](endpoint-generale)
aors=221
auth=auth221
callerid=Moti <221>
call_group=1
pickup_group=1

[auth221](auth-generale)
username=xxxxx
password=yyyyyyyy


; ####### ENDPOINT 229
[229](aor-generale)

[auth229](auth-generale)
username=xxxxx
password=yyyyyyyy

[229](aor-generale)


; ####### ENDPOINT 240
[240](aor-generale)

[auth240](auth-generale)
username=xxxxx
password=yyyyyyyy

[240](aor-generale)

In extensions.conf

[subInterni]

exten => s,1,Dial(PJSIP/${ARG2},${TIMEOUT},tTrkKxXwW)
exten => s,n,Return()


[interni]

include => lampblf
include => emergenza ;emergency 

exten => _20[01],1,Dial(${CENTRALINO},${TIMEOUT},tTrkKxXwW) 

exten => _2[234]X,1,GoSub(subInterni,s,1(0,${EXTEN})

exten => _*8.,1,PickupChan(PJSIP/${EXTEN:2})                    ; Pickup
exten => _*8.,n,Hangup()

include => parkedcalls
include => esterni

As you can see, the extensions (221, 229 and 240) exist in context “interni”…
Can you help me, please?

Thank you very much…

A complete console output would also be useful.

This is a complete console output of the operation…

-- Executing [240@interni:1] Gosub("PJSIP/229-00001ec1", "subInterni,s,1(0,240)") in new stack
    -- Executing [s@subInterni:1] Dial("PJSIP/229-00001ec1", "PJSIP/240,50,tTrkKxXwW") in new stack
    -- Called PJSIP/240
    -- PJSIP/240-00001ec2 is ringing
    -- PJSIP/240-00001ec2 answered PJSIP/229-00001ec1
    -- Channel PJSIP/229-00001ec1 joined 'simple_bridge' basic-bridge <298cd002-2df1-479d-8889-534237ef81de>
    -- Channel PJSIP/240-00001ec2 joined 'simple_bridge' basic-bridge <298cd002-2df1-479d-8889-534237ef81de>
       > Bridge 298cd002-2df1-479d-8889-534237ef81de: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'PJSIP/240-00001ec2' and 'PJSIP/229-00001ec1' in stack
       > Locally RTP bridged 'PJSIP/240-00001ec2' and 'PJSIP/229-00001ec1' in stack
       > 0x7f0b48acd830 -- Probation passed - setting RTP source address to 192.168.5.79:57084
       > 0x7f0b48b1f680 -- Probation passed - setting RTP source address to 192.168.5.129:59802
[Jul  6 12:13:34] DTMF[2286][C-00000ec7]: channel.c:3947 __ast_read: DTMF end '*' received on PJSIP/229-00001ec1, duration 160 ms
[Jul  6 12:13:34] DTMF[2286][C-00000ec7]: channel.c:3974 __ast_read: DTMF begin emulation of '*' with duration 160 queued on PJSIP/229-00001ec1
[Jul  6 12:13:34] DTMF[2286][C-00000ec7]: channel.c:4067 __ast_read: DTMF end emulation of '*' queued on PJSIP/229-00001ec1
[Jul  6 12:13:34] DTMF[2286][C-00000ec7]: channel.c:3947 __ast_read: DTMF end '2' received on PJSIP/229-00001ec1, duration 160 ms
[Jul  6 12:13:34] DTMF[2286][C-00000ec7]: channel.c:3974 __ast_read: DTMF begin emulation of '2' with duration 160 queued on PJSIP/229-00001ec1
[Jul  6 12:13:35] DTMF[2286][C-00000ec7]: channel.c:4067 __ast_read: DTMF end emulation of '2' queued on PJSIP/229-00001ec1
    -- Started music on hold, class 'default', on channel 'PJSIP/240-00001ec2'
    -- <PJSIP/229-00001ec1> Playing 'pbx-transfer.g729' (language 'it')
[Jul  6 12:13:37] DTMF[2286][C-00000ec7]: channel.c:3947 __ast_read: DTMF end '2' received on PJSIP/229-00001ec1, duration 160 ms
[Jul  6 12:13:37] DTMF[2286][C-00000ec7]: channel.c:4017 __ast_read: DTMF end passthrough '2' on PJSIP/229-00001ec1
    -- <PJSIP/229-00001ec1> Playing 'pbx-invalid.g729' (language 'it')
[Jul  6 12:13:38] DTMF[2286][C-00000ec7]: channel.c:3947 __ast_read: DTMF end '2' received on PJSIP/229-00001ec1, duration 160 ms
[Jul  6 12:13:38] DTMF[2286][C-00000ec7]: channel.c:4017 __ast_read: DTMF end passthrough '2' on PJSIP/229-00001ec1
[Jul  6 12:13:39] DTMF[2286][C-00000ec7]: channel.c:3947 __ast_read: DTMF end '1' received on PJSIP/229-00001ec1, duration 160 ms
[Jul  6 12:13:39] DTMF[2286][C-00000ec7]: channel.c:4017 __ast_read: DTMF end passthrough '1' on PJSIP/229-00001ec1
    -- <PJSIP/229-00001ec1> Playing 'pbx-invalid.g729' (language 'it')
[Jul  6 12:13:46] WARNING[2286][C-00000ec7]: bridge_basic.c:3283 feature_attended_transfer: Unable to acquire target extension for attended transfer.
       > Locally RTP bridged 'PJSIP/240-00001ec2' and 'PJSIP/229-00001ec1' in stack
    -- Stopped music on hold on PJSIP/240-00001ec2
       > Locally RTP bridged 'PJSIP/240-00001ec2' and 'PJSIP/229-00001ec1' in stack
    -- Channel PJSIP/229-00001ec1 left 'native_rtp' basic-bridge <298cd002-2df1-479d-8889-534237ef81de>
    -- Channel PJSIP/240-00001ec2 left 'native_rtp' basic-bridge <298cd002-2df1-479d-8889-534237ef81de>
  == Spawn extension (subInterni, s, 1) exited non-zero on 'PJSIP/229-00001ec1'

Thank you

Someone ca help me please?

Thank you very much…