Wharf T&T SIP Trunk 實戰

Wharf T&T SIP Trunk 要連接到 Asterisk 真的超級簡單!如果因為那一張 T1/E1 的 Digital Board 原因而不想用 IDA-P 的話, Wharf T&T 真的一個好選擇!推薦!

首先,在 sip.conf 上新增一項 SIP Peer 記錄:

[wharf]
type=friend
qualify=no
insecure=very
host=10.x.x.x  <<<注意:這是 Wharf T&T 的 SIP gateway。他們在測試時會給仔這個資料。
disallow=all
allow=ulaw,g729 <<<注意:Wharf T&T 預設不會有 g.729。你可以找他們幫忙打開 g.729 的支援。
context=from-pstn
dtmfmode=rfc2833
canreinvite=yes

要經由 SIP trunk 打出電話可以在 dialplan 上:

exten => _X.,n,Dial(SIP/wharf/{$EXTEN},120,T)

 

28 comments for “Wharf T&T SIP Trunk 實戰

  1. Hoyin
    February 24, 2012 at 12:20 PM

    請問一下價錢如何 ?

  2. February 24, 2012 at 12:51 PM

    問一問 Sales 啦。與傳統 IDA-P 差不多。

  3. hah
    April 27, 2012 at 4:06 PM

    No need to register? like
    register => user[:secret[:authuser]]@host[:port][/extension] ?

    If so how to differentiate different numbers coming into system if we have 10 DDI numbers?

    Many thanks in advance for your help. I am also looking at using Wharf service too.

  4. hah
    April 27, 2012 at 4:10 PM

    Also can a LAN card be used instead of the T1/E1 card?

  5. admin
    April 30, 2012 at 5:13 PM

    因為不是分機所以不需要 Register 。這是 SIP Trunk,分辨 DDI/DNIS 可以在 Dialplan 用 CalledID(num) 參數來辨識。

  6. admin
    April 30, 2012 at 5:13 PM

    Yes

  7. admin
    April 30, 2012 at 5:15 PM

    Lan Card 質量要用好的。最好用 Server Grade 的卡。

  8. hah
    May 3, 2012 at 1:41 PM

    Sorry as I am new to Asterisk so not too sure if I understand the CalledID(num) function correctly.

    So if WharfTT numbers are from xxxx-x100 to xxxx-x199
    and I map them to extension 100 to 199, then I do something like below?

    extensions.conf

    [from-pstn] ;(from your above example context)
    exten => s,1,set(MapExt=${CALLEDID}:5)
    same => n,Dial(SIP/${MapExt},120)
    same => n,Hangup()

    I tried google and CALLEDID didn’t return much info that are related to DDI.

    Many thanks in advance for any help you can provide.

  9. hah
    May 3, 2012 at 2:48 PM

    Also when I tried the CALLEDID function, it says:

    Function CALLEDID not registered

    I am using 1.6. Do I need to upgrade to 1.8 to get this function? If I don’t want to upgrade any other ways/function to use so I can get DDI to work?

    Many thanks!

  10. admin
    May 3, 2012 at 3:20 PM

    >So if WharfTT numbers are from xxxx-x100 to xxxx-x199
    >and I map them to extension 100 to 199, then I do something like below?

    I’m sorry that a wrong information. You can compare with EXTEN variable. If WharfTT sends 5 digits of DDI to your system, you can:

    [from-pstn] ;(from your above example context)
    exten => _X.,1,set(MapExt=${EXTEN}:5)
    same => n,Dial(SIP/${MapExt},120)
    same => n,Hangup()

  11. hah
    May 3, 2012 at 3:57 PM

    I see.. so Wharf will be sending me the extension variable which I can use to route to my extension.

    Looks like I will be able to make it work!

    Many thanks… will give Wharf a try then…

  12. hah
    May 3, 2012 at 4:45 PM

    I have asked Wharf and they said most of their customers are using Cisco, NEC, Nortel, etc. and do not require any host IP address and will work when plugged in.

    And if I need the IP address, they charges more per channel and will treat me as a SI/Business partner instead of a normal customer. Does this make sense?

  13. admin
    May 3, 2012 at 7:48 PM

    >I have asked Wharf and they said most of their customers are using Cisco, NEC, Nortel, etc. and do not require any host IP address and will work when plugged in.
    唔係好明白為什麼你需要 IP ? 係Fix IP 或其他? IP Address 他們會 assign給你的。

    >And if I need the IP address, they charges more per channel and will treat me as a SI/Business partner instead of a normal customer. Does this make sense?
    這真的要問清楚 Sales 了,這個問題我們答不到你了。

  14. hah
    May 4, 2012 at 10:40 AM

    The SIP gateway IP… host=10.x.x.x

    They say other system don’t need the IP and if need the IP, they need to charge me more.

  15. Hah
    May 15, 2012 at 11:43 PM

    Can you give me information as to how the physical connection is like for the sip trunk? For example in broadband, their fiber is terminated with a modem they provide, then there is a RJ45 jack to connect to my wifi router which then connect to a few different computers using the other LAN port in the router. For the sip connection, i believe the fiber is also terminated to their modem and then how is it connected? Do they have a separate router? Or does it go straight into the asterisk server? If straight to server, does it mean I need another LAN card on my server so it can connect to a switch/hub so the ip phones can connect to the server using internal ip? Many thanks again.

  16. admin
    May 16, 2012 at 12:26 AM

    上次他們幫我們客戶安裝SIP trunk 時,他們是需要安裝獨立的 fiber 和 modem 。而客戶已經是他們的 broadband 客戶,所以肯定 SIP 和 broadband 是獨立存在的。以他們的建議,SIP 的 modem 必須用 RJ45 直接連接上電話系統。中間不能途經任何裝置。所以,系統必須有獨立的 Ethernet port 來連接 SIP trunk。

  17. hah
    May 16, 2012 at 1:34 PM

    So I need a LAN card to connect direct to their modem and set this LAN card with DHCP so I also get an ip with the range 10.x.x.x (same IP range as the host you mentioned above). Then another LAN card to connect to my switch using say 192.x.x.x IP range and all other IP phones within my network to use 192.x.x.x as well. Is this correct?

    Possible to connect from their modem to a router or connect direct to my switch so I do not need to add 1 more LAN card? I do not want to add 1 more.

    I currently use register setup and everything work good with 1 LAN card only.

  18. admin
    May 17, 2012 at 4:38 PM

    >So I need a LAN card to connect direct to their modem and set this LAN card with DHCP so I also get an ip with the range 10.x.x.x (same IP range as the host you mentioned above). Then another LAN card to connect to my switch using say 192.x.x.x IP range and all other IP phones within my network to use 192.x.x.x as well. Is this correct?
    Exactly!

    >Possible to connect from their modem to a router or connect direct to my switch so I do not need to add 1 more LAN card? I do not want to add 1 more.
    理論上可行,因為一張 LAN 卡可以 bind 兩個 IP Address,但我不會這一樣做。因為有機會降低 voice quality ,尤其如果用普通 PC 的 on-board LAN Card 更加容易出關於 performance 問題。

  19. hah
    June 4, 2012 at 3:15 PM

    Everything finally set and working good… I am using 1 lan card for now and binding 2 ip address to the nic. No problem so far. Only problem is that even Wharf technician don’t seem to know much about the SIP technology. They didn’t even know what the SIP server IP address should be. I had to figure it out from the CLI when trying to call myself. Thanks so much for this website and your help…

  20. tpenguin
    January 30, 2013 at 3:03 PM

    Do you know any others SIP trunk provider in HK except WharfTT? Are those provider for business only (Need BR)? I only know HKBN2b and Comnet. 2b supports only SIP phone client only and Comnet support Asterisk as well.

  21. SLi
    February 27, 2013 at 1:35 PM

    Hi admin,

    I was wondering if I would be able to hire you for your services to help me set up my Wharf T&T PBX, I have all the appropriate hardware but am not sure how to set this up because right now I have two network cards.

  22. admin
    March 25, 2013 at 11:30 AM

    如果用 HKBN 的 2B 接入 Asterisk 可以去看看 http://www.telecom-cafe.com 。那裏有很多高手用緊 HKBN 呢。

  23. tony_leung
    November 25, 2013 at 7:34 PM

    how to setup sip to fax ??

  24. admin
    November 27, 2013 at 2:55 PM

    1, SIP 的 media encoding 必須使用 uLaw
    2, 如果是自行 compile asterisk 的 SpanDSP 的話,可以在dialplan 直接使用 rxFax() 收取 Fax, 或:
    3, 如果是用 Elastix 的話,請依據 Elastix 的設定方式。

    注意:因為網路原因,SIP 收取 Fax 未必保證 100%成功。

  25. JOE
    November 27, 2013 at 11:22 PM

    我正在測試安裝一台elastix有VirtualBox內,主機有兩張Lan咭,一張接到Switch,一張接到WharfTT的SIP

    Wharf TT的SIP提供了一佰個號碼 xxxx5000-xxxx5099
    以我所知,WharfTT會send曬8個digi for DID

    咁以下既setting應該點改?係邊度set??

    [from-pstn] ;(from your above example context)
    exten => _X.,1,set(MapExt=${EXTEN}:5)
    same => n,Dial(SIP/${MapExt},120)
    same => n,Hangup()

    thanks a lot

  26. JOE
    November 27, 2013 at 11:48 PM

    另外我有幾部Cisco SPA303/504 想接入這台系統,請問有無教學?我上網找過很多,但都不大詳細,謝謝

    Joe

  27. admin
    November 28, 2013 at 1:00 AM

    你好,

    如用Elastix, 請在 sip_custom.conf 上新增一項關於 WharfT 的 SIP Peer 記錄。其他的設定請參閱Elastix 的文件。

    另外,我們沒有關於Cisco SPA303/504 的資料,而且我們也未測試過這兩款電話。

  28. hah
    January 29, 2014 at 2:52 PM

    Hi Joe, does Wharf provide you all 8 digits? I thought its only the last 4…

Leave a Reply