Страница 1 из 1

freepbx + Мегафон

Добавлено: 30 авг 2022, 12:38
Alekc7227
Здравствуйте! Мне двадцать лет, я бородат, живу с мамой, тролль, лжец и девственник. Вот и сейчас... P.S. Извените за неровный почерк.. Вторую неделю настраиваю соединение между ВАТС Мегафон и Freepbx. Sip- транк поднял. Исходящие звонки с Freepbx на все внутренние номера ВАТС Мегафон проходят. а с Мегафона почему то все звонки приходят на один номер, не зависимо какой номер Freepbx набран.
Настройки Freepbx:

Исходящие.
host=vatsхххххх.megapbx.ru
username=pbx_sip_х@хххххх.megapbx.ru
secret=***********
type=peer
nat=yes
context=from-trunk
canreinvite=no
disallow=all
allow=alaw&ulaw&g729
insecure=invite
fromuser=pbx_sip_х@хххххх.megapbx.ru
fromdomain=vvatsхххххх.megapbx.ru
qualify=yes
faxdetect=yes
minexpiry=300
trunkname=pbx_sip_х@хххххх.megapbx.ru
dtmfmode=rfc2833
hassip=yes
hasiax=no
hash323=no

Входящие
secret=***********
type=user
context=from-trunk

pbx_sip_х@vatsхххххх.megapbx.ru:secret@vatsхххххх.megapbx.ru:5060/pbx_sip_0

Подскажите где и что посмотреть.

Re: freepbx + Мегафон

Добавлено: 30 авг 2022, 15:28
ded
asterisk -vvvvr
покажет при входящем вызове что происходит. Возможно приход Мегафона где все звонки приходят на один внутренний номер так сконфигурен на самой виртуальной АТС Мегафона.

Re: freepbx + Мегафон

Добавлено: 01 сен 2022, 07:15
Alekc7227
Трейс звонка с Мегафона на Freehbx.



== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
> 0x2e15e80 -- Strict RTP learning after remote address set to: 193.201.230.146:46430
-- Executing [pbx_sip_0@from-trunk:1] NoOp("SIP/Megafon-0000002e", "Catch-All DID Match - Found pbx_sip_0 - You probably want a DID for this.") in new stack
-- Executing [pbx_sip_0@from-trunk:2] Set("SIP/Megafon-0000002e", "__FROM_DID=pbx_sip_0") in new stack
-- Executing [pbx_sip_0@from-trunk:3] Goto("SIP/Megafon-0000002e", "ext-did,s,1") in new stack
-- Goto (ext-did,s,1)
-- Executing [s@ext-did:1] Set("SIP/Megafon-0000002e", "__DIRECTION=INBOUND") in new stack
-- Executing [s@ext-did:2] Gosub("SIP/Megafon-0000002e", "sub-record-check,s,1(in,s,force)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/Megafon-0000002e", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("SIP/Megafon-0000002e", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("SIP/Megafon-0000002e", "NOW=1662004843") in new stack
-- Executing [s@sub-record-check:4] Set("SIP/Megafon-0000002e", "__DAY=01") in new stack
-- Executing [s@sub-record-check:5] Set("SIP/Megafon-0000002e", "__MONTH=09") in new stack
-- Executing [s@sub-record-check:6] Set("SIP/Megafon-0000002e", "__YEAR=2022") in new stack
-- Executing [s@sub-record-check:7] Set("SIP/Megafon-0000002e", "__TIMESTR=20220901-080043") in new stack
-- Executing [s@sub-record-check:8] Set("SIP/Megafon-0000002e", "__FROMEXTEN=unknown") in new stack
-- Executing [s@sub-record-check:9] Set("SIP/Megafon-0000002e", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("SIP/Megafon-0000002e", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/Megafon-0000002e", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/Megafon-0000002e", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/Megafon-0000002e", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/Megafon-0000002e", "2?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("SIP/Megafon-0000002e", "1?sub-record-check,in,1") in new stack
-- Goto (sub-record-check,in,1)
-- Executing [in@sub-record-check:1] NoOp("SIP/Megafon-0000002e", "Inbound Recording Check to s") in new stack
-- Executing [in@sub-record-check:2] Set("SIP/Megafon-0000002e", "FROMEXTEN=unknown") in new stack
-- Executing [in@sub-record-check:3] ExecIf("SIP/Megafon-0000002e", "3?Set(FROMEXTEN=776)") in new stack
-- Executing [in@sub-record-check:4] Gosub("SIP/Megafon-0000002e", "recordcheck,1(force,in,s)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/Megafon-0000002e", "Starting recording check against force") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/Megafon-0000002e", "force") in new stack
-- Goto (sub-record-check,recordcheck,5)
-- Executing [recordcheck@sub-record-check:5] Set("SIP/Megafon-0000002e", "__REC_POLICY_MODE=FORCE") in new stack
-- Executing [recordcheck@sub-record-check:6] GotoIf("SIP/Megafon-0000002e", "1?startrec") in new stack
-- Goto (sub-record-check,recordcheck,16)
-- Executing [recordcheck@sub-record-check:16] NoOp("SIP/Megafon-0000002e", "Starting recording: in, s") in new stack
-- Executing [recordcheck@sub-record-check:17] Set("SIP/Megafon-0000002e", "__CALLFILENAME=in-s-776-20220901-080043-1662004842.46") in new stack
-- Executing [recordcheck@sub-record-check:18] MixMonitor("SIP/Megafon-0000002e", "2022/09/01/in-s-776-20220901-080043-1662004842.46.wav,abi(LOCAL_MIXMON_ID),") in new stack
-- Executing [recordcheck@sub-record-check:19] Set("SIP/Megafon-0000002e", "__MIXMON_ID=0x7f716c08aa50") in new stack
-- Executing [recordcheck@sub-record-check:20] Set("SIP/Megafon-0000002e", "__RECORD_ID=SIP/Megafon-0000002e") in new stack
-- Executing [recordcheck@sub-record-check:21] Set("SIP/Megafon-0000002e", "__REC_STATUS=RECORDING") in new stack
-- Executing [recordcheck@sub-record-check:22] Set("SIP/Megafon-0000002e", "CDR(recordingfile)=in-s-776-20220901-080043-1662004842.46.wav") in new stack
-- Executing [recordcheck@sub-record-check:23] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [in@sub-record-check:5] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@ext-did:3] Set("SIP/Megafon-0000002e", "CHANNEL(tonezone)=ru") in new stack
-- Executing [s@ext-did:4] ExecIf("SIP/Megafon-0000002e", "0?Set(__FROM_DID=s)") in new stack
-- Executing [s@ext-did:5] Set("SIP/Megafon-0000002e", "returnhere=1") in new stack
-- Executing [s@ext-did:6] Gosub("SIP/Megafon-0000002e", "app-blacklist-check,s,1()") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/Megafon-0000002e", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("SIP/Megafon-0000002e", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@ext-did:7] Set("SIP/Megafon-0000002e", "CDR(did)=pbx_sip_0") in new stack
-- Executing [s@ext-did:8] GotoIf("SIP/Megafon-0000002e", "0?") in new stack
-- Executing [s@ext-did:9] ExecIf("SIP/Megafon-0000002e", "0 ?Set(CALLERID(name)=776)") in new stack
-- Executing [s@ext-did:10] Set("SIP/Megafon-0000002e", "__MOHCLASS=") in new stack
-- Executing [s@ext-did:11] Ringing("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@ext-did:12] Set("SIP/Megafon-0000002e", "__RINGINGSENT=TRUE") in new stack
-- Executing [s@ext-did:13] Set("SIP/Megafon-0000002e", "__REVERSAL_REJECT=TRUE") in new stack
-- Executing [s@ext-did:14] GotoIf("SIP/Megafon-0000002e", "0?post-reverse-charge") in new stack
[2022-09-01 08:00:43] WARNING[11019][C-0000001c]: func_channel.c:460 func_channel_read: Unknown or unavailable item requested: 'reversecharge'
-- Executing [s@ext-did:15] GotoIf("SIP/Megafon-0000002e", "0?macro-hangupcall") in new stack
-- Executing [s@ext-did:16] NoOp("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@ext-did:17] Set("SIP/Megafon-0000002e", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
-- Executing [s@ext-did:18] Set("SIP/Megafon-0000002e", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
-- Executing [s@ext-did:19] Set("SIP/Megafon-0000002e", "CALLERID(name-pres)=allowed_not_screened") in new stack
-- Executing [s@ext-did:20] Set("SIP/Megafon-0000002e", "CALLERID(num-pres)=allowed_not_screened") in new stack
-- Executing [s@ext-did:21] NoOp("SIP/Megafon-0000002e", "CallerID Entry Point") in new stack
-- Executing [s@ext-did:22] Set("SIP/Megafon-0000002e", "__CRM_DIRECTION=INBOUND") in new stack
-- Executing [s@ext-did:23] Set("SIP/Megafon-0000002e", "__CRM_SOURCE=776") in new stack
-- Executing [s@ext-did:24] Set("SIP/Megafon-0000002e", "__CRM_LINKEDID=1662004842.46") in new stack
-- Executing [s@ext-did:25] ExecIf("SIP/Megafon-0000002e", "1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
-- Executing [s@ext-did:26] Goto("SIP/Megafon-0000002e", "from-did-direct,4535,1") in new stack
-- Goto (from-did-direct,4535,1)
-- Executing [4535@from-did-direct:1] GotoIf("SIP/Megafon-0000002e", "1?ext-local,4535,1:followme-check,4535,1") in new stack
-- Goto (ext-local,4535,1)
-- Executing [4535@ext-local:1] Set("SIP/Megafon-0000002e", "__RINGTIMER=15") in new stack
-- Executing [4535@ext-local:2] Macro("SIP/Megafon-0000002e", "exten-vm,novm,4535,0,0,0") in new stack
-- Executing [s@macro-exten-vm:1] Macro("SIP/Megafon-0000002e", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/Megafon-0000002e", "TOUCH_MONITOR=1662004842.46") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/Megafon-0000002e", "AMPUSER=776") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/Megafon-0000002e", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/Megafon-0000002e", "1?Set(REALCALLERIDNUM=776)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/Megafon-0000002e", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/Megafon-0000002e", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/Megafon-0000002e", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:8] ExecIf("SIP/Megafon-0000002e", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:9] GotoIf("SIP/Megafon-0000002e", "1?report") in new stack
-- Goto (macro-user-callerid,s,16)
-- Executing [s@macro-user-callerid:16] NoOp("SIP/Megafon-0000002e", "Macro Depth is 2") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("SIP/Megafon-0000002e", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,18)
-- Executing [s@macro-user-callerid:18] GotoIf("SIP/Megafon-0000002e", "0?continue") in new stack
-- Executing [s@macro-user-callerid:19] ExecIf("SIP/Megafon-0000002e", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
-- Executing [s@macro-user-callerid:20] Set("SIP/Megafon-0000002e", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:21] GotoIf("SIP/Megafon-0000002e", "1?continue") in new stack
-- Goto (macro-user-callerid,s,37)
-- Executing [s@macro-user-callerid:37] Set("SIP/Megafon-0000002e", "CALLERID(number)=776") in new stack
-- Executing [s@macro-user-callerid:38] Set("SIP/Megafon-0000002e", "CALLERID(name)=Мен 3") in new stack
-- Executing [s@macro-user-callerid:39] GotoIf("SIP/Megafon-0000002e", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:40] Set("SIP/Megafon-0000002e", "CDR(cnam)=Мен 3") in new stack
== Begin MixMonitor Recording SIP/Megafon-0000002e
-- Executing [s@macro-user-callerid:41] Set("SIP/Megafon-0000002e", "CDR(cnum)=776") in new stack
-- Executing [s@macro-user-callerid:42] Set("SIP/Megafon-0000002e", "CHANNEL(language)=ru") in new stack
-- Executing [s@macro-exten-vm:2] Set("SIP/Megafon-0000002e", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("SIP/Megafon-0000002e", "__EXTTOCALL=4535") in new stack
-- Executing [s@macro-exten-vm:4] Set("SIP/Megafon-0000002e", "__PICKUPMARK=4535") in new stack
-- Executing [s@macro-exten-vm:5] Set("SIP/Megafon-0000002e", "RT=") in new stack
-- Executing [s@macro-exten-vm:6] ExecIf("SIP/Megafon-0000002e", "0?Macro(vm,novm,DIRECTDIAL,)") in new stack
-- Executing [s@macro-exten-vm:7] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
-- Executing [s@macro-exten-vm:8] ExecIf("SIP/Megafon-0000002e", "0?Gosub(ext-intercom,*804535,1())") in new stack
-- Executing [s@macro-exten-vm:9] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
-- Executing [s@macro-exten-vm:10] ExecIf("SIP/Megafon-0000002e", "0?ChanSpy(SIP/4535,q)") in new stack
-- Executing [s@macro-exten-vm:11] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
-- Executing [s@macro-exten-vm:12] ExecIf("SIP/Megafon-0000002e", "0?Macro(vm,novm,DIRECTDIAL,)") in new stack
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
-- Executing [s@macro-exten-vm:13] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
-- Executing [s@macro-exten-vm:14] ExecIf("SIP/Megafon-0000002e", "0?Gosub(ext-intercom,*804535,1())") in new stack
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
-- Executing [s@macro-exten-vm:15] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
-- Executing [s@macro-exten-vm:16] ExecIf("SIP/Megafon-0000002e", "0?ChanSpy(SIP/4535,q)") in new stack
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
-- Executing [s@macro-exten-vm:17] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
[2022-09-01 08:00:43] ERROR[11019][C-0000001c]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
-- Executing [s@macro-exten-vm:18] Gosub("SIP/Megafon-0000002e", "sub-record-check,s,1(exten,4535,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/Megafon-0000002e", "3?initialized") in new stack
-- Goto (sub-record-check,s,10)
-- Executing [s@sub-record-check:10] NoOp("SIP/Megafon-0000002e", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/Megafon-0000002e", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/Megafon-0000002e", "REC_POLICY_MODE_SAVE=FORCE") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/Megafon-0000002e", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/Megafon-0000002e", "5?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("SIP/Megafon-0000002e", "1?sub-record-check,exten,1") in new stack
-- Goto (sub-record-check,exten,1)
-- Executing [exten@sub-record-check:1] NoOp("SIP/Megafon-0000002e", "Exten Recording Check between 776 and 4535") in new stack
-- Executing [exten@sub-record-check:2] Set("SIP/Megafon-0000002e", "CALLTYPE=external") in new stack
-- Executing [exten@sub-record-check:3] ExecIf("SIP/Megafon-0000002e", "0?Set(CALLTYPE=)") in new stack
-- Executing [exten@sub-record-check:4] Set("SIP/Megafon-0000002e", "CALLEE=dontcare") in new stack
-- Executing [exten@sub-record-check:5] ExecIf("SIP/Megafon-0000002e", "0?Set(CALLEE=dontcare)") in new stack
-- Executing [exten@sub-record-check:6] GotoIf("SIP/Megafon-0000002e", "1?callee") in new stack
-- Goto (sub-record-check,exten,11)
-- Executing [exten@sub-record-check:11] Gosub("SIP/Megafon-0000002e", "recordcheck,1(dontcare,external,4535)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/Megafon-0000002e", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/Megafon-0000002e", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [exten@sub-record-check:12] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@macro-exten-vm:19] GotoIf("SIP/Megafon-0000002e", "1?macrodial") in new stack
-- Goto (macro-exten-vm,s,25)
-- Executing [s@macro-exten-vm:25] GosubIf("SIP/Megafon-0000002e", "0?clrheader,1()") in new stack
-- Executing [s@macro-exten-vm:26] Macro("SIP/Megafon-0000002e", "dial-one,,HhTtr,4535") in new stack
-- Executing [s@macro-dial-one:1] Set("SIP/Megafon-0000002e", "DEXTEN=4535") in new stack
-- Executing [s@macro-dial-one:2] Set("SIP/Megafon-0000002e", "__CRM_SOURCE=776") in new stack
-- Executing [s@macro-dial-one:3] ExecIf("SIP/Megafon-0000002e", "0?Set(__EXTTOCALL=4535)") in new stack
-- Executing [s@macro-dial-one:4] Set("SIP/Megafon-0000002e", "DIALSTATUS_CW=") in new stack
-- Executing [s@macro-dial-one:5] GosubIf("SIP/Megafon-0000002e", "0?screen,1()") in new stack
-- Executing [s@macro-dial-one:6] GosubIf("SIP/Megafon-0000002e", "0?cf,1()") in new stack
-- Executing [s@macro-dial-one:7] GotoIf("SIP/Megafon-0000002e", "1?skip1") in new stack
-- Goto (macro-dial-one,s,10)
-- Executing [s@macro-dial-one:10] GotoIf("SIP/Megafon-0000002e", "0?nodial") in new stack
-- Executing [s@macro-dial-one:11] GotoIf("SIP/Megafon-0000002e", "0?continue") in new stack
-- Executing [s@macro-dial-one:12] Set("SIP/Megafon-0000002e", "EXTHASCW=ENABLED") in new stack
-- Executing [s@macro-dial-one:13] GotoIf("SIP/Megafon-0000002e", "0?next1:cwinusebusy") in new stack
-- Goto (macro-dial-one,s,25)
-- Executing [s@macro-dial-one:25] GotoIf("SIP/Megafon-0000002e", "0?next3:continue") in new stack
-- Goto (macro-dial-one,s,27)
-- Executing [s@macro-dial-one:27] GotoIf("SIP/Megafon-0000002e", "0?nodial") in new stack
-- Executing [s@macro-dial-one:28] GosubIf("SIP/Megafon-0000002e", "1?dstring,1():dlocal,1()") in new stack
-- Executing [dstring@macro-dial-one:1] Set("SIP/Megafon-0000002e", "DSTRING=") in new stack
-- Executing [dstring@macro-dial-one:2] Set("SIP/Megafon-0000002e", "DEVICES=4535") in new stack
-- Executing [dstring@macro-dial-one:3] ExecIf("SIP/Megafon-0000002e", "0?Return()") in new stack
-- Executing [dstring@macro-dial-one:4] ExecIf("SIP/Megafon-0000002e", "0?Set(DEVICES=535)") in new stack
-- Executing [dstring@macro-dial-one:5] Set("SIP/Megafon-0000002e", "LOOPCNT=1") in new stack
-- Executing [dstring@macro-dial-one:6] Set("SIP/Megafon-0000002e", "ITER=1") in new stack
-- Executing [dstring@macro-dial-one:7] Set("SIP/Megafon-0000002e", "THISDIAL=SIP/4535") in new stack
-- Executing [dstring@macro-dial-one:8] GosubIf("SIP/Megafon-0000002e", "1?zap2dahdi,1()") in new stack
-- Executing [zap2dahdi@macro-dial-one:1] ExecIf("SIP/Megafon-0000002e", "0?Return()") in new stack
-- Executing [zap2dahdi@macro-dial-one:2] Set("SIP/Megafon-0000002e", "NEWDIAL=") in new stack
-- Executing [zap2dahdi@macro-dial-one:3] Set("SIP/Megafon-0000002e", "LOOPCNT2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:4] Set("SIP/Megafon-0000002e", "ITER2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:5] Set("SIP/Megafon-0000002e", "THISPART2=SIP/4535") in new stack
-- Executing [zap2dahdi@macro-dial-one:6] ExecIf("SIP/Megafon-0000002e", "0?Set(THISPART2=DAHDI/4535)") in new stack
-- Executing [zap2dahdi@macro-dial-one:7] Set("SIP/Megafon-0000002e", "NEWDIAL=SIP/4535&") in new stack
-- Executing [zap2dahdi@macro-dial-one:8] Set("SIP/Megafon-0000002e", "ITER2=2") in new stack
-- Executing [zap2dahdi@macro-dial-one:9] GotoIf("SIP/Megafon-0000002e", "0?begin2") in new stack
-- Executing [zap2dahdi@macro-dial-one:10] Set("SIP/Megafon-0000002e", "THISDIAL=SIP/4535") in new stack
-- Executing [zap2dahdi@macro-dial-one:11] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [dstring@macro-dial-one:9] GotoIf("SIP/Megafon-0000002e", "1?docheck") in new stack
-- Goto (macro-dial-one,dstring,15)
-- Executing [dstring@macro-dial-one:15] GotoIf("SIP/Megafon-0000002e", "0?skipset") in new stack
-- Executing [dstring@macro-dial-one:16] Set("SIP/Megafon-0000002e", "DSTRING=SIP/4535&") in new stack
-- Executing [dstring@macro-dial-one:17] Set("SIP/Megafon-0000002e", "ITER=2") in new stack
-- Executing [dstring@macro-dial-one:18] GotoIf("SIP/Megafon-0000002e", "0?begin") in new stack
-- Executing [dstring@macro-dial-one:19] ExecIf("SIP/Megafon-0000002e", "0?Return()") in new stack
-- Executing [dstring@macro-dial-one:20] Set("SIP/Megafon-0000002e", "DSTRING=SIP/4535") in new stack
-- Executing [dstring@macro-dial-one:21] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@macro-dial-one:29] GotoIf("SIP/Megafon-0000002e", "0?nodial") in new stack
-- Executing [s@macro-dial-one:30] GotoIf("SIP/Megafon-0000002e", "0?skiptrace") in new stack
-- Executing [s@macro-dial-one:31] GosubIf("SIP/Megafon-0000002e", "1?ctset,1():ctclear,1()") in new stack
-- Executing [ctset@macro-dial-one:1] Set("SIP/Megafon-0000002e", "DB(CALLTRACE/4535)=776") in new stack
-- Executing [ctset@macro-dial-one:2] Return("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@macro-dial-one:32] Set("SIP/Megafon-0000002e", "D_OPTIONS=HhTtr") in new stack
-- Executing [s@macro-dial-one:33] GosubIf("SIP/Megafon-0000002e", "0?func-set-sipheader,s,1(Alert-Info,)") in new stack
-- Executing [s@macro-dial-one:34] NoOp("SIP/Megafon-0000002e", "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
-- Executing [s@macro-dial-one:35] ExecIf("SIP/Megafon-0000002e", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial-one:36] ExecIf("SIP/Megafon-0000002e", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial-one:37] ExecIf("SIP/Megafon-0000002e", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial-one:38] ExecIf("SIP/Megafon-0000002e", "0?Set(ALERT_INFO=Normal;volume=)") in new stack
-- Executing [s@macro-dial-one:39] ExecIf("SIP/Megafon-0000002e", "0?Set(ALERT_INFO=Normal;volume=)") in new stack
-- Executing [s@macro-dial-one:40] GosubIf("SIP/Megafon-0000002e", "0?func-set-sipheader,s,1(Alert-Info,)") in new stack
-- Executing [s@macro-dial-one:41] ExecIf("SIP/Megafon-0000002e", "0?Set(CHANNEL(musicclass)=)") in new stack
-- Executing [s@macro-dial-one:42] GosubIf("SIP/Megafon-0000002e", "0?qwait,1()") in new stack
-- Executing [s@macro-dial-one:43] Set("SIP/Megafon-0000002e", "__CWIGNORE=") in new stack
-- Executing [s@macro-dial-one:44] Set("SIP/Megafon-0000002e", "__KEEPCID=TRUE") in new stack
-- Executing [s@macro-dial-one:45] GotoIf("SIP/Megafon-0000002e", "0?usegoto,1") in new stack
-- Executing [s@macro-dial-one:46] GotoIf("SIP/Megafon-0000002e", "1?godial") in new stack
-- Goto (macro-dial-one,s,51)
-- Executing [s@macro-dial-one:51] Macro("SIP/Megafon-0000002e", "dialout-one-predial-hook,") in new stack
-- Executing [s@macro-dialout-one-predial-hook:1] MacroExit("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@macro-dial-one:52] ExecIf("SIP/Megafon-0000002e", "1?Set(D_OPTIONS=HhtrI)") in new stack
-- Executing [s@macro-dial-one:53] NoOp("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@macro-dial-one:54] ExecIf("SIP/Megafon-0000002e", "0?Set(D_OPTIONS=HhtrIg)") in new stack
-- Executing [s@macro-dial-one:55] Dial("SIP/Megafon-0000002e", "SIP/4535,,HhtrIb(func-apply-sipheaders^s^1)") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- SIP/4535-0000002f Internal Gosub(func-apply-sipheaders,s,1) start
-- Executing [s@func-apply-sipheaders:1] ExecIf("SIP/4535-0000002f", "1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
-- Executing [s@func-apply-sipheaders:2] NoOp("SIP/4535-0000002f", "Applying SIP Headers to channel SIP/4535-0000002f") in new stack
-- Executing [s@func-apply-sipheaders:3] Set("SIP/4535-0000002f", "TECH=SIP") in new stack
-- Executing [s@func-apply-sipheaders:4] Set("SIP/4535-0000002f", "SIPHEADERKEYS=") in new stack
-- Executing [s@func-apply-sipheaders:5] While("SIP/4535-0000002f", "0") in new stack
-- Jumping to priority 12
-- Executing [s@func-apply-sipheaders:13] Return("SIP/4535-0000002f", "") in new stack
== Spawn extension (from-internal, 4535, 1) exited non-zero on 'SIP/4535-0000002f'
-- SIP/4535-0000002f Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
-- Called SIP/4535
-- Connected line update to SIP/Megafon-0000002e prevented.
-- SIP/4535-0000002f is ringing
-- Got SIP response 486 "Busy Here" back from 192.168.1.45:64547
-- SIP/4535-0000002f is busy
-- SIP/4535-0000002f Internal Gosub(crm-hangup,s,1) start
-- Executing [s@crm-hangup:1] NoOp("SIP/4535-0000002f", "Sending Hangup to CRM") in new stack
-- Executing [s@crm-hangup:2] NoOp("SIP/4535-0000002f", "HANGUP CAUSE: 17") in new stack
-- Executing [s@crm-hangup:3] ExecIf("SIP/4535-0000002f", "0?Set(__CRM_VOICEMAIL=)") in new stack
-- Executing [s@crm-hangup:4] NoOp("SIP/4535-0000002f", "MASTER CHANNEL: 1662004843.47 = 1662004842.46") in new stack
-- Executing [s@crm-hangup:5] GotoIf("SIP/4535-0000002f", "1?return") in new stack
-- Goto (crm-hangup,s,8)
-- Executing [s@crm-hangup:8] Return("SIP/4535-0000002f", "") in new stack
== Spawn extension (from-internal, 4535, 1) exited non-zero on 'SIP/4535-0000002f'
-- SIP/4535-0000002f Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
== Everyone is busy/congested at this time (1:1/0/0)
-- Executing [s@macro-dial-one:56] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
-- Executing [s@macro-dial-one:57] ExecIf("SIP/Megafon-0000002e", "0?Set(DIALSTATUS=)") in new stack
-- Executing [s@macro-dial-one:58] GosubIf("SIP/Megafon-0000002e", "0?s-BUSY,1()") in new stack
-- Executing [s@macro-dial-one:59] MacroExit("SIP/Megafon-0000002e", "") in new stack
-- Executing [s@macro-exten-vm:27] Set("SIP/Megafon-0000002e", "SV_DIALSTATUS=BUSY") in new stack
-- Executing [s@macro-exten-vm:28] GosubIf("SIP/Megafon-0000002e", "0?docfu,1()") in new stack
-- Executing [s@macro-exten-vm:29] GosubIf("SIP/Megafon-0000002e", "0?docfb,1()") in new stack
-- Executing [s@macro-exten-vm:30] Set("SIP/Megafon-0000002e", "DIALSTATUS=BUSY") in new stack
-- Executing [s@macro-exten-vm:31] ExecIf("SIP/Megafon-0000002e", "0?MacroExit()") in new stack
-- Executing [s@macro-exten-vm:32] GotoIf("SIP/Megafon-0000002e", "1?s-BUSY,1") in new stack
-- Goto (macro-exten-vm,s-BUSY,1)
-- Executing [s-BUSY@macro-exten-vm:1] GotoIf("SIP/Megafon-0000002e", "0?exit,1") in new stack
-- Executing [s-BUSY@macro-exten-vm:2] PlayTones("SIP/Megafon-0000002e", "busy") in new stack
[2022-09-01 08:00:47] WARNING[11019][C-0000001c]: translate.c:407 framein: no samples for alawtolin
-- Executing [s-BUSY@macro-exten-vm:3] Busy("SIP/Megafon-0000002e", "20") in new stack
== Spawn extension (macro-exten-vm, s-BUSY, 3) exited non-zero on 'SIP/Megafon-0000002e' in macro 'exten-vm'
== Spawn extension (ext-local, 4535, 2) exited non-zero on 'SIP/Megafon-0000002e'
-- Executing [h@ext-local:1] Macro("SIP/Megafon-0000002e", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/Megafon-0000002e", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/Megafon-0000002e", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] NoOp("SIP/Megafon-0000002e", " montior file= /var/spool/asterisk/monitor/2022/09/01/in-s-776-20220901-080043-1662004842.46.wav") in new stack
-- Executing [s@macro-hangupcall:5] GotoIf("SIP/Megafon-0000002e", "1?skipagi") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] Hangup("SIP/Megafon-0000002e", "") in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'SIP/Megafon-0000002e' in macro 'hangupcall'
== Spawn extension (ext-local, h, 1) exited non-zero on 'SIP/Megafon-0000002e'
-- SIP/Megafon-0000002e Internal Gosub(crm-hangup,s,1) start
-- Executing [s@crm-hangup:1] NoOp("SIP/Megafon-0000002e", "Sending Hangup to CRM") in new stack
-- Executing [s@crm-hangup:2] NoOp("SIP/Megafon-0000002e", "HANGUP CAUSE: 17") in new stack
-- Executing [s@crm-hangup:3] ExecIf("SIP/Megafon-0000002e", "0?Set(__CRM_VOICEMAIL=)") in new stack
-- Executing [s@crm-hangup:4] NoOp("SIP/Megafon-0000002e", "MASTER CHANNEL: 1662004842.46 = 1662004842.46") in new stack
-- Executing [s@crm-hangup:5] GotoIf("SIP/Megafon-0000002e", "0?return") in new stack
-- Executing [s@crm-hangup:6] Set("SIP/Megafon-0000002e", "__CRM_HANGUP=1") in new stack
-- Executing [s@crm-hangup:7] AGI("SIP/Megafon-0000002e", "sangomacrm.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
-- <SIP/Megafon-0000002e>AGI Script sangomacrm.agi completed, returning 0
-- Executing [s@crm-hangup:8] Return("SIP/Megafon-0000002e", "") in new stack
== Spawn extension (ext-local, h, 1) exited non-zero on 'SIP/Megafon-0000002e'
-- SIP/Megafon-0000002e Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
== MixMonitor close filestream (mixed)
== End MixMonitor Recording SIP/Megafon-0000002e

Re: freepbx + Мегафон

Добавлено: 01 сен 2022, 07:26
Alekc7227
дамп звонка с Wireshark

Re: freepbx + Мегафон

Добавлено: 01 сен 2022, 11:11
ded
asterisk -vvvvr
покажет ВАМ при входящем вызове что происходит.

Разруливание входящих делается по номерам DID в модуле Входящая маршрутизация.
Вы зарегистрировали транк Мегафон на Астериске через юзернейм pbx_sip_0, не используя никакие DID номера. На этот pbx_sip_0 и приходит входящий вызов -
- Executing [pbx_sip_0@from-trunk:1] NoOp("SIP/Megafon-0000002e", "Catch-All DID Match - Found pbx_sip_0 - You probably want a DID for this.") in new stack
Станция даже рекомендует вам указать pbx_sip_0 в качестве DID, конечно это делать не нужно.
Ищите примеры регистрации разных номеров.

Надо учится анализировать, а не просто копипастить сюда. Иначе - в раздел Бизнес, платная поддержка.

Re: freepbx + Мегафон

Добавлено: 06 янв 2023, 14:31
Zavr2008
Апну топик этот - у клиента обратная проблема - звонки с FreePBX на ВАТС Мегафон, отлупливают они инвайты. Подключили их опцию "Большой бизнес", зарегали транк. В обратку звонки идут, правда пришлось поколдовать с SIP_HEADER)

Ни у кого нет настроек свежих?

Re: freepbx + Мегафон

Добавлено: 06 янв 2023, 20:16
Zavr2008
Пропустил secret))

Отвечаю сам себе если кому пригодится:

Код: Выделить всё

host=vatsxxxxxx.megapbx.ru
defaultuser=pbx_sip_0
secret=bla-bla-bla
context=from-megafon-vats
type=peer
directmedia=no
disallow=all
allow=alaw
insecure=invite
trunkname=pbx_sip_0
fromdomain=vatsxxxxxx.megapbx.ru
qualify=yes
minexpiry=300
dtmfmode=rfc2833
nat=force_rport,comedia
callbackextension=yes
ну и для входящих extensions_custom.conf:

Код: Выделить всё

[from-megafon-vats]
  exten=>_.,1,Noop(Calling from ${CALLERID(num)} to ${EXTEN}, ${SIP_HEADER(to)})
  same=>n,Set(tonr=${SIP_HEADER(to):5})
  same=>n,Set(var=${SHIFT(tonr,@)})
  same=>n,Goto(from-internal,${var},1)

Re: freepbx + Мегафон

Добавлено: 12 июл 2023, 15:21
Alekc7227
Zavr2008 Большое спасибо. Все заработало.