Hello,
I am trying to use match_header.
This is what i tried so far;
match_header = To: <sip:xxx.xxx.xxx.xxx:5070>
;match_header= To: /<sip:.:5070./
;match_header= To: /<sip:.:5070./
Even if i am writing regex wrong, isn’t this should work match_header = To: <sip:xxx.xxx.xxx.xxx:5070>
Sip package is something like this. I am writing exact value to match_header.
I can’t see what i am doing wrong. Need help with this.
Asterisk version: Asterisk 16.30.0
Edit: My main objective is handling ip:port info.
If i use something like this it works.
match_header = To: /.sip:xxx.xxx.xxx.xxx./
or match_header = To: <sip:xxx.xxx.xxx.xxx>
But if i add port info ;
match_header = To: /.sip:xxx.xxx.xxx.xxx:5060./
or match_header = To: <sip:xxx.xxx.xxx.xxx:5060>
It does not work.
also what are you trying to acomplich as matching on To: sound extreamly wrong
normaly you do that part in the dialplan
match is to difirendicate who is calling and not what they are dialing
can you please descripe what you are trying to do, as it sound like you have misunderstand key parts of asterisk
Hello,
What I’m trying to do is, I want to receive a call at the “A” endpoint if it comes to port 5060, and to the “B” endpoint if it comes to port 5070.
But there is this part to; I have to give response OPTIONS packages as well.
And calls are coming from fixed IP address.
Sender IP address My IP address
xxx.xxx.xxx.xxx:5060 —>>> xxx.xxx.xxx.xxx:5070
I need to receive this call in the endpoint “A”
Sender IP address My IP address
xxx.xxx.xxx.xxx:5060 —>>> xxx.xxx.xxx.xxx:5060
I need to receive this call in the endpoint “B”
If this possible, i am open to every possible solution.
What I find interesting here:
The threadstarter defined two transports, one with port 5060 and one with 5070. He assigned one to one endpoint and the other to another one.
I always thought that if someone does that it would match the corresponding endpoint because of the assigned transport.
Edit:
I just read the docs and the transport of an endpoint is only for sending sip messages, not for receiving.