Destination did error ip forwarding to external pbx

Hello
I have setup a small test switch and added in some did numbers, I can forward incoming did to PSTN with no issues, I can also forward to DID-LOCAL to a registered sip device on customer account.
It just seems if i try forward using did@ip/url eg 1234@mysipswitch.com etc I am getting the message below.
Most likely something stupid i am doing wrong.
Does the end destination PBX where i am forwarding to need to be registered, I have allowed the IP in IP auth.

Thanks

+OK log level [7] snip…
2022-12-02 15:44:20.259428 96.23% [DEBUG] switch_cpp.cpp:1465 [ASTPP] [sip_codec_for_outbound] Query :SELECT sip_devices.codec as sip_codec FROM sip_devices as sip_devices,accounts as accounts WHERE accounts.status=0 AND accounts.deleted=0 AND accounts.id=sip_devices.accountid AND sip_devices.username=“0866081234” limit 1
2022-12-02 15:44:20.259428 96.23% [ERR] mod_lua.cpp:202 /usr/share/freeswitch/scripts/astpp/scripts/astpp.xml.lua:350: attempt to concatenate global ‘did_chan_var’ (a nil value)
stack traceback:
/usr/share/freeswitch/scripts/astpp/scripts/astpp.xml.lua:350: in function ‘?’
/usr/share/freeswitch/scripts/astpp/scripts/astpp.xml.lua:305: in function ‘freeswitch_xml_inbound’
…hare/freeswitch/scripts/astpp/scripts/astpp.dialplan.lua:455: in main chunk
[C]: in function ‘dofile’
/usr/share/freeswitch/scripts/astpp/astpp.lua:85: in main chunk
2022-12-02 15:44:20.259428 96.23% [ERR] mod_lua.cpp:269 LUA script parse/execute error!
2022-12-02 15:44:20.259428 96.23% [WARNING] mod_dialplan_xml.c:669 Context default not found
2022-12-02 15:44:20.259428 96.23% [INFO] switch_core_state_machine.c:306 No Route, Aborting
2022-12-02 15:44:20.259428 96.23% [NOTICE] switch_core_state_machine.c:307 Hangup sofia/default/0866085245@46.101.29.17 [CS_ROUTING] [NO_ROUTE_DESTINATION]

Hello @johnmd ,
Please log the issue here https://jira.astppbilling.org/
Thanks.