Context issue

Home » Asterisk Users » Context issue
Asterisk Users 2 Comments

Hi,

Running 1.4.15. I’ve a SIP user as below. My default context in
sip.conf is [incomming_pstn]

I’m having trouble with inbound calls going to the wrong context.

[test-ubi]

username=test-ubi

type=friend

secret=XXXXXXX

host=dynamic

canreinvite=no

context=testinbound

nat=yes

allow=ulaw

allow=gsm

allow=alaw

qualify=no

the testinbound context includes the code to prepend a 2 to the CLI
before passing it onto another context

[testinbound]

exten =>
_XXXX,1,ExecIF($[“${RECORDSIP}”=”TRUE”],Monitor,wav|${TIMESTAMP}-${CALLE
RID(num)}-${EXTEN}-${UNIQUEID}.WAV)

exten => _XXXX,n,NoOp(REWRITE CALLERID)

exten => _XXXX,n,ExecIf($[ “${LEN(${CALLERID(num)})}” = “4”
]|Set|CALLERID(num)=2${CALLERID(num)})

exten => _XXXX,n,Goto(local,${EXTEN},1)

However, when a call comes in, its being passed to the
[incomming_pstn] context instead of [testinbound].

The Outbound server is dialling:

2 thoughts on - Context issue

  • How odd…

    If I specify the host=dynamic then it goes to the wrong context.

    If I specify the host=192.168.50.132, then it goes to the correct
    context.

    If I don’t specify the host at all, then it also goes to the correct
    context… (but then of course I can’t use that account for outbound
    calls..)

    Adrian

  • El 12/11/10 12:13, Adrian Marsh escribió:
    If you use host = dynamic, I think the device must register with
    Asterisk for incoming calls go to the right context.

    Regards,