Is there a way to match incoming calls to more than one ip adress for the same endpoint?
My provider sometimes changes it’s IP in the from user field and I need to allow another ip address for my endpoint.
I have the following identity in pjsip.conf:
[MY_PROVIDER]
type = identify
endpoint = MY_PROVIDER
match = XXX.XX.XXX.100
In the sample file it seems like you can have many IP addresses but I cannot find an example of how to do it.
sample file from pjsip.conf.sample
; MODULE PROVIDING BELOW SECTION(S): res_pjsip_endpoint_identifier_ip
;==========================IDENTIFY SECTION OPTIONS=========================
;[identify]
; SYNOPSIS: Identifies endpoints via source IP address
;endpoint= ; Name of Endpoint (default: “”)
;match= ; IP addresses or networks to match against (default: “”)
;type= ; Must be of type identify (default: “”)
Is anything output on the CLI when it is read in and configured? What does the console log show with debug on when a call comes in? (You may need to be running a newer version for those log messages to be present)
If I do a wireshark capture, I can see Asterisk giving a 401 to my provider.
The source ip address is my first IP match (.100) and the from user field has my second match line (.101).
My provider is sometime doing sip analysis that’s why I get a different IP address in the from userfield.
I just did and unfortunately I do not seem to get anything more… I get nothing from the console when the problematic incoming call is coming.It does not even get into the dialplan.
All I get is sip trace from setting pjsip logger on.
Do you want still want me to give it to you?
dti-asterisk*CLI> module show like res_pjsip_endpoint_identifier_ip
Module Description Use Count Status Support Level
res_pjsip_endpoint_identifier_ip.so PJSIP IP endpoint identifier 0 Running core
1 modules loaded
[Sep 22 16:06:07] DEBUG[6405] res_pjsip_endpoint_identifier_ip.c: Source address XXX.XXX.XXX.100:5060 does not match identify ‘4188954758’
[Sep 22 16:06:07] DEBUG[6405] res_pjsip_endpoint_identifier_ip.c: ‘XXX.XXX.XXX.100:5060’ did not match any identify section rules
The IP address in my match line is right but will only work if I remove the XXX.XXX.XXX.100 and I only have XXX.XXX.XXX.101 left.
Hum, so if the address in the from field does not matter and it’s really looking at the source ip address, why does it work when I put it in the match line? I’m clueless.