Route calls that comes in a specific trunk to a specific extension

Hi all,
please, how to route calls that comes in a specific trunk to a specific SIP extension.

What’s a trunk? What’s a SIP extension? Neither of these terms mean anything to Asterisk.

In the context associated with your “trunk”, define an extension that matches all possible incoming dialed numbers. That can do anything it likes, including dialling a specific SIP device or going to a a specific Asterisk extension.

In cases where the incoming call has no digits supplied, Asterisk will use the s extension.

The WIKI has configuration examples, Look at the ‘A SIP trunk to your service provider, including outbound registration’ example

https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Configuration+Examples


in your pjsip.conf
[mytrunk]
type=endpoint
context=from-external

in your extensions.conf
[from-external]
exten => 1234567890,1,Dial(PJSIP/MyEndPoint)