INVITE parse - get port


there is variable SIPDOMAIN destination domain of an inbound call. is there variable with destination port?
is it possible to get ruri or port from invite?


It should always be the same the port to which chan_sip is bound, as Asterisk is a UAS, not a proxy, in this context.

no, if invite come from other side, kamailio, for example
INVITE sip:111@ SIP/2.0

how to get that 5061 port in dialplan? or or full ruri?

I believe the proxy should have rewritten the URI.

I suspect Kamailio is sufficiently flexible to allow you to create invalid systems.

why kama will rewrite right ruri? second account on phone is on 5061 port, so kamailio send right invite, i just need to get port from invite at asterisk

If you still need to extract port number, then you should become familiar with that