Asterisk failed send message via xmpp on dialplan

I have an active connection to the jabber server and if I create a simple command in the dialplan, it is executed and messages reach the jabber, for example:

exten => 307,1,JabberSend(asterisk,user@example.com,Hello World)
exten => 307,2,JabberSend(asterisk,user@example.com,Another Message)

But if I add to another section of the dial plan, where there are many different events, then the entire dial plan code is executed, but the jabber does not send a message and the command JabberSend is not displayed in the asterisk logs. For example in this code jabber does not send messages


exten => 111,   1 ,   Set(fname=${STRFTIME(${EPOCH},,%Y%m%d%H%M)}-${CALLERID(number)})
exten => 111,   2 ,   MixMonitor(/var/log/asterisk/record/${fname}.wav,b)
exten => 111,   3 ,   Set(CDR(userfield)=${CHANNEL(pjsip,remote_addr)})
exten => 111,   4 ,   Set(CDR(recordingfile)=${fname})

exten => 111,   5 ,   JabberSend(asterisk,user@example.com,Hello World)

exten => 111,   6 ,   Dial(PJSIP/401,,t,30) 
exten => 111,   7 ,   Dial(PJSIP/402,,t)  

exten => 111,   8 ,   JabberSend(asterisk,user@example.com,Hello World)

exten => 111,   9 ,   Hangup()

steps 5 and 8 when it is necessary to send messages through the JabberSend do not work, but the dialplan logic itself is executed correctly. It’s not clear why this happens, perhaps you have some ideas about this? There are no errors in the logs, the sending event is simply not executed silently.
Asterisk 20.04 on Ubuntu 23.10 and XMPP server Ejabberd 23.01-1

I recommend you call external script ( bash shell, php, … ) to do this task

About log missing, you should check your setting in logger.conf

1 Like

Thanks! I found mcabber - a simple Jabber (XMPP) console client