返回列表 發帖
回復 45# ckleea


    My mistake in the config file. Now all nine skype accounts work. To report in the tutorial threads later.

TOP

My failover trunk as follow
  1. exten => _9.,1,Set(GLOBAL(hkno)=00852${EXTEN:1})
  2. ; first try HKBN2b
  3. exten => _9.,n,Macro(superdial,SIP/133${EXTEN:1}@hkbn2b,,m,,,1,,,,)
  4. ; then try YHFung's HKBN2b
  5. exten => _9.,n,Dial(SIP/6207,2,M(senddigits)tr)
  6. ; then try SPA3000's landline
  7. exten => _9.,n,Macro(superdial,SIP/pstn-spa3k-d1/133${EXTEN:1},,m,,,1,,,,)
  8. ; then try landline at OBi110
  9. exten => _9.,n,Macro(superdial,SIP/**8${EXTEN:1}@obitrunk,,m,,,1,,,,)
  10. ; then try USG 3G modem
  11. exten => _9.,n,Macro(superdial,Datacard/datacard0/133${EXTEN:1},,m,,,1,,,,)
  12. exten => _9.,n,Hangup()
複製代碼

TOP

回復 49# 角色


    It is five only. The reason behind is to test every possibility of outgoing call

TOP

There are other under considerations
1. Using other trunks e.g. H323 provided by other friends, sip trunk by other users
In this case, I need to hide the caller I'd
2. For IDD calling, choose the cheapest according to time,
3. Control number of concurrent calls per trunk

As suggested by Bubblestar Ching, simplify the code to remember for a certain function

TOP

回復 52# bubblestar


However, this is for normal dialing. For speed dial, you need other ways to deal with failover. I can only use 2 trunks per the default macro available from asterisk.

TOP

回復 54# bubblestar


    I use something like this for failover in speeddial

exten = 345,1,Macro(trunkdial-failover-0.3a,SIP/98765432@hkbn2b,SIP/98765432@pstn-spa3k-d1,hkbn2b,pstn-spa3k-d1)

TOP

My new failover as follow

[CallingRule_UKCall]
exten => _44.,1,Macro(superdial,SIP/0${EXTEN:2}@pstn-spa3kuk-d1,,m,,,1,,,,)
exten => _44.,n,Macro(superdial,IAX2/ip01/90${EXTEN:2},,m,,,1,,,,)
exten => _44.,n,Hangup()

TOP

回復 58# 角色


    這個superdial 使用2 條 trunks,用SIP 和IAX,後者非常重要!

TOP

Important observation.
If I use the superdial macro in two asterisk machines, both machines allows superdial function. i.e. when the first asterisk passes to the second asterisk, the second one will also do superdial functions if this dialplan exists.

TOP

Another type of speeddial with superdial macro is

exten => 348,1,Set(GLOBAL(speeddial)=xxxxxxxxx)
exten => 348,n,Macro(superdial,SIP/133${speeddial}@hkbn2b,,m,,,1,,,,)
exten => 348,n,Macro(superdial,SIP/pstn-spa3k-d1/133${speeddial},,m,,,1,,,,)
exten => 348,n,Macro(superdial,SIP/**8133${speeddial}@obitrunk,,m,,,1,,,,)
exten => 348,n,Macro(superdial,Datacard/datacard0/133${speeddial},,m,,,1,,,,)
exten => 348,n,Macro(superdial,Dongle/dongle0/133${speeddial},,m,,,1,,,,)
exten => 348,n,Hangup()

TOP

本帖最後由 ckleea 於 2011-6-18 21:27 編輯

Another trick:

This is to set up a remote trunk IP01 (asterisk 1.4) to dial my asterisk server (1.8) with gtalk and google voice out. The aim is to use specific GV account to dial out so that the caller ID will be correct.

In asterisk server set up a calling rule for the user at remote side

[CallingRule_usergv]
exten => _813XXXXXXXXXX,1,Dial(gtalk/user/+1${EXTEN:3}@voice.google.com)

user is set up in jabber.conf as

[user]
type = client
serverhost = talk.google.com
username = username@gmail.com/Talk
secret = password
port = 5222
usetls = yes
usesasl = yes
statusmessage = "Hi, I am user."
timeout = 100

AT IP01, since it does not have gtalk/jabber module. I have to bridge the call to my asterisk server and dial via an account belong to user i.e. maintain proper caller ID

I have a US calling rule as
exten=_001XXXXXXXXXX,1,Macro(superdial,SIP/813${EXTEN:3}@sipns,,m,,,1,,,,)
exten=_001XXXXXXXXXX,n,Macro(superdial,SIP/**1${EXTEN:2}@obitrunk,,m,,,1,,,,)
exten=_001XXXXXXXXXX,n,Hangup()

In this calling rule, when I dial a US number 0012345678900, the first line will change the number as 8132345678900 and pass to the sip trunk sipns; then my asterisk server responds and using callingrule_usergv, it then dials via a specific account as

gtalk/user/12345678900@voice.google.com

in my server CLI, I can use the call is made by user@gmail.com and hence its callerID is brought together.

TOP

返回列表