(trying to resurrect an old messaging config, that used to work without issues?)
Fighting with following error on MessageSend dialplan app in endpoints with message_context enabled
WARNING[1436]: res_pjsip.c:3338 ast_sip_update_to_uri: To address '7006@asterisk20.misc' is not a valid SIP/SIPS URI
But messages are delivered without issues!!! (just with error in console and log)
And error only appears when using MessageSend trough message_context in endpoint.
If using MessageSend trough normal context there is no errors!!! (log bellow)
On asterisk 16.28.0~dfsg-0+deb11u4 from deb package.
And on asterisk 20.15.1 compiled without modifications.
Using basic-pbx configs to start, and adding/removing modules/configs to a bare minimum/needed.
to start and run without warning/errors, and satisfy required functionality.
Went trough too many permutations of proper URI format for MessageSend and am stuck!!!
(minimal configs for testing the messaging errors)
pjsip.conf:
[global]
user_agent=Astersik-pavilion1-agent
[transport-udp]
type=transport
protocol=udp
bind=192.168.30.101:5060
local_net=192.168.30.0/24
allow_reload=yes
[general]
; =============================== phones ==============================
; +++++++++++++++++++++++ template wifi softphones +++++++++++++++++++++++
[endpoint_wifi](!)
type=endpoint
transport=transport-udp
disallow=all
allow=ulaw
allow=h263 ; video
allow=h264 ; video
direct_media=no
device_state_busy_at=1
[auth_wifi](!)
type=auth
auth_type=userpass
[aor_wifi](!)
type=aor
max_contacts=1
remove_existing=yes ; removes stale registrations
minimum_expiration=1800
default_expiration=3600
maximum_expiration=7200
; ---------------------------------------------------------
[7004](endpoint_wifi)
auth=7004
aors=7004
context=internal
message_context=astsms
callerid=samsung-s4 <7004>
[7004](auth_wifi)
password=1234
username=7004
[7004](aor_wifi)
; ---------------------------------------------------------
[7006](endpoint_wifi)
auth=7006
aors=7006
context=internal
message_context=astsms
callerid=razr-m <7006>
[7006](auth_wifi)
password=1234
username=7006
[7006](aor_wifi)
extensions.conf:
[globals]
[general]
static=yes
writeprotect=yes
autofallthrough=yes
clearglobalvars=no
;userscontext=default
[internal]
exten => _700X,1,NoOp([internal] dialplan invoked)
same => n,Verbose(3, NOTICE, Call from ${CALLERID(all)} to ${EXTEN} )s
same => n,Dial(PJSIP/${EXTEN},30)
same => n,Hangup()
exten => 9999,1,NoOp([internal] message test invoked)
same => n,Set(MESSAGE(body)='test test test')
same => n,MessageSend(pjsip:7006,7004)
same => n,Hangup()
[astsms]
exten => _700X,1,NoOp([astsms] SMS dialplan invoked)
same => n,Verbose(3, NOTICE, Message from ${MESSAGE(From)} to ${MESSAGE(To)})
same => n,NoOp(To ${MESSAGE(to)})
same => n,NoOp(From ${MESSAGE(from)})
same => n,NoOp(Body ${MESSAGE(body)})
same => n,Set(ACTUALTO=${CUT(CUT(MESSAGE(to),@,1),:,2)})
same => n,Set(ACTUALFROM=${CUT(CUT(MESSAGE(from),@,1),:,2)})
;same => n,MessageSend(pjsip:7006,7004)
same => n,MessageSend(pjsip:${ACTUALTO},${ACTUALFROM})
;same => n,MessageSend(pjsip:sip:${ACTUALTO},${ACTUALFROM})
;same => n,MessageSend(pjsip:sip:${ACTUALTO}@asterisk20.misc,${ACTUALFROM})
;same => n,MessageSend(pjsip:sip:7006@asterisk20.misc,${ACTUALFROM})
same => n,Hangup()
console log:
-- Executing [7006@astsms:1] NoOp("Message/ast_msg_queue", "[astsms] SMS dialplan invoked") in new stack
-- Executing [7006@astsms:2] Verbose("Message/ast_msg_queue", "3, NOTICE, Message from <sip:7004@asterisk20.misc> to pjsip:7006@asterisk20.misc") in new stack
-- NOTICE, Message from <sip:7004@asterisk20.misc> to pjsip:7006@asterisk20.misc
-- Executing [7006@astsms:3] NoOp("Message/ast_msg_queue", "To pjsip:7006@asterisk20.misc") in new stack
-- Executing [7006@astsms:4] NoOp("Message/ast_msg_queue", "From <sip:7004@asterisk20.misc>") in new stack
-- Executing [7006@astsms:5] NoOp("Message/ast_msg_queue", "Body Test") in new stack
-- Executing [7006@astsms:6] Set("Message/ast_msg_queue", "ACTUALTO=7006") in new stack
-- Executing [7006@astsms:7] Set("Message/ast_msg_queue", "ACTUALFROM=7004") in new stack
-- Executing [7006@astsms:8] MessageSend("Message/ast_msg_queue", "pjsip:7006,7004") in new stack
[Aug 9 12:48:09] WARNING[1476]: res_pjsip.c:3338 ast_sip_update_to_uri: To address '7006@asterisk20.misc' is not a valid SIP/SIPS URI
-- Executing [7006@astsms:9] Hangup("Message/ast_msg_queue", "") in new stack
== Spawn extension (astsms, 7006, 9) exited non-zero on 'Message/ast_msg_queue'
-- Executing [9999@internal:1] NoOp("PJSIP/7004-00000001", "[internal] message test invoked") in new stack
-- Executing [9999@internal:2] Set("PJSIP/7004-00000001", "MESSAGE(body)='test test test'") in new stack
-- Executing [9999@internal:3] MessageSend("PJSIP/7004-00000001", "pjsip:7006,7004") in new stack
-- Executing [9999@internal:4] Hangup("PJSIP/7004-00000001", "") in new stack
== Spawn extension (internal, 9999, 4) exited non-zero on 'PJSIP/7004-00000001'
Thanx