SMS can't be sent

Hello All,

I configured this “[from-internal-xfer]
; Deliver to local 4-digit extension
exten =>
_XXXX,1,Set(FROMUSER=${CUT(MESSAGE(from),<,2)})
same => n,Set(FROMUSER=${CUT(FROMUSER,@,1)})
same => n,Set(FROMUSER=${CUT(FROMUSER,:,2)})
same => n,Set(TODEVICE=${DB(DEVICE/${EXTEN}/dial)})
same => n,Set(TODEVICE=${TOLOWER(${STRREPLACE(TODEVICE,”/“,”:“)})})
same => n,MessageSend(${TODEVICE},${FROMUSER})” in the extensions_custom.conf file, in extension 0001, I modified the message-context field to be “from-internal-xfer”, but I find an issue when trying to send a message from extension 0001 to a mobile number, message is being sent from the extension to freepbx without any issue, but the problem is that when freepbx sends the SIP message to SIPStation, it sends it as INVITE (Voice call) not as MESSAGE (Text message) which I don’t understand why, logs are below, am I doing something wrong in the configuration or what ?, the setup is that I have freepbx integrated with sipstation and I am trying to send a message from extension on freepbx but there is an issue as per the logs, so I want to know how to solve this problem in details please.

Logs:

<— Received SIP request (712 bytes) from UDP:192.168.1.121:60167 —>
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.121:60167;rport;branch=z9hG4bKPjad6be1052f78453ea9da76ef27887283
Max-Forwards: 70
From: sip:[email protected];tag=942dce0833b443b5966dd32debac4513
To: sip:[email protected]
Call-ID: 0a16148f08b04b49aaf0afa1be02a95b
CSeq: 19541 MESSAGE
User-Agent: MicroSIP/3.21.6
Authorization: Digest username=“0001”, realm=“asterisk”, nonce=“1751842572/d9850af42887071e729956e841bd7b22”, uri="sip:[email protected]", response=“e1de052d6bdfd105e01ab1532f3f13ef”, algorithm=MD5, cnonce=“4ad942fa475e483aa17bc16253a005a0”, opaque=“6de6a65a589eb5b9”, qop=auth, nc=00000001
Content-Type: text/plain
Content-Length: 4

test
<— Transmitting SIP response (415 bytes) to UDP:192.168.1.121:60167 —>
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 192.168.1.121:60167;rport=60167;received=192.168.1.121;branch=z9hG4bKPjad6be1052f78453ea9da76ef27887283
Call-ID: 0a16148f08b04b49aaf0afa1be02a95b
From: sip:[email protected];tag=942dce0833b443b5966dd32debac4513
To: sip:[email protected];tag=z9hG4bKPjad6be1052f78453ea9da76ef27887283
CSeq: 19541 MESSAGE
Server: FPBX-16.0.40.13(20.4.0)
Content-Length: 0

-- Executing [19492392227@from-internal-xfer:1] Macro("Message/ast_msg_queue", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("Message/ast_msg_queue", "TOUCH_MONITOR=1751828334.1056") in new stack
-- Executing [s@macro-user-callerid:2] Set("Message/ast_msg_queue", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:3] Set("Message/ast_msg_queue", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:4] Set("Message/ast_msg_queue", "CHANEXTENCONTEXT=ast_msg_queue") in new stack
-- Executing [s@macro-user-callerid:5] Set("Message/ast_msg_queue", "CHANEXTEN=ast_msg_queue") in new stack
-- Executing [s@macro-user-callerid:6] Set("Message/ast_msg_queue", "CALLERID(number)=9492336500") in new stack
-- Executing [s@macro-user-callerid:7] Set("Message/ast_msg_queue", "AMPUSER=9492336500") in new stack
-- Executing [s@macro-user-callerid:8] Set("Message/ast_msg_queue", "HOTDESCKCHAN=ast_msg_queue") in new stack
-- Executing [s@macro-user-callerid:9] Set("Message/ast_msg_queue", "HOTDESKEXTEN=ast_msg_queue") in new stack
-- Executing [s@macro-user-callerid:10] Set("Message/ast_msg_queue", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:11] ExecIf("Message/ast_msg_queue", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:12] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("Message/ast_msg_queue", "0?report") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("Message/ast_msg_queue", "1?Set(REALCALLERIDNUM=9492336500)") in new stack
-- Executing [s@macro-user-callerid:15] Set("Message/ast_msg_queue", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:16] GotoIf("Message/ast_msg_queue", "0?limit") in new stack
-- Executing [s@macro-user-callerid:17] Set("Message/ast_msg_queue", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:18] ExecIf("Message/ast_msg_queue", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("Message/ast_msg_queue", "1?report") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s@macro-user-callerid:28] NoOp("Message/ast_msg_queue", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:29] GotoIf("Message/ast_msg_queue", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,30)
-- Executing [s@macro-user-callerid:30] GotoIf("Message/ast_msg_queue", "1?continue") in new stack
-- Goto (macro-user-callerid,s,49)
-- Executing [s@macro-user-callerid:49] Set("Message/ast_msg_queue", "CALLERID(number)=9492336500") in new stack
-- Executing [s@macro-user-callerid:50] Set("Message/ast_msg_queue", "CALLERID(name)=") in new stack
-- Executing [s@macro-user-callerid:51] GotoIf("Message/ast_msg_queue", "1?cnum") in new stack
-- Goto (macro-user-callerid,s,57)
-- Executing [s@macro-user-callerid:57] Set("Message/ast_msg_queue", "CDR(cnum)=9492336500") in new stack
-- Executing [s@macro-user-callerid:58] Set("Message/ast_msg_queue", "CHANNEL(language)=en") in new stack
-- Executing [19492392227@from-internal-xfer:2] Gosub("Message/ast_msg_queue", "sub-record-check,s,1(out,19492392227,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("Message/ast_msg_queue", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("Message/ast_msg_queue", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("Message/ast_msg_queue", "NOW=1751842572") in new stack
-- Executing [s@sub-record-check:4] Set("Message/ast_msg_queue", "__DAY=06") in new stack
-- Executing [s@sub-record-check:5] Set("Message/ast_msg_queue", "__MONTH=07") in new stack
-- Executing [s@sub-record-check:6] Set("Message/ast_msg_queue", "__YEAR=2025") in new stack
-- Executing [s@sub-record-check:7] Set("Message/ast_msg_queue", "__TIMESTR=20250706-225612") in new stack
-- Executing [s@sub-record-check:8] Set("Message/ast_msg_queue", "__FROMEXTEN=9492336500") in new stack
-- Executing [s@sub-record-check:9] Set("Message/ast_msg_queue", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("Message/ast_msg_queue", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("Message/ast_msg_queue", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("Message/ast_msg_queue", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("Message/ast_msg_queue", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("Message/ast_msg_queue", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("Message/ast_msg_queue", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] NoOp("Message/ast_msg_queue", "Outbound Recording Check from 9492336500 to 19492392227") in new stack
-- Executing [out@sub-record-check:2] Set("Message/ast_msg_queue", "RECMODE=") in new stack
-- Executing [out@sub-record-check:3] ExecIf("Message/ast_msg_queue", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)
-- Executing [out@sub-record-check:7] Gosub("Message/ast_msg_queue", "recordcheck,1(dontcare,out,19492392227)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("Message/ast_msg_queue", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("Message/ast_msg_queue", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("Message/ast_msg_queue", "") in new stack
-- Executing [out@sub-record-check:8] Return("Message/ast_msg_queue", "") in new stack
-- Executing [19492392227@from-internal-xfer:3] ExecIf("Message/ast_msg_queue", "0 ?Set(CDR(accountcode)=)") in new stack
-- Executing [19492392227@from-internal-xfer:4] Set("Message/ast_msg_queue", "_ROUTEID=3") in new stack
-- Executing [19492392227@from-internal-xfer:5] Set("Message/ast_msg_queue", "_ROUTENAME=SIPStation-Out") in new stack
-- Executing [19492392227@from-internal-xfer:6] Set("Message/ast_msg_queue", "MOHCLASS=default") in new stack
-- Executing [19492392227@from-internal-xfer:7] Set("Message/ast_msg_queue", "_CALLERIDNAMEINTERNAL=") in new stack
-- Executing [19492392227@from-internal-xfer:8] Set("Message/ast_msg_queue", "_CALLERIDNUMINTERNAL=9492336500") in new stack
-- Executing [19492392227@from-internal-xfer:9] Set("Message/ast_msg_queue", "_EMAILNOTIFICATION=FALSE") in new stack
-- Executing [19492392227@from-internal-xfer:10] Set("Message/ast_msg_queue", "_NODEST=") in new stack
-- Executing [19492392227@from-internal-xfer:11] Macro("Message/ast_msg_queue", "dialout-trunk,1,19492392227,,off") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("Message/ast_msg_queue", "DIAL_TRUNK=1") in new stack
-- Executing [s@macro-dialout-trunk:2] ExecIf("Message/ast_msg_queue", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
-- Executing [s@macro-dialout-trunk:3] ExecIf("Message/ast_msg_queue", "0?Set(DIAL_OPTIONS=HhTr)") in new stack
-- Executing [s@macro-dialout-trunk:4] ExecIf("Message/ast_msg_queue", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
-- Executing [s@macro-dialout-trunk:5] GosubIf("Message/ast_msg_queue", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:6] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(num)=)") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("Message/ast_msg_queue", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:8] Set("Message/ast_msg_queue", "DIAL_NUMBER=19492392227") in new stack
-- Executing [s@macro-dialout-trunk:9] Set("Message/ast_msg_queue", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("Message/ast_msg_queue", "OUTBOUND_GROUP=OUT_1") in new stack
-- Executing [s@macro-dialout-trunk:11] Set("Message/ast_msg_queue", "DIAL_TRUNK_OPTIONS=T") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("Message/ast_msg_queue", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
-- Executing [s@macro-dialout-trunk:13] GotoIf("Message/ast_msg_queue", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,15)
-- Executing [s@macro-dialout-trunk:15] GotoIf("Message/ast_msg_queue", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("Message/ast_msg_queue", "outbound-callerid,1") in new stack
-- Executing [s@macro-outbound-callerid:1] NoOp("Message/ast_msg_queue", "9492336500") in new stack
-- Executing [s@macro-outbound-callerid:2] NoOp("Message/ast_msg_queue", "") in new stack
-- Executing [s@macro-outbound-callerid:3] NoOp("Message/ast_msg_queue", "off") in new stack
-- Executing [s@macro-outbound-callerid:4] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(name-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:5] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(num-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:6] Set("Message/ast_msg_queue", "HOTDESCKCHAN=ast_msg_queue") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("Message/ast_msg_queue", "HOTDESKEXTEN=ast_msg_queue") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("Message/ast_msg_queue", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-outbound-callerid:9] ExecIf("Message/ast_msg_queue", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-outbound-callerid:10] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-outbound-callerid:11] Set("Message/ast_msg_queue", "ALLOWTHISROUTE=NO") in new stack
-- Executing [s@macro-outbound-callerid:12] ExecIf("Message/ast_msg_queue", "0?Set(ALLOWTHISROUTE=YES)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("Message/ast_msg_queue", "0?Hangup()") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("Message/ast_msg_queue", "0?Set(REALCALLERIDNUM=9492336500)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("Message/ast_msg_queue", "0?Set(AMPUSER=9492336500)") in new stack
-- Executing [s@macro-outbound-callerid:16] GotoIf("Message/ast_msg_queue", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,20)
-- Executing [s@macro-outbound-callerid:20] Set("Message/ast_msg_queue", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:21] Set("Message/ast_msg_queue", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:22] ExecIf("Message/ast_msg_queue", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [s@macro-outbound-callerid:23] Set("Message/ast_msg_queue", "TRUNKOUTCID=9492336500") in new stack
-- Executing [s@macro-outbound-callerid:24] GotoIf("Message/ast_msg_queue", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,30)
-- Executing [s@macro-outbound-callerid:30] ExecIf("Message/ast_msg_queue", "1?Set(CALLERID(all)=9492336500)") in new stack
-- Executing [s@macro-outbound-callerid:31] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:32] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:33] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(all)=9492336500)") in new stack
-- Executing [s@macro-outbound-callerid:34] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(all)=9492336500)") in new stack
-- Executing [s@macro-outbound-callerid:35] Set("Message/ast_msg_queue", "TIOHIDE=no") in new stack
-- Executing [s@macro-outbound-callerid:36] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:37] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:38] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:39] ExecIf("Message/ast_msg_queue", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:40] Set("Message/ast_msg_queue", "CDR(outbound_cnum)=9492336500") in new stack
-- Executing [s@macro-outbound-callerid:41] Set("Message/ast_msg_queue", "CDR(outbound_cnam)=") in new stack
-- Executing [s@macro-dialout-trunk:17] GosubIf("Message/ast_msg_queue", "0?sub-flp-1,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:18] Set("Message/ast_msg_queue", "OUTNUM=19492392227") in new stack
-- Executing [s@macro-dialout-trunk:19] Set("Message/ast_msg_queue", "custom=PJSIP") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("Message/ast_msg_queue", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
-- Executing [s@macro-dialout-trunk:21] ExecIf("Message/ast_msg_queue", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:22] ExecIf("Message/ast_msg_queue", "0?AGI(allowlist-autoadd.agi,)") in new stack
-- Executing [s@macro-dialout-trunk:23] Macro("Message/ast_msg_queue", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("Message/ast_msg_queue", "") in new stack
-- Executing [s@macro-dialout-trunk:24] GotoIf("Message/ast_msg_queue", "0?skipcrm") in new stack
-- Executing [s@macro-dialout-trunk:25] Set("Message/ast_msg_queue", "__CRM_DIRECTION=OUTBOUND") in new stack
-- Executing [s@macro-dialout-trunk:26] Set("Message/ast_msg_queue", "__CRM_DESTINATION=19492392227") in new stack
-- Executing [s@macro-dialout-trunk:27] Set("Message/ast_msg_queue", "__CRM_SOURCE=") in new stack
-- Executing [s@macro-dialout-trunk:28] AGI("Message/ast_msg_queue", "agi://127.0.0.1/sangomacrm.agi") in new stack
-- <Message/ast_msg_queue>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
-- Executing [s@macro-dialout-trunk:29] Set("Message/ast_msg_queue", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
-- Executing [s@macro-dialout-trunk:30] NoOp("Message/ast_msg_queue", "CRM Finished") in new stack
-- Executing [s@macro-dialout-trunk:31] GotoIf("Message/ast_msg_queue", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:32] ExecIf("Message/ast_msg_queue", "0?Set(CONNECTEDLINE(num,i)=19492392227)") in new stack
-- Executing [s@macro-dialout-trunk:33] ExecIf("Message/ast_msg_queue", "0?Set(CONNECTEDLINE(name,i)=CID:9492336500)") in new stack
-- Executing [s@macro-dialout-trunk:34] ExecIf("Message/ast_msg_queue", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)9492336500)") in new stack
-- Executing [s@macro-dialout-trunk:35] GotoIf("Message/ast_msg_queue", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:36] ExecIf("Message/ast_msg_queue", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
-- Executing [s@macro-dialout-trunk:37] Set("Message/ast_msg_queue", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
-- Executing [s@macro-dialout-trunk:38] Dial("Message/ast_msg_queue", "PJSIP/19492392227@fpbx-1-J4p0Kx9nIUEE,300,Tb(func-apply-sipheaders^s^1,(1))") in new stack
-- PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c Internal Gosub(func-apply-sipheaders,s,1(1)) start
-- Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
-- Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "Applying SIP Headers to channel PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c") in new stack
-- Executing [s@func-apply-sipheaders:3] Set("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "localchan=fpbx-1-J4p0Kx9nIUEE-0000040c") in new stack
-- Executing [s@func-apply-sipheaders:4] Set("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "DialMCEXT=fpbx") in new stack
-- Executing [s@func-apply-sipheaders:5] Set("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "CHANNEL(hangup_handler_push)=app-missedcall-hangup,fpbx,1") in new stack
-- Executing [s@func-apply-sipheaders:6] Set("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "TECH=PJSIP") in new stack
-- Executing [s@func-apply-sipheaders:7] Set("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "SIPHEADERKEYS=Alert-Info") in new stack
-- Executing [s@func-apply-sipheaders:8] While("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "1") in new stack
-- Executing [s@func-apply-sipheaders:9] Set("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "sipheader=unset") in new stack
-- Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack

[2025-07-06 22:56:12] ERROR[14251]: res_pjsip_header_funcs.c:717 remove_header: No headers had been previously added to this session.
– Executing [s@func-apply-sipheaders:11] ExecIf(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “0?Set(sipheader=http://127.0.0.1;info=unset)”) in new stack
– Executing [s@func-apply-sipheaders:12] ExecIf(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “0?Set(sipheader=http://127.0.0.1unset)”) in new stack
– Executing [s@func-apply-sipheaders:13] ExecIf(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “0?Set(PJSIP_HEADER(add,Alert-Info)=unset)”) in new stack
– Executing [s@func-apply-sipheaders:14] EndWhile(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “”) in new stack
– Executing [s@func-apply-sipheaders:8] While(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “0”) in new stack
– Executing [s@func-apply-sipheaders:15] Return(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “”) in new stack
== Spawn extension (func-apply-sipheaders, s, 15) exited non-zero on ‘PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c’
– PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
– Called PJSIP/19492392227@fpbx-1-J4p0Kx9nIUEE
[2025-07-06 22:56:12] ERROR[2149][C-0000014a]: translate.c:1402 ast_translator_best_choice: Cannot determine best translation path since one capability supports no formats
[2025-07-06 22:56:12] WARNING[2149][C-0000014a]: channel.c:6756 ast_channel_make_compatible_helper: No path to translate from PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c to Message/ast_msg_queue
– PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c Internal Gosub(app-missedcall-hangup,fpbx,1) start
– Executing [fpbx@app-missedcall-hangup:1] NoOp(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “Dialed: fpbx”) in new stack
– Executing [fpbx@app-missedcall-hangup:2] NoOp(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, "Caller: ") in new stack
– Executing [fpbx@app-missedcall-hangup:3] GotoIf(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “0?exit”) in new stack
– Executing [fpbx@app-missedcall-hangup:4] Set(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “EXTENNUM=fpbx”) in new stack
– Executing [fpbx@app-missedcall-hangup:5] Set(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “FEXTENNUM=fpbx”) in new stack
– Executing [fpbx@app-missedcall-hangup:6] GotoIf(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “0?exit”) in new stack
– Executing [fpbx@app-missedcall-hangup:7] AGI(“PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c”, “agi://127.0.0.1/missedcallnotify.php,fpbx,fpbx,0,PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c,”) in new stack
<— Transmitting SIP request (1080 bytes) to UDP:192.159.66.3:5060 —>
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 97.190.124.236:5060;rport;branch=z9hG4bKPjd6fd8906-1443-48f3-91f2-7d6109397553
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29353 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: sip:[email protected]
Remote-Party-ID: sip:[email protected];party=calling;privacy=off;screen=no
Max-Forwards: 70
User-Agent: FPBX-16.0.40.13(20.4.0)
Content-Type: application/sdp
Content-Length: 241

v=0
o=- 1138116538 1138116538 IN IP4 97.190.124.236
s=Asterisk
c=IN IP4 97.190.124.236
t=0 0
m=audio 17206 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP response (362 bytes) from UDP:192.159.66.3:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 97.190.124.236:5060;rport=5060;branch=z9hG4bKPjd6fd8906-1443-48f3-91f2-7d6109397553
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected]
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29353 INVITE
User-Agent: SIPStation 2.11.3
Content-Length: 0

<— Received SIP response (725 bytes) from UDP:192.159.66.3:5060 —>
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 97.190.124.236:5060;rport=5060;branch=z9hG4bKPjd6fd8906-1443-48f3-91f2-7d6109397553
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected];tag=U3Bc3c0aXNjZc
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29353 INVITE
User-Agent: SIPStation 2.11.3
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Proxy-Authenticate: Digest realm=“trunk1.freepbx.com”, nonce=“69d15764-5abc-11f0-bb09-a33463433bb9”, algorithm=MD5, qop=“auth”
Content-Length: 0

<— Transmitting SIP request (430 bytes) to UDP:192.159.66.3:5060 —>
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 97.190.124.236:5060;rport;branch=z9hG4bKPjd6fd8906-1443-48f3-91f2-7d6109397553
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected];tag=U3Bc3c0aXNjZc
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29353 ACK
Max-Forwards: 70
User-Agent: FPBX-16.0.40.13(20.4.0)
Content-Length: 0

<— Transmitting SIP request (1380 bytes) to UDP:192.159.66.3:5060 —>
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 97.190.124.236:5060;rport;branch=z9hG4bKPj458e4568-0ebf-49ae-8b3e-aff538d599f5
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29354 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-16.0.40.13(20.4.0)
Proxy-Authorization: Digest username=“J4p0Kx9nIUEE”, realm=“trunk1.freepbx.com”, nonce=“69d15764-5abc-11f0-bb09-a33463433bb9”, uri=“sip:[email protected]:5060”, response=“4da010ec71245870d00b048cb3b4b547”, algorithm=MD5, cnonce=“76f8345a419942e7bf736132aa870ffd”, qop=auth, nc=00000001
P-Asserted-Identity: sip:[email protected]
Remote-Party-ID: sip:[email protected];party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 241

v=0
o=- 1138116538 1138116538 IN IP4 97.190.124.236
s=Asterisk
c=IN IP4 97.190.124.236
t=0 0
m=audio 17206 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP response (362 bytes) from UDP:192.159.66.3:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 97.190.124.236:5060;rport=5060;branch=z9hG4bKPj458e4568-0ebf-49ae-8b3e-aff538d599f5
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected]
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29354 INVITE
User-Agent: SIPStation 2.11.3
Content-Length: 0

-- <PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c>AGI Script agi://127.0.0.1/missedcallnotify.php completed, returning 0
-- Executing [fpbx@app-missedcall-hangup:8] Return("PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c", "") in new stack

== Spawn extension (app-missedcall-hangup, fpbx, 8) exited non-zero on ‘PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c’
– PJSIP/fpbx-1-J4p0Kx9nIUEE-0000040c Internal Gosub(app-missedcall-hangup,fpbx,1) complete GOSUB_RETVAL=
== Spawn extension (macro-dialout-trunk, s, 38) exited non-zero on ‘Message/ast_msg_queue’ in macro ‘dialout-trunk’
== Spawn extension (from-internal-xfer, 19492392227, 11) exited non-zero on ‘Message/ast_msg_queue’
<— Transmitting SIP request (441 bytes) to UDP:192.159.66.3:5060 —>
CANCEL sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 97.190.124.236:5060;rport;branch=z9hG4bKPj458e4568-0ebf-49ae-8b3e-aff538d599f5
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected]
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29354 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: FPBX-16.0.40.13(20.4.0)
Content-Length: 0

<— Received SIP response (345 bytes) from UDP:192.159.66.3:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 97.190.124.236:5060;rport=5060;branch=z9hG4bKPj458e4568-0ebf-49ae-8b3e-aff538d599f5
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected];tag=91D7U7Bvmja5e
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29354 CANCEL
Content-Length: 0

<— Received SIP response (586 bytes) from UDP:192.159.66.3:5060 —>
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 97.190.124.236:5060;rport=5060;branch=z9hG4bKPj458e4568-0ebf-49ae-8b3e-aff538d599f5
From: sip:[email protected];tag=19e37f20-b1eb-4432-809b-71f75f2aa1c5
To: sip:[email protected];tag=91D7U7Bvmja5e
Call-ID: 3bb21d90-5e38-4a53-8dad-1b0e014eccbf
CSeq: 29354 INVITE
User-Agent: SIPStation 2.11.3
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Length: 0

Hello All,

 Any updates ?

You shouldn’t be using [from-internal-xfer] because it already exists and it loaded before yours making yours unusable. What you are seeing is your message from the device being accepted in this context below and not yours in extensions_custom.conf.

[from-internal-xfer]
include => from-internal-custom
include => from-internal-additional ; auto-generated
exten => h,1,Gosub(macro-hangupcall,s,1)

Hello Tom,

 Thanks for your reply, ok I removed what was added in the extensions_custom.conf file, so what should be done exactly to let the messages work without issues, when I send a message from extension 0001 to a mobile number, the message is not sent and I see these two lines in the freepbx logs, so please tell me what should be done to solve this issue. 

[2025-07-07 18:45:20] ERROR[2149][C-0000014a]: translate.c:1402 ast_translator_best_choice: Cannot determine best translation path since one capability supports no formats
[2025-07-07 18:45:20] WARNING[2149][C-0000014a]: channel.c:6756 ast_channel_make_compatible_helper: No path to translate from PJSIP/fpbx-1-J4p0Kx9nIUEE-0000044c to Message/ast_msg_queue

I said you shouldn’t use [from-internal-xfer] as the context for messaging because it collides with an existing one. You need to change your context name to something unique and update the endpoint to use that instead of [from-internal-xfer]. So something like [from-internal-message]

Hello Tom,

 Kindly note that I changed the configuration in extensions_custom.conf to be "[from-internal-message]

; Deliver to local 4-digit extension
exten => _XXXX,1,Set(FROMUSER=${CUT(MESSAGE(from),<,2)})
same => n,Set(FROMUSER=${CUT(FROMUSER,@,1)})
same => n,Set(FROMUSER=${CUT(FROMUSER,:,2)})
same => n,Set(TODEVICE=${DB(DEVICE/${EXTEN}/dial)})
same => n,Set(TODEVICE=${TOLOWER(${STRREPLACE(TODEVICE,“/”,“:”)})})
same => n,MessageSend(${TODEVICE},${FROMUSER})", and in the Messages Context of extension 0001 I added from-internal-message, when I tried to send a message from extension 0001 also it’s not sent as FreePBX rejected it, please check the below logs and tell me what should be done exactly to solve this issue.

<— Received SIP request (709 bytes) from UDP:192.168.1.121:60167 —>
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.121:60167;rport;branch=z9hG4bKPj8c85ae8a9e274abfb9d2b55f441d1a0c
Max-Forwards: 70
From: sip:[email protected];tag=44eb6379f4f146a6b959114686765641
To: sip:[email protected]
Call-ID: 01d2a1d2170047629fd8c1cefa111ee6
CSeq: 30508 MESSAGE
User-Agent: MicroSIP/3.21.6
Authorization: Digest username=“0001”, realm=“asterisk”, nonce=“1751914858/0b736cd40fc87356881c401bab7eb3e5”, uri="sip:[email protected]", response=“3ef172bc01782c22bc39d422e2a80083”, algorithm=MD5, cnonce=“fef1eeb9c6644e41ad57b17ee7e59e69”, opaque=“495715d378029dec”, qop=auth, nc=00000001
Content-Type: text/plain
Content-Length: 4

test
<— Transmitting SIP response (415 bytes) to UDP:192.168.1.121:60167 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.1.121:60167;rport=60167;received=192.168.1.121;branch=z9hG4bKPj8c85ae8a9e274abfb9d2b55f441d1a0c
Call-ID: 01d2a1d2170047629fd8c1cefa111ee6
From: sip:[email protected];tag=44eb6379f4f146a6b959114686765641
To: sip:[email protected];tag=z9hG4bKPj8c85ae8a9e274abfb9d2b55f441d1a0c
CSeq: 30508 MESSAGE
Server: FPBX-16.0.40.13(20.4.0)
Content-Length: 0

Thanks

Where’s the verbose call log for this?

Did you also update the extension’s message context?

Please check the below logs, and the extension’s message context is already updated to be from-internal-message.

<— Received SIP request (412 bytes) from UDP:192.168.1.121:60167 —>
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.121:60167;rport;branch=z9hG4bKPj3888c35174c64e15b1b7045b88a5970a
Max-Forwards: 70
From: sip:[email protected];tag=de8b56c026c54d63b00da69072b1bd82
To: sip:[email protected]
Call-ID: 67b52e7682a8498e949bac14087fdbad
CSeq: 21158 MESSAGE
User-Agent: MicroSIP/3.21.6
Content-Type: text/plain
Content-Length: 4

[2025-07-07 19:42:53] DEBUG[2200]: res_pjsip/pjsip_distributor.c:394 find_dialog: Could not find matching transaction for Request msg MESSAGE/cseq=21158 (rdata0x7f6374011d78)
[2025-07-07 19:42:53] DEBUG[2200]: res_pjsip/pjsip_distributor.c:472 ast_sip_get_distributor_serializer: Calculated serializer pjsip/distributor-0000003e to use for Request msg MESSAGE/cseq=21158 (rdata0x7f6374011d78)

<— Transmitting SIP response (565 bytes) to UDP:192.168.1.121:60167 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.121:60167;rport=60167;received=192.168.1.121;branch=z9hG4bKPj3888c35174c64e15b1b7045b88a5970a
Call-ID: 67b52e7682a8498e949bac14087fdbad
From: sip:[email protected];tag=de8b56c026c54d63b00da69072b1bd82
To: sip:[email protected];tag=z9hG4bKPj3888c35174c64e15b1b7045b88a5970a
CSeq: 21158 MESSAGE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1751917373/60077222335bbb8a223b5baaa72e9ac3”,opaque=“713df0255863940d”,algorithm=MD5,qop=“auth”
Server: FPBX-16.0.40.13(20.4.0)
Content-Length: 0

<— Received SIP request (712 bytes) from UDP:192.168.1.121:60167 —>
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.121:60167;rport;branch=z9hG4bKPj156b72dbfc6441d5aa28c5f086c30c3b
Max-Forwards: 70
From: sip:[email protected];tag=de8b56c026c54d63b00da69072b1bd82
To: sip:[email protected]
Call-ID: 67b52e7682a8498e949bac14087fdbad
CSeq: 21159 MESSAGE
User-Agent: MicroSIP/3.21.6
Authorization: Digest username=“0001”, realm=“asterisk”, nonce=“1751917373/60077222335bbb8a223b5baaa72e9ac3”, uri="sip:[email protected]", response=“ac07836b1253f60094feba05ee67b651”, algorithm=MD5, cnonce=“ab7f90567c124480a03b62474d206c73”, opaque=“713df0255863940d”, qop=auth, nc=00000001
Content-Type: text/plain
Content-Length: 4

[2025-07-07 19:42:53] DEBUG[2200]: res_pjsip/pjsip_distributor.c:394 find_dialog: Could not find matching transaction for Request msg MESSAGE/cseq=21159 (rdata0x7f6374011d78)
[2025-07-07 19:42:53] DEBUG[2200]: res_pjsip/pjsip_distributor.c:472 ast_sip_get_distributor_serializer: Calculated serializer pjsip/distributor-0000003e to use for Request msg MESSAGE/cseq=21159 (rdata0x7f6374011d78)
[2025-07-07 19:42:53] DEBUG[9669]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting ‘192.168.1.121’ into…
[2025-07-07 19:42:53] DEBUG[9669]: netsock2.c:224 ast_sockaddr_split_hostport: …host ‘192.168.1.121’ and port ‘’.
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_endpoint_identifier_ip.c:260 ip_identify_match_check: Source address 192.168.1.121:60167 does not match identify ‘fpbx-1-J4p0Kx9nIUEE’
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_endpoint_identifier_ip.c:260 ip_identify_match_check: Source address 192.168.1.121:60167 does not match identify ‘fpbx-2-J4p0Kx9nIUEE’
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_endpoint_identifier_user.c:148 username_identify: Attempting identify by From username ‘0001’ domain ‘192.168.1.143’
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_endpoint_identifier_user.c:160 username_identify: Identified by From username ‘0001’ domain ‘192.168.1.143’
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_authenticator_digest.c:472 digest_check_auth: Using default realm ‘asterisk’ on incoming auth ‘0001-auth’.
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_authenticator_digest.c:261 check_nonce: Calculated nonce 1751917373/60077222335bbb8a223b5baaa72e9ac3. Actual nonce is 1751917373/60077222335bbb8a223b5baaa72e9ac3
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_authenticator_digest.c:359 verify: Realm: asterisk Username: 0001 Result: SUCCESS
[2025-07-07 19:42:53] DEBUG[9669]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting ‘192.168.1.143’ into…
[2025-07-07 19:42:53] DEBUG[9669]: netsock2.c:224 ast_sockaddr_split_hostport: …host ‘192.168.1.143’ and port ‘’.
[2025-07-07 19:42:53] DEBUG[9669]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting ‘192.168.1.121’ into…
[2025-07-07 19:42:53] DEBUG[9669]: netsock2.c:224 ast_sockaddr_split_hostport: …host ‘192.168.1.121’ and port ‘’.
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_session.c:4296 session_on_rx_request: (null session) Request: MESSAGE
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_session.c:4316 session_on_rx_request: (null session) Handled request MESSAGE ? no
[2025-07-07 19:42:53] DEBUG[9669]: message.c:960 ast_msg_has_destination: Seeing if dialplan can handle message
[2025-07-07 19:42:53] DEBUG[9669]: message.c:960 ast_msg_has_destination: Seeing if ari can handle message
[2025-07-07 19:42:53] DEBUG[9669]: stasis/messaging.c:245 has_destination_cb: No subscription found for PJSIP/0001
[2025-07-07 19:42:53] DEBUG[9669]: res_pjsip_messaging.c:1454 module_on_rx_request: MESSAGE request received, but no handler wanted it
[2025-07-07 19:42:53] DEBUG[9669]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting ‘192.168.1.121’ into…
[2025-07-07 19:42:53] DEBUG[12313]: manager.c:6648 match_filter: Examining AMI event:

<— Transmitting SIP response (416 bytes) to UDP:192.168.1.121:60167 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.1.121:60167;rport=60167;received=192.168.1.121;branch=z9hG4bKPj156b72dbfc6441d5aa28c5f086c30c3b
Call-ID: 67b52e7682a8498e949bac14087fdbad
From: sip:[email protected];tag=de8b56c026c54d63b00da69072b1bd82
To: sip:[email protected];tag=z9hG4bKPj156b72dbfc6441d5aa28c5f086c30c3b
CSeq: 21159 MESSAGE
Server: FPBX-16.0.40.13(20.4.0)
Content-Length: 0

No like your original post. The log from Asterisk not debug info

Hello Tom,

 I modified the dialplan, now I see that the message is being sent to freepbx successfully and freepbx found the correct dialplan to route the message, but the problem is that nothing is being sent from freepbx to sipstation as per the logs, I have a question, messages from MicroSIP won't be accepted to be sent ?, cause there is a problem in UCP related to java so I used MicroSIP to send messages, please check the logs below.

<— Received SIP request (708 bytes) from UDP:192.168.1.121:60167 —>
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.121:60167;rport;branch=z9hG4bKPja68c34af2fd9448e915b817c226a1841
Max-Forwards: 70
From: sip:[email protected];tag=ac2b4918ebcc4b6dba20d0830faf48d8
To: sip:[email protected]
Call-ID: b6250b29f831410098d8fe9ea2eeac57
CSeq: 1359 MESSAGE
User-Agent: MicroSIP/3.21.6
Authorization: Digest username=“0001”, realm=“asterisk”, nonce=“1751924440/cda594fb3a947ef78116f3b9acfc6bc3”, uri="sip:[email protected]", response=“71c152cbee372996588bd74ce1a00f15”, algorithm=MD5, cnonce=“97ef5fd9b0a6400cafa192d73691ff71”, opaque=“160ea3c123a0e8a5”, qop=auth, nc=00000001
Content-Type: text/plain
Content-Length: 4

test
<— Transmitting SIP response (413 bytes) to UDP:192.168.1.121:60167 —>
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 192.168.1.121:60167;rport=60167;received=192.168.1.121;branch=z9hG4bKPja68c34af2fd9448e915b817c226a1841
Call-ID: b6250b29f831410098d8fe9ea2eeac57
From: sip:[email protected];tag=ac2b4918ebcc4b6dba20d0830faf48d8
To: sip:[email protected];tag=z9hG4bKPja68c34af2fd9448e915b817c226a1841
CSeq: 1359 MESSAGE
Server: FPBX-16.0.40.13(20.4.0)
Content-Length: 0

-- Executing [9492392227@sms-out:1] NoOp("Message/ast_msg_queue", "SMS OUTBOUND from <sip:[email protected]> to 9492392227") in new stack
-- Executing [9492392227@sms-out:2] Set("Message/ast_msg_queue", "FROMUSER=0001") in new stack
-- Executing [9492392227@sms-out:3] Set("Message/ast_msg_queue", "TOUSER=9492392227") in new stack
-- Executing [9492392227@sms-out:4] Set("Message/ast_msg_queue", "ACTUAL_FROM=<sip:[email protected]>") in new stack
-- Executing [9492392227@sms-out:5] Set("Message/ast_msg_queue", "TO_HEADER=<sip:[email protected]>") in new stack
-- Executing [9492392227@sms-out:6] Set("Message/ast_msg_queue", "MESSAGE(to)=<sip:[email protected]>") in new stack
-- Executing [9492392227@sms-out:7] Set("Message/ast_msg_queue", "ACTUAL_TO=pjsip:fpbx-1-J4p0Kx9nIUEE/9492392227") in new stack
-- Executing [9492392227@sms-out:8] MessageSend("Message/ast_msg_queue", "pjsip:fpbx-1-J4p0Kx9nIUEE/9492392227,<sip:[email protected]>") in new stack
-- Executing [9492392227@sms-out:9] NoOp("Message/ast_msg_queue", "Send status: SUCCESS") in new stack
-- Executing [9492392227@sms-out:10] Hangup("Message/ast_msg_queue", "") in new stack

== Spawn extension (sms-out, 9492392227, 10) exited non-zero on ‘Message/ast_msg_queue’

Hello Tom,

Any updates ?

Any updates on what? It looks to be working.

Edit: Oh you probably need to do it as PJSIP/user@endpoint