SIP Simple massage error

Dear all

I’m not expert and I need some helps:

I configured a working freePBX instance using SANGOMA distribution for my home (NOT OFFICE… home :slight_smile: ).
Inbound, outbound and IVR is working fine, but I need your help for SIP messages.

I explain my situation
DNS CNAME record registered sip.mydomain.it that redirect to a dynamic DNS mydynamycdns.ddns.net ( I have no fixed IP)

I enabled sip messages for my 4 digit extension using the following script in extensions_custom.conf


[myMessages] ; myMessages is the name of the dialplan and can be changed to whatever you want ( also change in extensions )
exten => _.,1,NoOp(mymessage 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(mymessage Send status is ${MESSAGE_SEND_STATUS})
exten => _.,n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?sendfailedmsg)
exten => _.,n,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) ; ServiceCenter is just a name for the sender of the message
exten => _.,n,Hangup()
exten => _.,n,Hangup() 

in Extension–>Advanced I set message context to myMessages

The result is that when I send a message from extension 1001 to extension 1002 it is delivered correctly, when extension 1002 reply, often it doesn’t arrive (rarely yes and I don’t know why)

this is the log, in this case 1001 sent a message to 1002, it was received by 1002;
1002 reply to 1001 but 1001 doesn’t receive it:

10254	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:1] NoOp("Message/ast_msg_queue", "mymessage receiving dialplan invoked") in new stack	
10255	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:2] NoOp("Message/ast_msg_queue", "To pjsip:[email protected]") in new stack	
10256	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:3] NoOp("Message/ast_msg_queue", "From <sip:[email protected]>") in new stack	
10257	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:4] NoOp("Message/ast_msg_queue", "Body tyu") in new stack	
10258	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:5] Set("Message/ast_msg_queue", "ACTUALTO=pjsip:1002") in new stack	
10259	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:6] MessageSend("Message/ast_msg_queue", "pjsip:1002,<sip:[email protected]>") in new stack	
10260	[2024-03-12 08:29:44] WARNING[13307] res_pjsip_messaging.c: To address '[email protected]' is not a valid SIP/SIPS URI	
10261	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:7] NoOp("Message/ast_msg_queue", "mymessage Send status is SUCCESS") in new stack	
10262	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:8] GotoIf("Message/ast_msg_queue", "0?sendfailedmsg") in new stack	
10263	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Executing [1002@myMessages:9] Hangup("Message/ast_msg_queue", "") in new stack	
10264	[2024-03-12 08:29:44] VERBOSE[2404][C-00000001] pbx.c: Spawn extension (myMessages, 1002, 9) exited non-zero on 'Message/ast_msg_queue'	
10265	[2024-03-12 08:29:50] VERBOSE[16476] res_pjsip_registrar.c: Added contact 'sip:[email protected]:55099;rinstance=1FB1CA5F;x-ast-orig-host=10.51.182.176:2839' to AOR '1002' with expiration of 600 seconds	
10266	[2024-03-12 08:29:50] VERBOSE[8223] res_pjsip/pjsip_options.c: Contact 1002/sip:[email protected]:55099;rinstance=1FB1CA5F;x-ast-orig-host=10.51.182.176:2839 is now Reachable. RTT: 38.994 msec	
10267	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:1] NoOp("Message/ast_msg_queue", "mymessage receiving dialplan invoked") in new stack	
10268	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:2] NoOp("Message/ast_msg_queue", "To pjsip:[email protected]") in new stack	
10269	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:3] NoOp("Message/ast_msg_queue", "From <sip:[email protected]>") in new stack	
10270	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:4] NoOp("Message/ast_msg_queue", "Body uyt") in new stack	
10271	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:5] Set("Message/ast_msg_queue", "ACTUALTO=pjsip:1001") in new stack	
10272	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:6] MessageSend("Message/ast_msg_queue", "pjsip:1001,<sip:[email protected]>") in new stack	
10273	[2024-03-12 08:29:59] WARNING[13307] res_pjsip_messaging.c: To address '[email protected]' is not a valid SIP/SIPS URI	
10274	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:7] NoOp("Message/ast_msg_queue", "mymessage Send status is SUCCESS") in new stack	
10275	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:8] GotoIf("Message/ast_msg_queue", "0?sendfailedmsg") in new stack	
10276	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Executing [1001@myMessages:9] Hangup("Message/ast_msg_queue", "") in new stack	
10277	[2024-03-12 08:29:59] VERBOSE[2404][C-00000001] pbx.c: Spawn extension (myMessages, 1001, 9) exited non-zero on 'Message/ast_msg_queue'	

furthermore I have two clients installed on my phone (to test them and choose the best one for my purposes) Zopier pro and GroundWire, but when messages were recieved, sometimes go to GroundWire, sometimes to Zopier…there is the possibility to set that messages are delivered to all clients configured for the extensions?

thanks in advance for your help

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