[Resolved] D65 not recording calls

####Digium D65 Phone not recording calls with DPMA####

Using the following:
Asterisk PBX certified/13.8-cert3
Digium Phone Module for Asterisk Version 13.0_3.2.2
Digium Phone D65 with firmware version 2.2.0.8
PJPROJECT version currently running against: 2.5

With a basic PJSIP configuration for testing and everything else working I found that when an in call recording is started using the “Record” soft key and the call is ended, a blank WAV file is placed in Cust5 at zero seconds long.
The Voicemail playback is working correctly and the only warning reported from the CLI is as follows…

== Spawn extension (default, 1003, 5) exited non-zero on 'PJSIP/1000-0000000b'
== End MixMonitor Recording PJSIP/1000-0000000b
   -- Copying recordings for Mixmonitor PJSIP/1000-0000000b to voicemail recipients
       > MixMonitor attempting to send voicemail copy to 1000@default
[Jan  4 10:21:54] WARNING[18658]: format_wav.c:234 update_header: Unable to set write file size

I suspect an issue with DPMA as it copies the file into the Cust5 directory.
Any help would be appreciated.

I’m using nearly what you’re using…

Asterisk PBX certified/13.8-cert4, built totally stock with no menuconfig modifications.
Digium Phone Module for Asterisk version 3.2.2 for 13.0, x86_64, bundled version
Digium Phone D65 with firmware version 2.2.0.8
PJProject as built “bundled” with 13.8-cert4.

Recordings are made and have bi-directional audio. I’ve used both ulaw and G.722.

I see the same conclusion and WARNING, but it doesn’t have any affect, for me.

== Spawn extension (dpma_pjsip_message_context, digium_phone_module, 7) exited non-zero on 'Message/ast_msg_queue'
== End MixMonitor Recording PJSIP/101-00000004
-- Copying recordings for Mixmonitor PJSIP/101-00000004 to voicemail recipients
[Jan  4 13:19:34] WARNING[32507]: format_wav.c:234 update_header: Unable to set write file size

and all’s well.

Malcolmd,

Are you running Asterisk as user asteriskbpx? Maybe it is a permissions issue.
If not the only thing different is -cert3 -vs- -cert4.

Running as root (bad practice, but good for testing and in a pinch). If you run as root do you see any difference?

Malcolmd,

Same issue as root, the file is there but nothing recorded.

Welp, there’s something unusual about your setup, in some way, fashion or form that results in failure, where successful operation is possible otherwise. Good luck at ferreting it out. Perhaps start with something simpler - the notion that you were running Asterisk as a non-root user is one item, maybe there are more configuration details about your setup that aren’t encompassed in this thread. Try cranking up the debug to see if there’s any helpful output.

I tried updating to 13.8-cert4 and still have the same issue.
After some testing I also found that 2-way audio during the call stops when the record button is pressed.

I also set up dpma logging in logger.conf
dpma => dpma
full => notice,warning,error,debug,verbose,dtmf,fax,dpma

Output of /var/log/asterisk/dpma when the record button is pressed:

[Jan  6 14:05:11] DPMA[23203] phone_message.c: Receive fm pjsip:192.168.1.59:5060;transport=udp 'HTTPRequest' body length = 1024
[Jan  6 14:05:11] DPMA[24119] phone_request.c: Asterisk request method 'switchvox.users.currentCalls.startRecording' is using XML body
[Jan  6 14:05:11] DPMA[24119] phone_message.c: Sending to pjsip:192.168.1.59:5060;transport=udp 'HTTPResponse' body length 166

Not sure what the “switchvox” reference is about.

This is the CLI output when the record button is pressed:

Asterisk1*CLI>
    -- Executing [proxy@dpma_pjsip_message_context:1] Set("Message/ast_msg_queue", "MESSAGE(custom_data)=mark_all_outbound") in new stack
    -- Executing [proxy@dpma_pjsip_message_context:2] Set("Message/ast_msg_queue", "MESSAGE_DATA(X-Digium-AppServer-Response-URI)=pjsip:192.168.1.59:5060") in new stack
    -- Executing [proxy@dpma_pjsip_message_context:3] Set("Message/ast_msg_queue", "MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=") in new stack
    -- Executing [proxy@dpma_pjsip_message_context:4] MessageSend("Message/ast_msg_queue", "digium_phone:blah") in new stack
    -- Executing [proxy@dpma_pjsip_message_context:5] Hangup("Message/ast_msg_queue", "") in new stack
  == Spawn extension (dpma_pjsip_message_context, proxy, 5) exited non-zero on 'Message/ast_msg_queue'
       > Adding 1000@default to recipient list
  == Begin MixMonitor Recording PJSIP/1000-00000010
       > Bridge 58f576cd-cd6e-46c0-8c0b-fb2a461c135f: switching from native_rtp technology to simple_bridge
    -- Executing [digium_phone_module@dpma_pjsip_message_context:1] Set("Message/ast_msg_queue", "MESSAGE(custom_data)=mark_all_outbound") in new stack
    -- Executing [digium_phone_module@dpma_pjsip_message_context:2] Set("Message/ast_msg_queue", "TMP_RESPONSE_URI=pjsip:192.168.1.59:5060;transport=udp") in new stack
    -- Executing [digium_phone_module@dpma_pjsip_message_context:3] Set("Message/ast_msg_queue", "MESSAGE_DATA(Request-URI)=") in new stack
    -- Executing [digium_phone_module@dpma_pjsip_message_context:4] Set("Message/ast_msg_queue", "MESSAGE_DATA(X-Digium-AppServer-Response-URI)=") in new stack
    -- Executing [digium_phone_module@dpma_pjsip_message_context:5] Set("Message/ast_msg_queue", "MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=") in new stack
    -- Executing [digium_phone_module@dpma_pjsip_message_context:6] MessageSend("Message/ast_msg_queue", "pjsip:192.168.1.59:5060;transport=udp,proxy") in new stack
    -- Executing [digium_phone_module@dpma_pjsip_message_context:7] Hangup("Message/ast_msg_queue", "") in new stack
  == Spawn extension (dpma_pjsip_message_context, digium_phone_module, 7) exited non-zero on 'Message/ast_msg_queue'
Asterisk1*CLI>

Can you post your phone config in res_digium_phone.conf setup, here is mine:

 ; ---- PHONE Test1 ----
[test1]
type=phone
network=network1
mac=000fdxxxxx
line=1000
full_name=Test1 Phone
contact=test1contacts.xml
blf_contact_group=RapidDial
blf_items=test1blfitems.xml
contacts_max_subscriptions=40
timezone=America/New_York
ntp_resync=86400
parking_exten=700
parking_transfer_type=blind
active_ringtone=Beep
web_ui_enabled=yes
record_own_calls=yes
blf_unused_linekeys=yes
d65_logo_file=d65_background299x205.png
display_mc_notification=0
can_forward_calls=yes
enable_check_sync=yes

There’s not much in the line config other than mailbox=1000@default.

The call record button does record while in an echo test.
After the D65 gets a factory reset and provision load, the first recording works but only the first part of the recording sounds normal, then distortion and silence. Very odd.

After the D65 gets a factory reset and provision load, the first recording works but only the first part of the recording sounds normal, then distortion and silence. Very odd.

Indeed. As the phone’s not the thing doing the recording, and as DPMA’s just telling Asterisk to run a MixMonitor on the channel and then copying the file on the backend to the Cust5 folder, I can’t say it’s necessarily DPMA’s fault. My phone config isn’t going to be of great help, because it’s got a lot…

What’s perhaps more interesting is your pjsip configuration for the phone.

There’s nothing specifically wrong with your phone config there; I can load that up and record calls between two phones just fine.

Here is a snip from pjsip.conf:

[1000]
type=endpoint
callerid="Drew Test1"<1000>
context=default
transport=transport-udp
disallow=all
allow = g722
allow = ulaw
allow = alaw
allow = g726
allow=gsm
aors=1000
auth=1000

Other than the explicit endpoint definition, which isn’t a good idea, nothing is amiss there. Works for me. What’s your network look like? What’s your dialplan look like?

If I take out the endpoint reference I get an error:

[Jan  9 09:58:03] NOTICE[6724]: res_pjsip/pjsip_distributor.c:482 log_unidentified_request: Request from '"\"Drew Test1\" <1000>" <sip:1000@192.168.1.4>' failed for '192.168.1.59:5060' (callid: X77LXElGx-MWNSpV53encigQGaenE8cq) - No matching endpoint found

What is the correct way to define this?

Network from pjsip.conf:

[transport-udp]
type=transport
protocol=udp    ;udp,tcp,tls,ws,wss
bind=0.0.0.0

and the dialplan:

    exten => 1000,hint,,CustomPresence:1000
    exten => 1000,1,NoOp()
        same => n,GotoIf($["${PJSIP_HEADER(read,X-Digium-Call-Feature)}" == "feature_intercom"]?intercomcall:notintercomcall)
        same => n(notintercomcall),GotoIf($["${PRESENCE_STATE(CustomPresence:1000,value)}" = "dnd" | "${PRESENCE_STATE(CustomPresence:1000,value)}" = "xa" | "${PRESENCE_STATE(CustomPresence:1000,value)}" = "away"]?dnd:notdnd)
        same => n,Hangup()
        same => n(intercomcall),Dial(PJSIP/1000,,b(handler-intercom^addheader^1))
        same => n(dnd),Voicemail(1000)
        same => n,Hangup()
        same => n(notdnd),Dial(PJSIP/1000,20,)
        same => n,Voicemail(1000)
        same => n,Hangup()

[handler-intercom]
exten => addheader,1,Set(PJSIP_HEADER(add,Alert-Info)=<intercom>)
    same => n,Return()

See any issues?.

Nothing stands out that seems pertinent to your reported issue - bidirectional audio disappears when you press the record button on the phone, which means Asterisk is just hooking a MixMonitor onto the channel.

Outside of that, DPMA creates a CustomPresence device hint for you, “auto_hint_” so you shouldn’t have to create a CustomPresence for that device or explicitly create it in the dialplan. Also, in your dialplan, since you peers are likely the same as your extensions, you could replace most of those references to “1000” with ${EXTEN}

And, the phone’s only going to have those features on them if you’ve created contacts that have those headers - hopefully you did that in test1contacts.xml.

You do have a valid voicemail box for 1000 yes,? DPMA’s trying to find the mailbox for your phone based on its line. Do you have a mailbox configured for the res_digium_phone line or for the PJSIP endpoint?

You can test the functionality of MixMonitor by calling it across AMI. Once you’ve got a channel up and going, you can, provided you’ve turned on AMI and created an account, telnet in and then do something like:

Action: MixMonitor
File: test.wav
Options: m(1000/Cust5)
Channel: PJSIP/1000-0000000c

to turn it on, where you sub-in your channel ID . Then say whatever you like. Then stop it:

Action: StopMixMonitor
Channel: PJSIP/1000-0000000c

I removed exten => 1000,hint,CustomPresence:1000 as it is not needed
I have not used ${EXTEN} as I’m just testing for now.
Headers are in the test1contacts.xml file, and working under testing.
The mailbox is set up in voicemail.conf and line config of PJSIP.conf and working with the phone app.

The same issue happens with the AMI connection, audio stops and 0 second files in Cust5.

Could this be related to chan_SIP as I have removed it with noload in modules.conf?

Not likely to be related. My modules.conf also noloads chan_sip.so

[Resolved] Firewall issue.

After looking at network traffic I found that pressing record sends traffic on ports other than 5060/udp.

Wed Jan 11 15:03:43 2017; UDP; eno1; 120 bytes; from 192.168.1.60:4018 to 192.168.1.4:16478
Wed Jan 11 15:03:43 2017; UDP; eno1; 120 bytes; from 192.168.1.60:4018 to 192.168.1.4:16478
Wed Jan 11 15:03:43 2017; UDP; eno1; 1048 bytes; from 192.168.1.60:5060 to 192.168.1.4:5060
Wed Jan 11 15:03:43 2017; UDP; eno1; 470 bytes; from 192.168.1.4:5060 to 192.168.1.60:5060

After opening udp ports in the range 10000-20000 for RTP media, the record soft key works on the Digium D65 phone.

1 Like