[asterisk-users] Context issue

2010-11-12 Thread Adrian Marsh
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=XXX

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 =>
_,1,ExecIF($["${RECORDSIP}"="TRUE"],Monitor,wav|${TIMESTAMP}-${CALLE
RID(num)}-${EXTEN}-${UNIQUEID}.WAV)

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

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

exten => _,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:

 

-- Executing [114...@from-sip-uk:2]
Dial("SIP/235012071833427-0a068a18", "SIP/test-ubi/4201|40|r") in new
stack

-- Called test-ubi/4201

 

And that test-ubi account on there has the same SIP  account setup.

 

The inbound server seems to skip the testinbound context completely
though, jumping straight to incomming_pstn, but I've no idea why.

I think it should be going to the context defined in test-ubi

 

ubiphone*CLI>

-- Executing [4...@incomming_pstn:1]
Answer("SIP/192.168.50.132-b7d4f6b0", "") in new stack

-- Executing [4...@incomming_pstn:2]
SayDigits("SIP/192.168.50.132-b7d4f6b0", "2333") in new stack

--  Playing 'digits/2' (language 'en')

--  Playing 'digits/3' (language 'en')

.

 

 

But any idea why ???

 

Thanks,

 

Adrian

 

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Context issue

2010-11-12 Thread Adrian Marsh
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

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Context issue

2010-11-12 Thread Miguel Molina

El 12/11/10 12:13, Adrian Marsh escribió:


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

If you use host = dynamic, I think the device must register with 
Asterisk for incoming calls go to the right context.


Regards,

--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users