2014-05-04 43 views
3

设置:
的Centos 6
操作系统:Linux CentOS的64位
CPU:英特尔酷睿™i7 - 4芯星号:连接一个Asterisk系统要SIP提供商

星号11
libpri 1.4
DAHDI 2.9.1


我想通过星号呼叫转接到我的SIP提供商。我想用软电话拨打电话,当我在软电话上拨打电话时,需要通过我的星号服务器进行路由,然后再通过SIP提供商。目前,当我进行出站呼叫时,它会产生“未通过身份验证”,状态为“CONGESTION”通知。

我的问题很简单:由于我的软电话正在从“User1”(如下所示)进行呼叫,因此我需要在我的sip.conf和extensions.conf文件中写入以便SIP提供商拨打电话为了我?

我的想法:
我觉得我缺少的过程,就像用户1如何设置处理呼出电话的一部分...

见我的当前设置这两个文件了一个概述:

说明:
- 此帖子的所有用户名和密码已被删除。
- sip.us是SIP提供商

sip.conf:

[general] 
transport=udp 
register => username:[email protected] 

[myprovider] 

type=peer 
insecure=port,invite 
host=gw1.sip.us 
port=5060 
dtmfmode=rfc2833 
canrevinvite=no 
disallow=all 
allow=ulaw 
qualify=yes 
qualifyfreq=30 
nat=force_rport,comedia 
trustrpid=yes 
fromdomain=gw1.sip.us 
username=***** 
secret=***** 
context=from-trunk 
rfc2833compensate=yes 
session-timers=refuse 


[friends_internal](!) 
type=friend 
host=dynamic 
context=users 
disallow=all 
allow=ulaw 
allow=alaw 

[user1](friends_internal) 
secret=**** 
[user2](friends_internal) 
secret=**** 

现在的extensions.conf:

... 
...  
exten=>_1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@gw1.sip.us) 

[users] 
exten=>6001,1,Dial(SIP/user1,20) 
exten=>6002,1,Dial(SIP/user2,20) 

现在当我尝试使用拨出电话的星号CLI输出软电话:

== Using SIP RTP CoS mark 5 
    -- Executing [[email protected]:1] Dial("SIP/user1-0000001e", 
    "SIP/[email protected]") in new stack 
    == Using SIP RTP CoS mark 5 
    -- Called SIP/[email protected] 
    [May 4 10:02:13] NOTICE[28935][C-0000002a]: chan_sip.c:23094 
    handle_response_invite: Failed to authenticate on INVITE to 
    '<sip:[email protected]>;tag=as798e5009' 
    -- SIP/gw1.sip.us-0000001f is circuit-busy 
    == Everyone is busy/congested at this time (1:0/1/0) 
    -- Auto fallthrough, channel 'SIP/user1-0000001e' status is 'CONGESTION' 

星号cli> sip show registery

Host    dnsmgr Username  Refresh State  Reg.Time     
gw1.sip.us:5060 N  username  105  Registered Sun, 04 May 2014 10:28:05 
1 SIP registrations. 

星号CLI> SIP秀同行

Name/username  Host  Dyn Forcerport Comedia ACL Port Status      
user1/user1  68.198.. D Auto (No) No   55461 Unmonitored         
user2/user2   68.198.. D Auto (No) No  55461 Unmonitored         
myprovider/username 65.254.44.194 Yes  Yes   5060 OK (42 ms)    
+0

请注意';',你有你的配置IP? (请注意,它不是一个有效的IP地址) – pah

+0

我特意改变了这个帖子。它已成功注册。谢谢。 –

回答

1

尝试改变@ gw1.sip.us到@myprovider,看看是否有任何变化。这将迫使星号使用配置的中继[myprovider],而不是直接将呼叫直接转发到gw.sip.us。

希望这会有所帮助。

+0

工作。谢谢您的帮助! –

2

您的DialPlan在您的配置文件中显示不正确。

Аs第一步更改寄存器的字符串,如:

register => username:[email protected]\Myprovider 

,然后在extensions.conf添加传出和传入的拨号方案,其中包括以下拨号方案到您的用户环境。如:

e。G:你用6XXX系列拨号到服务提供商:

[outgoing] 

exten => _6XXX,1,Dial(SIP/Myprovider/${EXTEN:0}) 
exten => _6XXX,2,Hangup 

和来电

[incoming] 
include = users ; this will go into your local context and dial your extensions 

,并在用户的上下文中添加传出的情况下像

[users] 
include = outgoing 

我希望这将有助于你:)