Incoming call from TRUNK mis decoded

How does Asterisk map the incoming call (INVITE SIP) with the variable ${EXTEN} ?

Because I get a problem with one TRUNK SIP INVITE. With the followings fields :
INVITE sip:[trunk-number]@host:port
TO : [sub-trunk-number]@host:port

Asterisk always decode the incoming call with the primary number and not the sub-number. Maybe there is some configuration to change ?

Tested on version 13.04 / 10.9.0

The request URI, that is the URI on the first line (the trunk number as you are calling it), is the extension that has been requested by the remote side. The To header isn’t supposed to be used for routing but some providers still do it anyway. There is no configuration option to support this, you’d have to get it from the dialplan and parse it there. I believe if you search on here there are examples.

1 Like