Tryng to config IM on Asterisk 16 running on ubuntu 20.4, Problem is not able to send msg. Calls are ok. using GSwave msg show up error on Asterisk

A full error it generates.
[Feb 22 07:56:50] ERROR[1006][C-00000001]: translate.c:1393 ast_translator_best_choice: Cannot determine best translation path since one capability supports no formats
[Feb 22 07:56:50] WARNING[1006][C-00000001]: channel.c:6179 request_channel: No translator path exists for channel type SIP (native (amr|amrwb|codec2|g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin|slin|slin|slin|slin|slin|slin|slin|lpc10|g729|speex|speex|speex|ilbc|g722|siren7|siren14|testlaw|g719|opus|silk|silk|silk|silk)) to (nothing)
[Feb 22 07:56:50] WARNING[1006][C-00000001]: app_dial.c:2507 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 58 - Bearer capability not available)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [1111@internal:3] Playback(“Message/ast_msg_queue”, “vm-nobodyavail”) in new stack
[Feb 22 07:56:50] ERROR[1006][C-00000001]: channel.c:5558 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
[Feb 22 07:56:50] WARNING[1006][C-00000001]: file.c:1252 ast_streamfile: Unable to open vm-nobodyavail (format (none)): Function not implemented

[Feb 22 07:56:50] WARNING[1006][C-00000001]: app_playback.c:492 playback_exec: Playback failed on Message/ast_msg_queue for vm-nobodyavail
– Executing [1111@internal:4] VoiceMail(“Message/ast_msg_queue”, “1111@main”) in new stack
[Feb 22 07:56:50] WARNING[1006][C-00000001]: app_voicemail.c:6712 leave_voicemail: No entry in voicemail config file for ‘1111’
– Executing [1111@internal:5] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (internal, 1111, 5) exited non-zero on ‘Message/ast_msg_queue’

My SIP.conf
[general]
context=internal
allowguest=no
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no
disallow=all
allow=gsm

alwaysauthreject=yes
canreinvite=no
nat=yes
session-timers=refuse
localnet=172.18.0.0/255.255.0.0
accept_outofcall_message=yes
outofcall_message_context=internal

[1010]
type=friend
host=dynamic
username=Mike
secret=1001
context=internal

[1111]
type=friend
host=dynamic
username=1111
secret=1111
context=internal

MY Extensions.conf

[internal]
exten => 1010,1,Answer()
exten => 1010,2,Dial(SIP/1010,60)
exten => 1010,3,Playback(vm-nobodyavail)
exten => 1010,4,VoiceMail(1010@main)
exten => 1010,5,Hangup()

exten => 1111,1,Answer()
exten => 1111,2,Dial(SIP/1111,60)
exten => 1111,3,Playback(vm-nobodyavail)
exten => 1111,4,VoiceMail(1111@main)
exten => 1111,5,Hangup()

exten => 8001,1,VoicemailMain(1010@main)
exten => 8001,2,Hangup()

exten => 8002,1,VoicemailMain(1111@main)
exten => 8002,2,Hangup()

exten => _.,1,NoOp(SMS receiving dialplan invoked)
exten => _.,n,NoOp(To {MESSAGE(to)}) exten => _.,n,NoOp(From {MESSAGE(from)})
exten => _.,n,NoOp(Body {MESSAGE(body)}) ;exten => _.,n,AGI(chatplan.php,{MESSAGE(from)})
exten => _.,n,Set(ACTUALTO={CUT(MESSAGE(to),@,1)}) exten => _.,n,ExecIf(["{ACTUALTO}" != "sip:{EXTEN}"]?Set(ACTUALTO=sip:{EXTEN})) exten => _.,n,MessageSend({ACTUALTO},{MESSAGE(from)}) exten => _.,n,NoOp(Send status is {MESSAGE_SEND_STATUS})
exten => _.,n,GotoIf(["{MESSAGE_SEND_STATUS}" != “SUCCESS”]?sendfailedmsg)
exten => _.,n,Hangup()
;; Handle failed messaging
exten => _.,n(sendfailedmsg),NoOp(Sending error to user)
exten => _.,n,Set(SRC={MESSAGE(from)}) exten => _.,n,Set(DST={MESSAGE(to)})
exten => _.,n,Set(MSG={MESSAGE(body)}) exten => _.,n,Set(MESSAGE(body)="[{STRFTIME({EPOCH},,%d%m%Y-%H:%M:%S)}] Sua mensagem para {EXTEN} falhou. Destinatário não está on-line")
exten => _.,n,Set(ME_1={CUT(MESSAGE(from),<,2)}) exten => _.,n,Set(ACTUALFROM={CUT(ME_1,@,1)})
exten => _.,n,MessageSend({ACTUALFROM},ServiceCenter) ;exten => _.,n,GotoIf(["${INQUEUE}" != “1”]?startq)
exten => _.,n,Hangup()

You shouldn’t be calling Dial from your out of dialog context. Judging by the name, you need a different context for out of dialog messages.

Also, using _. as a pattern is dangerous, as it also matches h, i, e, t, etc.

so use the extension number itself instead of _.as pattern? and Can u explain more of the calling out of dialog context?

Error after changing some config as shown after error section.

Connected to Asterisk 16.2.1~dfsg-2ubuntu1 currently running on SIP (pid = 931)
– Executing [1111@internal:1] Answer(“Message/ast_msg_queue”, “”) in new stack
– Executing [1111@internal:2] Dial(“Message/ast_msg_queue”, “SIP/1111,60”) in new stack
[Feb 22 23:24:53] ERROR[1006][C-00000001]: translate.c:1393 ast_translator_best_choice: Cannot determine best translation path since one capability supports no formats
[Feb 22 23:24:53] WARNING[1006][C-00000001]: channel.c:6179 request_channel: No translator path exists for channel type SIP (native (amr|amrwb|codec2|g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin|slin|slin|slin|slin|slin|slin|slin|lpc10|g729|speex|speex|speex|ilbc|g722|siren7|siren14|testlaw|g719|opus|silk|silk|silk|silk)) to (nothing)
[Feb 22 23:24:53] WARNING[1006][C-00000001]: app_dial.c:2507 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 58 - Bearer capability not available)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [1111@internal:3] Playback(“Message/ast_msg_queue”, “vm-nobodyavail”) in new stack
[Feb 22 23:24:53] ERROR[1006][C-00000001]: channel.c:5558 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
[Feb 22 23:24:53] WARNING[1006][C-00000001]: file.c:1252 ast_streamfile: Unable to open vm-nobodyavail (format (none)): Function not implemented
[Feb 22 23:24:53] WARNING[1006][C-00000001]: app_playback.c:492 playback_exec: Playback failed on Message/ast_msg_queue for vm-nobodyavail
– Executing [1111@internal:4] VoiceMail(“Message/ast_msg_queue”, “1111@main”) in new stack
[Feb 22 23:24:53] WARNING[1006][C-00000001]: app_voicemail.c:6712 leave_voicemail: No entry in voicemail config file for ‘1111’
– Executing [1111@internal:5] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (internal, 1111, 5) exited non-zero on 'Message/ast_msg_queue

extension.conf

[internal]
exten => 1010,1,Answer()
exten => 1010,2,Dial(SIP/1010,60)
exten => 1010,3,Playback(vm-nobodyavail)
exten => 1010,4,VoiceMail(1010@main)
exten => 1010,5,Hangup()

exten => 1111,1,Answer()
exten => 1111,2,Dial(SIP/1111,60)
exten => 1111,3,Playback(vm-nobodyavail)
exten => 1111,4,VoiceMail(1111@main)
exten => 1111,5,Hangup()

exten => 8001,1,VoicemailMain(1010@main)
exten => 8001,2,Hangup()

exten => 8002,1,VoicemailMain(1111@main)
exten => 8002,2,Hangup()

[msg]

exten => 1010,1,NoOp(SMS receiving dialplan invoked)
exten => 1010,n,NoOp(To {MESSAGE(to)}) exten => 1010,n,NoOp(From {MESSAGE(from)})
exten => 1010,n,NoOp(Body {MESSAGE(body)}) exten => 1010,n,AGI(chatplan.php,{MESSAGE(from)})
exten => 1010,n,Set(ACTUALTO={CUT(MESSAGE(to),@,1)}) exten => 1010,n,ExecIf(["{ACTUALTO}" != “sip:{EXTEN}”]?Set(ACTUALTO=sip:{EXTEN})) exten => 1010,n,MessageSend({ACTUALTOS},{MESSAGE(from)}) exten => 1010,n,NoOp(Send status is {MESSAGE_SEND_STATUS})
exten => 1010,n,GotoIf(["{MESSAGE_SEND_STATUS}" != “SUCCESS”]?sendfailedmsg)
exten => 1010,n,Hangup()
;
; Handle failed messaging
exten => 1010,n(sendfailedmsg),NoOp(Sending error to user)
exten => 1010,n,Set(SRC={MESSAGE(from)}) exten => 1010,n,Set(DST={MESSAGE(to)})
exten => 1010,n,Set(MSG={MESSAGE(body)}) exten => 1010,n,Set(MESSAGE(body)="[{STRFTIME({EPOCH},%d%m%Y-%H:%M:%S)}] Your message to {EXTEN} has failed. Sending when available")
exten => 1010,n,Set(ME_1={CUT(MESSAGE(from),<,2)}) exten => 1010,n,Set(ACTUALFROM={CUT(ME_1,@,1)})
exten => 1010,n,MessageSend({ACTUALFROM},ServiceCenter) exten => 1010,n,GotoIf(["{INQUEUE}" != “1”]?startq) exten => 1010,n,Hangup() ;; exten => 1010,n(startq),NoOp(Queueing messaging for offline) exten => 1010,n,Set(MSGTIME={STRFTIME({EPOCH},%d%m%Y-%H:%M:%S)}) exten => 1010,n,SYSTEM(/var/lib/asterisk/agi-bin/astqueue.sh –SRC ‘{SRC}’ –DST ‘${DST}’ –MSG ‘${MSG}’)
exten => 1010,n,Hangup()[app-fakeanswer]
exten => 1010,n,NoCDR
exten => 1010,n,Set(DESTDEV={EXTEN}) exten => 1010,n,Set(THISDEVSTATE={DEVICE_STATE(SIP/{DESTDEV})}) exten => 1010,n,GotoIf(["{THISDEVSTATE}" = “UNAVAILABLE”]?hang) exten => 1010,n,GotoIf(["${THISDEVSTATE}" = “UNKNOWN”]?hang)
exten => 1010,n,Answer
exten => 1010,n,Hangup()
exten => 1010,n(hang),Hangup()

exten => 1111,1,NoOp(SMS receiving dialplan invoked)
exten => 1111,n,NoOp(To {MESSAGE(to)}) exten => 1111,n,NoOp(From {MESSAGE(from)})
exten => 1111,n,NoOp(Body {MESSAGE(body)}) exten => 1111,n,AGI(chatplan.php,{MESSAGE(from)})
exten => 1111,n,Set(ACTUALTO={CUT(MESSAGE(to),@,1)}) exten => 1111,n,ExecIf(["{ACTUALTO}" != “sip:{EXTEN}”]?Set(ACTUALTO=sip:{EXTEN})) exten => 1111,n,MessageSend({ACTUALTOS},{MESSAGE(from)}) exten => 1111,n,NoOp(Send status is {MESSAGE_SEND_STATUS})
exten => 1111,n,GotoIf(["{MESSAGE_SEND_STATUS}" != “SUCCESS”]?sendfailedmsg)
exten => 1111,n,Hangup()
;
; Handle failed messaging
exten => 1111,n(sendfailedmsg),NoOp(Sending error to user)
exten => 1111,n,Set(SRC={MESSAGE(from)}) exten => 1111,n,Set(DST={MESSAGE(to)})
exten => 1111,n,Set(MSG={MESSAGE(body)}) exten => 1111,n,Set(MESSAGE(body)="[{STRFTIME({EPOCH},%d%m%Y-%H:%M:%S)}] Your message to {EXTEN} has failed. Sending when available")
exten => 1111,n,Set(ME_1={CUT(MESSAGE(from),<,2)}) exten => 1111,n,Set(ACTUALFROM={CUT(ME_1,@,1)})
exten => 1111,n,MessageSend({ACTUALFROM},ServiceCenter) exten => 1111,n,GotoIf(["{INQUEUE}" != “1”]?startq) exten => 1111,n,Hangup() ;; exten => 1111,n(startq),NoOp(Queueing messaging for offline) exten => 1111,n,Set(MSGTIME={STRFTIME({EPOCH},%d%m%Y-%H:%M:%S)}) exten => 1111,n,SYSTEM(/var/lib/asterisk/agi-bin/astqueue.sh –SRC ‘{SRC}’ –DST ‘${DST}’ –MSG ‘${MSG}’)
exten => 1111,n,Hangup()[app-fakeanswer]
exten => 1111,n,NoCDR
exten => 1111,n,Set(DESTDEV={EXTEN}) exten => 1111,n,Set(THISDEVSTATE={DEVICE_STATE(SIP/{DESTDEV})}) exten => 1111,n,GotoIf(["{THISDEVSTATE}" = “UNAVAILABLE”]?hang) exten => 1111,n,GotoIf(["${THISDEVSTATE}" = “UNKNOWN”]?hang)
exten => 1111,n,Answer
exten => 1111,n,Hangup()
exten => 1111,n(hang),Hangup()

sip.conf

general]
context=internal
allowguest=no
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no
disallow=all
allow=alaw
allow=ulaw
allow=gsm

alwaysauthreject=yes
canreinvite=no
nat=yes
session-timers=refuse
localnet=172.18.0.0/255.255.0.0
accept_outofcall_message=yes
outofcall_message_context=msg

[1010]
type=friend
host=dynamic
username=Mike
secret=1001
context=internal

[1111]
type=friend
host=dynamic
username=1111
secret=1111
context=internal

Your out of call message context is being ignored.

There is a missing [ on the general section heading, but I don’t know if that is real or just he result of failing to markup the text as pre-formatted, for the forum.

so is it because of (transfer=udp) not define in the general?

no miss the copy for the [
so its not that

I assume you meant transport. That is the default, and, in any case, the incoming message is being received, and recognized as an out of dialogue message.

I can’t see why it is going to the wrong context.

I could only suggest turning up the debugging, or following the processing path in the source code.

how do i turn up the debugging or follow processing path in source code? please thanks

or is the context for messages have an error ??? just suggesting

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

If you don’t already know the answer, you are unlikely to be able to do this.

going and work on it now. will msg soon as i finish

do i do logger rotate???

logger.conf
[logfiles]
debug_log_msg => notice,warning,error,debug,verbose,dtmf

Connected to Asterisk 16.2.1~dfsg-2ubuntu1 currently running on SIP (pid = 931)
SIPCLI> logger add channel debug_log_msg notice,warning,error,debug,verbose,dtmf
SIP
CLI> core set verbose 5
Console verbose was 3 and is now 5.
SIPCLI> core set debug 5
Core debug was OFF and is now 5.
SIP
CLI> module reload logger
Module ‘logger’ reloaded successfully.
– Reloading module ‘logger’ (Logger)
Asterisk Queue Logger restarted
SIPCLI> pjsip set logger on
PJSIP Logging enabled
SIP
CLI> sip set debug on
SIP Debugging enabled

<— SIP read from UDP:172.18.1.101:38702 —>

<------------->
SIP*CLI> sip set debug
No such command ‘sip set debug’ (type ‘core show help sip set debug’ for other possible commands)

I got trough after some changes here they are.
[internal]

exten => 1010,1,Answer()
exten => 1010,2,Dial(SIP/1010,60)
exten => 1010,3,Playback(vm-nobodyavail)
exten => 1010,4,VoiceMail(1010@main)
exten => 1010,5,Hangup()

exten => 1111,1,Answer()
exten => 1111,2,Dial(SIP/1111,60)
exten => 1111,3,Playback(vm-nobodyavail)
exten => 1111,4,VoiceMail(1111@main)
exten => 1111,5,Hangup()

exten => 8001,1,VoicemailMain(1010@main)
exten => 8001,2,Hangup()

exten => 8002,1,VoicemailMain(1111@main)

[astsms]

exten => _.,1,NoOp(SMS receiving dialplan invoked)
exten => _.,n,NoOp(To {MESSAGE(to)}) exten => _.,n,NoOp(From {MESSAGE(from)})
exten => _.,n,NoOp(Body {MESSAGE(body)}) exten => _.,n,Set(ACTUALTO={CUT(MESSAGE(to),@,1)})
exten => _.,n,MessageSend({ACTUALTO},{MESSAGE(from)})
exten => _.,n,NoOp(Send status is {MESSAGE_SEND_STATUS}) exten => _.,n,GotoIf(["{MESSAGE_SEND_STATUS}" != "SUCCESS"]? sendfailedmsg) exten => _.,n,Hangup() exten => h,1,Hangup() ; ; Handle failed messaging exten => _.,n(sendfailedmsg),Set(MESSAGE(body)="[{STRFTIME({EPOCH},, %d%m%Y-%H:%M:%S)}] Your message to {EXTEN} has failed. Retry later.")
exten => _.,n,Set(ME_1={CUT(MESSAGE(from),<,2)}) exten => _.,n,Set(ACTUALFROM={CUT(ME_1,@,1)})
exten => _.,n,MessageSend(${ACTUALFROM},ServiceCenter)
exten => _.,n,Hangup()
exten => h,1,Hangup()

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