PJSIP incoming call

Hi guys! I have something strange from asterisk
i have extensions on endpoints
[pjsip_incoming1 … 19] 19 is last one
If i making an incoming call on any endpoint i have this:
res_pjsip_session.c: Call from ‘1019’ (UDP:XXX.XXX.XXX.XXX:5060) to extension ‘XXXXXXX’ rejected because extension not found in context ‘pjsip_incoming19’

But in real i have incoming call in pjsip_inocming18 ? Why that?

You have endpoints, not extensions, on the endpoints.

Without seeing the context= line for the endpoint matched, we can’t really comment.

i’m calling on ABCDEFGHI but i see above message in a logs

[10000018]
type=endpoint
transport=transport-udp
context=pjsip_incoming18
disallow=all
allow=alaw
allow=ulaw
outbound_auth=10000018
aors=10000018
from_user=ABCDEFGHI
from_domain=ip.someserver.com
direct_media=no

[10000019]
type=endpoint
transport=transport-udp
context=pjsip_incoming19
disallow=all
allow=alaw
allow=ulaw
outbound_auth=10000019
aors=10000019
from_user=ZXCVBNMK
from_domain=ip.someserver.com
direct_media=no

[10018]
type=endpoint
transport=transport-udp
context=pjsip_out18
disallow=all
;allow=alaw
;allow=alaw,ulaw,g723,g729,g726,g722,gsm,ilbc,opus
allow=opus
allow=alaw
allow=ulaw
webrtc=yes
auth=10018
aors=10018

[10019]
type=endpoint
transport=transport-udp
context=pjsip_out19
disallow=all
;allow=alaw
;allow=alaw,ulaw,g723,g729,g726,g722,gsm,ilbc,opus
allow=opus
allow=alaw
allow=ulaw
webrtc=yes
auth=10019
aors=10019

[pjsip_incoming18]
exten => _X.,1,Dial(PJSIP/10018)

[pjsip_out18]
exten => _XXXXXXXXXXX,1,Dial(PJSIP/${EXTEN}@10000018)
exten => _XXXXXXXXXXX,n,Hangup()

[pjsip_incoming19]
exten => _X.,1,Dial(PJSIP/10019)

[pjsip_out19]
exten => _XXXXXXXXXXX,1,Dial(PJSIP/${EXTEN}@10000019)
exten => _XXXXXXXXXXX,n,Hangup()

from_user is the value used in outbound requests to the endpoint. As such, I don’t think it is used for endpoint matching at all. I suspect both these endpoints have the same IP address and the match is being done on that.

I think, but am not certain, that it is the section name that would be matched with the incoming request from user.

yes you right, i have :
[10000018]
type=identify
endpoint=10000018
match= ip.someserver.com
[10000019]
type=identify
endpoint=10000019
match= ip.someserver.com

It’s 2 accounts on same server, how i can more precisely detect endpoint in this case?

You have to match on something other than IP address. Typical options would be From user and authuser. You don’t seem to be authorising them, so I think you can forget authuser.

Although having multiple accounts on an ITSP is never a good idea, registering with different call back numbers and distinguishing in extensions.conf, was the normal solution for chan_sip.

You mean i should have 1 endpoint as a voip provider, 1 registration, many auth, many aor?
i should match it in identify section?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.