T
T
Talyan2019-12-13 21:55:41
linux
Talyan, 2019-12-13 21:55:41

Why doesn't Asterisk use the specified context?

Good evening.
There are 2 city SIP numbers on the asterisk.
222222 - phone on which the dedmoroz answering machine should be played
333333 - phone on which the snegurka answering machine should be played
sip.conf:

sip.conf

[general]
register => 222222:********@voip.example.ru/222222
register => 333333:********@voip.example.ru/333333
[dedmoroz]
type=friend
username=222222
secret=******
fromuser=222222
fromdomain=voip.example.ru
host=voip.example.ru
nat=yes
insecure=invite
context=dedmoroz_incoming
canreinvite=no
[snegurka]
type=friend
username=333333
secret=******
fromuser=333333
fromdomain=voip.example.ru
host=voip.example.ru
nat=yes
insecure=invite
context=snegurka_incoming
canreinvite=no

Dialplan:
extensions.conf
extensions.conf

[dedmoroz_incoming]
exten => 222222,1,Background(/var/lib/asterisk/IVR/my/dedmoroz)
[snegurka_incoming]
exten => 333333,1,Background(/var/lib/asterisk/IVR/my/snegurka)

Problem:
I'm calling from a mobile phone to 222222 - everything is fine, the necessary music is playing; I
'm calling from a mobile phone to 333333 - wee wee wee, in the console there is an error:
Call from '222222' (voip.example.ru:5060) to extension '333333' rejected because extension not found in context 'dedmoroz_incoming'.

I don’t understand why it happens that I specifically specify in sip.conf who should use which context: for 222222, the context is dedmoroz_incoming, and for 333333, the context is snegurka_incoming,
but the error clearly states that when calling 333333 for some reason " Call from " 222222' ", and extension not found in context 'dedmoroz_incoming'. .
That is, when calling 333333, for some reason, the context from profile 222222 is used.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
brar, 2019-12-13
@flapflapjack

And if you transfer
in [dedmoroz_incoming] ??
Like this:

[dedmoroz_incoming]
exten => 222222,1,Background(/var/lib/asterisk/IVR/my/dedmoroz)
exten => 333333,1,Background(/var/lib/asterisk/IVR/my/snegurka)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question