Убйте меня но я никак не пойму почему у меня ни один транк не работает кроме сипнета! есть профайдер дал хост логин пароль всё! ввожу эти данные в сип телефон и все работает как часы а создаю транк нифига не работает сил уже нету больше суток не сплю мучаюсь помогайте...(
транк
при звонке
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [89162679799@from-internal:1] Macro("SIP/306-0000001b", "user-callerid,SKIPTTL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/306-0000001b", "AMPUSER=306") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/306-0000001b", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/306-0000001b", "1?Set(REALCALLERIDNUM=306)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/306-0000001b", "AMPUSER=306") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/306-0000001b", "AMPUSERCIDNAME=Dmitry Pugachev") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/306-0000001b", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/306-0000001b", "AMPUSERCID=306") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/306-0000001b", "CALLERID(all)="Dmitry Pugachev" <306>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/306-0000001b", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/306-0000001b", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/306-0000001b", "Using CallerID "Dmitry Pugachev" <306>") in new stack
-- Executing [89162679799@from-internal:2] Set("SIP/306-0000001b", "_NODEST=") in new stack
-- Executing [89162679799@from-internal:3] Macro("SIP/306-0000001b", "record-enable,306,OUT,") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/306-0000001b", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("SIP/306-0000001b", "0?MacroExit()") in new stack
-- Executing [s@macro-record-enable:5] GotoIf("SIP/306-0000001b", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,15)
-- Executing [s@macro-record-enable:15] GotoIf("SIP/306-0000001b", "0?IN") in new stack
-- Executing [s@macro-record-enable:16] ExecIf("SIP/306-0000001b", "1?MacroExit()") in new stack
-- Executing [89162679799@from-internal:4] Macro("SIP/306-0000001b", "dialout-trunk,3,89162679799,,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/306-0000001b", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/306-0000001b", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/306-0000001b", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/306-0000001b", "DIAL_NUMBER=89162679799") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/306-0000001b", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/306-0000001b", "OUTBOUND_GROUP=OUT_3") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/306-0000001b", "0?nomax") in new stack
-- Executing [s@macro-dialout-trunk:8] GotoIf("SIP/306-0000001b", "0?chanfull") in new stack
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/306-0000001b", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/306-0000001b", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/306-0000001b", "outbound-callerid,3") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/306-0000001b", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/306-0000001b", "0?Set(REALCALLERIDNUM=306)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/306-0000001b", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/306-0000001b", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/306-0000001b", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/306-0000001b", "TRUNKOUTCID=6628") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/306-0000001b", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/306-0000001b", "1?Set(CALLERID(all)=6628)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/306-0000001b", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/306-0000001b", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/306-0000001b", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/306-0000001b", "1?AGI(fixlocalprefix)") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
== fixlocalprefix: Dialpattern . matched. 89162679799 -> 89162679799
-- <SIP/306-0000001b>AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/306-0000001b", "OUTNUM=89162679799") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/306-0000001b", "custom=SIP/mcm") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/306-0000001b", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/306-0000001b", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/306-0000001b", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/306-0000001b", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/306-0000001b", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/306-0000001b", "SIP/mcm/89162679799,300,") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called mcm/89162679799
висит на этом секунд 20-30 и потом
-- SIP/mcm-0000001c is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [s@macro-dialout-trunk:20] NoOp("SIP/306-0000001b", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 0") in new stack
-- Executing [s@macro-dialout-trunk:21] Goto("SIP/306-0000001b", "s-CONGESTION,1") in new stack
-- Goto (macro-dialout-trunk,s-CONGESTION,1)
-- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("SIP/306-0000001b", "RC=0") in new stack
-- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("SIP/306-0000001b", "0,1") in new stack
-- Goto (macro-dialout-trunk,0,1)
-- Executing [0@macro-dialout-trunk:1] Goto("SIP/306-0000001b", "continue,1") in new stack
-- Goto (macro-dialout-trunk,continue,1)
-- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/306-0000001b", "1?noreport") in new stack
-- Goto (macro-dialout-trunk,continue,3)
-- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/306-0000001b", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 0 - failing through to other trunks") in new stack
-- Executing [continue@macro-dialout-trunk:4] Set("SIP/306-0000001b", "CALLERID(number)=306") in new stack
-- Executing [89162679799@from-internal:5] Macro("SIP/306-0000001b", "outisbusy,") in new stack
-- Executing [s@macro-outisbusy:1] Progress("SIP/306-0000001b", "") in new stack
-- Executing [s@macro-outisbusy:2] GotoIf("SIP/306-0000001b", "0?emergency,1") in new stack
-- Executing [s@macro-outisbusy:3] GotoIf("SIP/306-0000001b", "0?intracompany,1") in new stack
-- Executing [s@macro-outisbusy:4] Playback("SIP/306-0000001b", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
-- <SIP/306-0000001b> Playing 'all-circuits-busy-now.gsm' (language 'en')
-- <SIP/306-0000001b> Playing 'pls-try-call-later.gsm' (language 'en')
-- Executing [s@macro-outisbusy:5] Congestion("SIP/306-0000001b", "20") in new stack
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'SIP/306-0000001b' in macro 'outisbusy'
== Spawn extension (from-internal, 89162679799, 5) exited non-zero on 'SIP/306-0000001b'
-- Executing [h@from-internal:1] Macro("SIP/306-0000001b", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/306-0000001b", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] NoOp("SIP/306-0000001b", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/306-0000001b", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/306-0000001b", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,10)
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/306-0000001b", "1?theend") in new stack
-- Goto (macro-hangupcall,s,12)
-- Executing [s@macro-hangupcall:12] Hangup("SIP/306-0000001b", "") in new stack
== Spawn extension (macro-hangupcall, s, 12) exited non-zero on 'SIP/306-0000001b' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/306-0000001b'
вот еще логи
elastix*CLI> sip show peers like sipnet
Name/username Host Dyn Nat ACL Port Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
elastix*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
86.110.4.148:5060 N HellKlUsov1 120 Request Sent
1 SIP registrations.
вижу что не регается но почему хз.
вот sip.conf
vmexten=*97
faxdetect=yes
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
limitonpeers=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
disallow=all
allow=ulaw
allow=gsm
allow=alaw
jbenable=no
rtptimeout=30
maxexpiry=3600
allowguest=yes
defaultexpiry=120
minexpiry=60
srvlookup=no
registerattempts=0
registertimeout=20
notifyhold=yes
g726nonstandard=no
t38pt_udptl=no
videosupport=no
maxcallbitrate=384
canreinvite=no
rtpholdtimeout=300
rtpkeepalive=0
checkmwi=10
notifyringing=yes
nat=yes
externip=213.247.249.2
localnet=192.168.9.0/255.255.255.0
очень хочется спать а пока не доделаю не вариант)))) помогите пжалуста...
профайдер = провайдер
conext = context
86.110.4.148 не равно 95.128.xx.xx
nat=yes тут не нужен
зарегестрируйте нормально транк
укажите fromdomain и host правильными.
да. и в dialrules впишите вместо "." -> "X."
да уже нормально регится
elastix*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
86.110.4.148:5060 N HellKlUsov1 285 Registered Thu, 01 Sep 2011 21:43:56
1 SIP registrations.
но току мало )
В итоге оказалось что мало просто прокинуть порты из вне до астериска чтобы пакеты от провайдера правильно маршрутизировались до астериска через нат! В моем случае в роли роутера выступает FreeBSD 8.2 за фаирвол и нат отвечает PF и в конфиге pf нужно было прописать не просто нат а бинат) вот такой строкой:
binat on $ext_if inet from $voip_server to any -> $ext_ip0
где
$ext_if- внешний интерфейс откуда берем интернет
$voip_server– адрес Астериска в локальной сети
$ext_ip0 – внешний ip адрес
после этого в момент все заработало...
Тести смотри.
Задан: 2011-09-01 19:10:55 +0400
Просмотрен: 9,833 раз
Обновлен: Mar 26 '12
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.