sorry i fix the demo number。
PJSIP:202 send message to PJSIP:101(offline)
when pjsip:202 send fail, the system will send a new message to pjsip:202 in expected. But It not happened
It is work on chan_sip and asterisk 13.
this is log
asterisk -rvvvvvvv
Connected to Asterisk 18.16.0 currently running on freepbx (pid = 2584)
– Executing [101@messages:1] NoOp(“Message/ast_msg_queue”, “SMS receiving dialplan invoked”) in new stack
– Executing [101@messages:2] NoOp(“Message/ast_msg_queue”, “To pjsip:[email protected]”) in new stack
– Executing [101@messages:3] NoOp(“Message/ast_msg_queue”, “From “1” sip:[email protected]”) in new stack
– Executing [101@messages:4] NoOp(“Message/ast_msg_queue”, “Body thisismessage”) in new stack
– Executing [101@messages:5] Set(“Message/ast_msg_queue”, “ACTUALTO=pjsip:101”) in new stack
– Executing [101@messages:6] MessageSend(“Message/ast_msg_queue”, “pjsip:101,“1” sip:[email protected]”) in new stack
[2023-03-07 02:27:44] ERROR[20645]: res_pjsip_messaging.c:1257 msg_send: PJSIP MESSAGE - Could not find endpoint ‘101’ and no default outbound endpoint configured
– Executing [101@messages:7] NoOp(“Message/ast_msg_queue”, “Send status is FAILURE”) in new stack
– Executing [101@messages:8] GotoIf(“Message/ast_msg_queue”, “1?sendfailedmsg”) in new stack
– Goto (messages,101,10)
– Executing [101@messages:10] Set(“Message/ast_msg_queue”, “MESSAGE(body)=”[07032023-02:27:44] Your message to 101 has failed. Retry later.“”) in new stack
– Executing [101@messages:11] Set(“Message/ast_msg_queue”, “ME_1=sip:[email protected]>”) in new stack
– Executing [101@messages:12] Set(“Message/ast_msg_queue”, “ACTUALFROM=sip:202”) in new stack
– Executing [101@messages:13] MessageSend(“Message/ast_msg_queue”, “sip:202,ServiceCenter”) in new stack
[2023-03-07 02:27:44] WARNING[2604][C-00000011]: message.c:1290 msg_send_exec: No message technology ‘sip’ found.
– Executing [101@messages:14] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (messages, 101, 14) exited non-zero on ‘Message/ast_msg_queue’
asterisk -r
Connected to Asterisk 18.16.0 currently running on freepbx (pid = 2584)
[2023-03-07 01:24:14] WARNING[14606]: res_pjsip_messaging.c:327 handle_single_token: Dest: ‘101’ MSG SEND FAIL: Found endpoint ‘101’ but didn’t find an aor/contact for it
[2023-03-07 01:24:14] ERROR[14606]: res_pjsip_messaging.c:1257 msg_send: PJSIP MESSAGE - Could not find endpoint ‘101’ and no default outbound endpoint configured
[2023-03-07 01:24:14] WARNING[2604][C-00000011]: message.c:1290 msg_send_exec: No message technology ‘sip’ found.
perhaps there are some error in here.
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)})