返回列表 發帖
Try to learn and debug whatever I can. Everyone is helpful, in particular 角色.
Once I got it fix, I can then share my experience.

TOP

I hope I can fix it. Perhaps one of the problems is the IP address. I notice that the requesting and then returning IPs are different. Keep trying

TOP

Finally, I manage to get both inbound and outbound work. But not yet fixed up the IVR to catch the call.

HKBN to extension - no problem
to IVR, failed, either invalid extension or failed.

TOP

Very good news!How can you do it? What are the problems encountered in the past and the way to fix the problems?

Try to put your IVR under the [internal] label such that it can see all the internal extensions.

YH

TOP

My sip.con is like this

[general]
context = default
srvlookup = no
nat = yes
realm = Realm
externhost = xxx.yyy.zzz
fromdomain = xxx.yyy.zzz
localnet = 192.168.118.0/255.255.255.128  ;change it as per your Asterisk network address
localnet = 192.168.1.0/255.255.255.0
externrefresh = 180
defaultexpirey = 120
bindport = 5060
pedantic = no
qualify = yes
tos = cs3
tos_audio = ef
tos_video = af41
disallow = all
allow = alaw
allow = ulaw
allow = gsm
;domain =
autodomain = no
bindaddr = 0.0.0.0
allowexternalinvites=no
alwaysauthreject=no
allowexternaldomains=no

register => 35678900hk:password@s2hkbntel.net/35678900

[hkbn2b]
type = friend
nat = yes
username = 35678900hk
secret = password
port = 5060
host = s2hkbntel.net
fromuser = 35678900hk
fromdomain = s2hkbntel.net
canreinvite = no
insecure = invite
disallow = all
allow = alaw
;dtmfmode = rfc2833
context = from-hkbn2b
outboundproxy = 203.80.89.139
quality = no

This is in a multiWAN environment with centos based asterisk server, IP01 with switchfin firmware and a DD-WRT router.

Only problem now is the IVR, somehow it drops.
If I forward to a SIP phone, it rings with callerID.

TOP

My error is like this
  -- Executing [1000@default:4] WaitExten("SIP/domain2b.hkbn.net-000000fd", "5") in new stack
    -- Timeout on SIP/domain2b.hkbn.net-000000fd, continuing...
    -- Executing [1000@default:5] Hangup("SIP/domain2b.hkbn.net-000000fd", "") in new stack
  == Spawn extension (default, 1000, 5) exited non-zero on 'SIP/domain2b.hkbn.net-000000fd'

Can't take my extensions

TOP

Please take a look at my ivr example but I forgot the location.

YH

TOP

No idea now that dial out is not working. Registration sometimes success, sometimes timeout. I got 603 declined error

TOP

本帖最後由 bubblestar 於 2010-10-4 11:31 編輯

I have just read a post from http://forums.whirlpool.net.au/archive/1133054 which might be useful to you to fix the outbound or inbound problems on Asterisk 1.6 based server system.  The possible culprit is insecure and or type that happened only on Asterisk 1.6

I extracted part of the content for your easy reference.  Hope it helps you out.

Background

The setup:
Asterisk 1.6 on an externally hosted box.
A standard Engin account to receive and make calls. (this may correspond to some company like HK2b)

The Problem:
While everything was sweet with v1.4, 1.6 would not accept incoming calls. You would get an engaged signal from a telstra PSTN line. Engin to Engin would simply hang up.

The Solution:
For some strange reason, you don't have to be insecure=whatever to make outbound calls. But you need it configured to receive inbound calls.

insecure=very has been left out of asterisk 1.6 so you need to use insecure=invite,port to get the same result.

But I had configured that in the inbound type=user channel setup. For whatever reason you also have to configure it in the outbound type=peer channel setup.

TOP

Thanks, bubblestar 兄, the information is reasonable and similar to my understanding of the underlying problem.

One can conclude that asterisk 1.6 has created its own set of problems.

TOP

I have just read a post from  which might be useful to you to fix the outbound or inbound problems o ...
bubblestar 發表於 2010-10-4 11:30


May not be 100% working.
   
Now, I add the following in the general section of sip.conf

stunaddr = stun.xten.com

TOP

You meant with the added STUN server, your 2b outbound calls always work but not for inbound calls, right?

YH

TOP

回復 42# 角色

Now, both works. However, I believe the underlying problem is asterisk 1.6
Unfortunately, no time or choice to downgrade to 1.4

TOP

An update:

The problem is in asterisk 1.6 but also in my router. In the former, it is the variable, type and insecure. But also note that router issue is important. Because of using more than one IP, when the outgoing connection is made, different IPs may be associated. In return at the authenization phase, IPs mismatched. Now I fix this by looking at my outgoing firewall rules, and bound to a fixed wan IP . No problem so far.

The usual internal extension under one asterisk server works with the present auto-attendant script. When try to press extension of other asterisks or try other dialplan, it generates invalid extension.

TOP

我是用1.8的...但按照之前的設定...出了以下錯誤...
    -- Called XXXXXXXX@s2hkbntel
    -- Got SIP response 301 "Moved Permanently" back from 203.80.89.135:5060
    -- Now forwarding SIP/6004-00000002 to 'Local/XXXXXXXX@from-hkbn' (thanks to SIP/s2hkbntel-00000003)
[Jan 17 15:52:37] NOTICE[23963]: app_dial.c:844 do_forward: Not accepting call completion offers from call-forward recipient Local/XXXXXXXX@from-hkbn-36f0;1
[Jan 17 15:52:37] NOTICE[23963]: chan_local.c:800 local_call: No such extension/context XXXXXXXX@from-hkbn while calling Local channel
[Jan 17 15:52:37] NOTICE[23963]: app_dial.c:915 do_forward: Forwarding failed to dial 'Local/XXXXXXXX@from-hkbn'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [XXXXXXXX@internal:2] Hangup("SIP/6004-00000002", "") in new stack

我大概是跟著以前epc時的設定的...
http://www.hkepc.com/forum/redir ... 74&pid=20368375

不知是否設定錯了甚麼呢?

TOP

返回列表