Trunk con Messagenet

Buongiorno a tutti
Ho configurato un trunk con messagenet gestore voip dove danno anche un numero telefonico.
Chiamate in ingresso e in uscita Ok. Le chiamate in ingresso però sono costretto a mettere ANY altrimenti non funziona mettendo il numero corretto mi dà errore, sembra che si presenti sconosciuto ma non dal gestore. Forse è da mettere qualche regola nel trunk in SIP setting incoming ?

Please excuse my writing in English.

For example, your Register String (on the Incoming tab), you should have something like:
1234554321:[email protected]:5061/0656549999
where 1234554321 is your account number, abcdefgh is your SIP password and 0656549999 is your Messagenet phone number.

In the Inbound Route, the DID Number should exactly match what you have after the / in the Register String.

In you still have trouble, see if your number appears in the DID field of the CDR record for an incoming call. Sett the Inbound Route DID Number to match that.

5 [2021-11-07 16:47:10] VERBOSE[25110][C-0000002a] pbx.c: Executing [[email protected]:1] Set(“SIP/+390282396780-00000019”, “__FROM_DID=from-trunk”) in new stack
6 [2021-11-07 16:47:10] VERBOSE[25110][C-0000002a] pbx.c: Executing [[email protected]:2] NoOp(“SIP/+390282396780-00000019”, “Received an unknown call with DID set to from-trunk”) in new stack

Risolto

In TRUNKS - SIP SETTINGS - INCOMING

callbackextension=+390282396780

On an older system, I have these settings for Messagenet:
Outgoing tab, PEER Details

host=sip.messagenet.it
port=5061
username=(10 digit account number)
secret =(SIP password)
type=peer
insecure=invite
disallow=all
allow=alaw&ulaw

The Incoming tab is left completely blank, except for the Register String, which is as described earlier.

If you still have trouble, post your FreePBX and Asterisk version numbers.

Scheda in ingresso:

type=friend
host=sip.messagenet.it

fromuser=xxxxxx
secret=xxxxxx
transport=udp
defaultuser=xxxxxxxx
fromdomain=sip.messagenet.it
port=5061
qualify=yes
insecure=invite,port
language=it
nat=force_rport
username=xxxx
context=from-trunk
callbackextension=+390282396780

In uscita

host=sip.messagenet.it
secret=xxxxx
type=friend
username=xxxxxx
user=xxxxxxxx
fromuser=xxxxxxxx

così configurato tutto OK

I have not use the callbackextension feature; possibly it is broken in recent versions. What version of FreePBX and Asterisk are you running? It may be easier to set up a pjsip trunk.

Asterisk Version 16.18.

Potrebbe essere più semplice configurare un trunk pjsip.
Spiega

I converted the Messagenet trunk to pjsip with these settings:

General tab: Fill in Trunk Name and Outbound CallerID.
PJSIP Settings, General: Fill in Username, Secret, SIP Server
PJSIP Settings, Advanced: Fill in Contact User (same as you used for callbackextension) and From User (same as Username)

Leave all other settings blank or at defaults.

Test and report results.