extensions_custom.conf
[from-internal-custom]
exten => _7XXX,1,Dial(SIP/xxx.com/74951234567,,D(2${EXTEN:1}))
Проблема после выполнения идет отбой, целый день не могу понят в чем дело, отбивает астер.
Может не так или не туда вставляю dial?
cli
== Extension Changed 240[ext-local] new state Idle for Notify User 240
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
== Extension Changed 240[ext-local] new state InUse for Notify User 240
-- Executing [0240@from-internal:1] Dial("SIP/240-0000017b", "SIP/xxx.com/74951234567,,D(2240)") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
-- Called zadorma.com/74957811104
-- SIP/xxx.com-0000017c is ringing
-- SIP/xxx.com-0000017c is making progress passing it to SIP/240-0000017b
-- SIP/xxx.com-0000017c answered SIP/240-0000017b
-- Sending DTMF '2240' to the called party.
-- Executing [h@from-internal:1] Macro("SIP/240-0000017b", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/240-0000017b", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] NoOp("SIP/240-0000017b", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/240-0000017b", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/240-0000017b", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,10)
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/240-0000017b", "1?theend") in new stack
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on 'SIP/240-0000017b' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/240-0000017b'
== Spawn extension (from-internal, 0240, 1) exited non-zero on 'SIP/240-0000017b'
-- Executing [h@from-internal:1] Macro("SIP/240-0000017b", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/240-0000017b", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] NoOp("SIP/240-0000017b", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/240-0000017b", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/240-0000017b", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,10)
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/240-0000017b", "1?theend") in new stack
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on 'SIP/240-0000017b' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/240-0000017b'
== Extension Changed 240[ext-local] new state Idle for Notify User 240
По логам совершенно ясно, что вызов отбивает удаленная АТС. Можно, конечно, пытаться подоборать "правильное" количество пауз, а можно написать запрос в контору с просьбой разобраться с проблемой. В конце концов, это косяк в настройке ИХ станции.
проверьте в настройках peer значение
dtmfmode=rfc2833
так ли оно у Вас?
dtmf debug ыключайте. может он не разрешает переменные например использовать
Всем спасибо, трабла была на стороне офисной АТС... а именно с говорильней...
Уверены что астер отбивает звонок? Включите
sip set debug peer xxx.com
сторона, куда звоните ответила:
Called zadorma.com/74957811104
-- SIP/xxx.com-0000017c is ringing
-- SIP/xxx.com-0000017c is making progress passing it to SIP/240-0000017b
-- SIP/xxx.com-0000017c answered SIP/240-0000017b
но, она же и сообщила:
Found audio description format telephone-event for ID 101
Capabilities: us - 0xd (g723|ulaw|alaw), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
чувствую, что проблема где-то с dtmf, попробуйте поменять dtmfmode в настройке пира
попробуйте вот так
[from-internal-custom]
exten => _7XXX,1,Dial(SIP/xxx.com/74951234567,,D(2#${EXTEN:1}))
или так [from-internal-custom] exten => _7XXX,1,Dial(SIP/xxx.com/74951234567,,D(2www${EXTEN:1}))
Всем огромное спасибо за идеи, но ответ оказался достаточно прост, читайте внимательнее мануал!
exten => _7XXX,2,Dial(SIP/xxx.com/74951234567,50,M(pokrovka)D(ww${EXTEN:1}))
[macro-pokrovka]
exten => s,1,Wait(3) ; Ждем 3 сек
exten => s,n,sendDTMF(2) ; Отправляем 2
exten => s,n,Wait(3) ; Ждем 3 сек
exten => s,n,SetVar(MACRO_RESULT=BRIDGE) ;Соединяем абонентов!
Макросы в команде Dial
Обратите внимание: Если Вы хотите, чтобы оба абонента были соединены по завершению выполнения макроса, вы НЕ ДОЛЖНЫ устанавливать значение переменной MACRORESULT. Если значение MACRORESULT не определено, то после выполнения всех команд макроса до конца, абоненты будут соединены и смогут разговаривать между собой. Установка этой переменной в значения CONTINUE приводит к тому, что абоненты НЕ соединяются между собой, и выполнение команд продолжиться с приоритета n+1, текущего контекста. Конечно же, установка значения в BUSY или GOTO приведет к соответствующему результату (и, естественно, абоненты не будут соединены). (Способ управления соединением абонентов немного противоречит здравому смыслу, при котором ожидается, что причиной "соединения обоих абонентов" должна быть установка переменной MACRO_RESULT в такое значение, как "BRIDGE" или "CONNECT", или во что-то подобное. Тут же в качестве такой причины используется ОТСУТСТВИЕ любого значения этой переменной.)
<------------->
--- (11 headers 0 lines) ---
Transmitting (NAT) to 78.46.xxx.xxx:5060:
ACK sip:74951234567@sip.xxx.com SIP/2.0
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK3d66a260;rport
Max-Forwards: 70
From: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
To: <sip:74951234567@sip.xxx.com>;tag=as7332e815
Contact: <sip:26193@195.90.xxx.xxx>
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 102 ACK
User-Agent: FPBX-2.8.1(1.6.2.13)
Content-Length: 0
---
Audio is at 195.90.xxx.xxx port 14400
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 78.46.xxx.xxx:5060:
INVITE sip:74951234567@sip.xxx.com SIP/2.0
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK4331ae0c;rport
Max-Forwards: 70
From: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
To: <sip:74951234567@sip.xxx.com>
Contact: <sip:26193@195.90.xxx.xxx>
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 103 INVITE
User-Agent: FPBX-2.8.1(1.6.2.13)
Authorization: Digest username="26193", realm="sip.xxx.com", algorithm=MD5, uri="sip:74951234567@sip.xxx.com", nonce="7df1454c", response="8e4345dffdc1942b525e467b04d
1741b"
Date: Sat, 05 Mar 2011 18:50:12 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 265
v=0
o=root 1264701459 1264701460 IN IP4 195.90.xxx.xxx
s=Asterisk PBX 1.6.2.13
c=IN IP4 195.90.xxx.xxx
t=0 0
m=audio 14400 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
---
<--- SIP read from UDP:78.46.xxx.xxx:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK4331ae0c;received=195.90.xxx.xxx;rport=5060
From: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
To: <sip:74951234567@sip.xxx.com>
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 103 INVITE
Server: Xxx Voip
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: <sip:74951234567@78.46.xxx.xxx>
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
<--- SIP read from UDP:78.46.xxx.xxx:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK4331ae0c;received=195.90.xxx.xxx;rport=5060
From: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
To: <sip:74951234567@sip.xxx.com>;tag=as0b489ab6
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 103 INVITE
Server: Xxx Voip
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: <sip:74951234567@78.46.xxx.xxx>
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
<--- SIP read from UDP:78.46.xxx.xxx:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK4331ae0c;received=195.90.xxx.xxx;rport=5060
From: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
To: <sip:74951234567@sip.xxx.com>;tag=as0b489ab6
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 103 INVITE
Server: Xxx Voip
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: <sip:74951234567@78.46.xxx.xxx>
Content-Type: application/sdp
Content-Length: 286
v=0
o=root 401752981 401752981 IN IP4 78.46.xxx.xxx
s=Asterisk PBX 1.6.2.13
c=IN IP4 78.46.xxx.xxx
t=0 0
m=audio 10400 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->
--- (14 headers 13 lines) ---
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0xd (g723|ulaw|alaw), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 78.46.xxx.xxx:10400
-- SIP/zadorma.com-00000184 is ringing
-- SIP/zadorma.com-00000184 is making progress passing it to SIP/240-00000183
<--- SIP read from UDP:78.46.xxx.xxx:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK4331ae0c;received=195.90.xxx.xxx;rport=5060
From: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
To: <sip:74951234567@sip.xxx.com>;tag=as0b489ab6
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 103 INVITE
Server: Xxx Voip
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: <sip:74951234567@78.46.xxx.xxx>
Content-Type: application/sdp
Content-Length: 286
v=0
o=root 401752981 401752982 IN IP4 78.46.xxx.xxx
s=Asterisk PBX 1.6.2.13
c=IN IP4 78.46.xxx.xxx
t=0 0
m=audio 10400 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->
--- (14 headers 13 lines) ---
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0xd (g723|ulaw|alaw), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 78.46.xxx.xxx:10400
list_route: hop: <sip:74951234567@78.46.xxx.xxx>
set_destination: Parsing <sip:74951234567@78.46.xxx.xxx> for address/port to send to
set_destination: set destination to 78.46.xxx.xxx, port 5060
Transmitting (NAT) to 78.46.xxx.xxx:5060:
ACK sip:74951234567@78.46.xxx.xxx SIP/2.0
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK6b34a4a9;rport
Max-Forwards: 70
From: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
To: <sip:74951234567@sip.xxx.com>;tag=as0b489ab6
Contact: <sip:26193@195.90.xxx.xxx>
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 103 ACK
User-Agent: FPBX-2.8.1(1.6.2.13)
Content-Length: 0
---
-- SIP/zadorma.com-00000184 answered SIP/240-00000183
-- Sending DTMF '2240' to the called party.
Reliably Transmitting (NAT) to 78.46.xxx.xxx:5060:
OPTIONS sip:sip.xxx.com SIP/2.0
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK4ec38dd7;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@195.90.xxx.xxx>;tag=as51881757
To: <sip:sip.xxx.com>
Contact: <sip:Unknown@195.90.xxx.xxx>
Call-ID: 0ee141141b0362fd6956dbab37c6dba8@195.90.xxx.xxx
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.6.2.13)
Date: Sat, 05 Mar 2011 18:50:25 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:78.46.xxx.xxx:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 195.90.xxx.xxx:5060;branch=z9hG4bK4ec38dd7;received=195.90.xxx.xxx;rport=5060
From: "Unknown" <sip:Unknown@195.90.xxx.xxx>;tag=as51881757
To: <sip:sip.xxx.com>;tag=as507b44f1
Call-ID: 0ee141141b0362fd6956dbab37c6dba8@195.90.xxx.xxx
CSeq: 102 OPTIONS
Server: Xxx Voip
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
Really destroying SIP dialog '0ee141141b0362fd6956dbab37c6dba8@195.90.xxx.xxx' Method: OPTIONS
<--- SIP read from UDP:78.46.xxx.xxx:5060 --->
BYE sip:26193@195.90.xxx.xxx SIP/2.0
Via: SIP/2.0/UDP 78.46.xxx.xxx:5060;branch=z9hG4bK4770ec70;rport
Max-Forwards: 70
From: <sip:74951234567@sip.xxx.com>;tag=as0b489ab6
To: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 102 BYE
User-Agent: Xxx Voip
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
Sending to 78.46.xxx.xxx : 5060 (NAT)
<--- Transmitting (NAT) to 78.46.xxx.xxx:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 78.46.xxx.xxx:5060;branch=z9hG4bK4770ec70;received=78.46.xxx.xxx;rport=5060
From: <sip:74951234567@sip.xxx.com>;tag=as0b489ab6
To: "device" <sip:26193@sip.xxx.com>;tag=as0a5ac802
Call-ID: 1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com
CSeq: 102 BYE
Server: FPBX-2.8.1(1.6.2.13)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
<------------>
-- Executing [h@from-internal:1] Macro("SIP/240-00000183", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/240-00000183", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] NoOp("SIP/240-00000183", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/240-00000183", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/240-00000183", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,10)
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/240-00000183", "1?theend") in new stack
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on 'SIP/240-00000183' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/240-00000183'
== Spawn extension (from-internal, 7240, 1) exited non-zero on 'SIP/240-00000183'
-- Executing [h@from-internal:1] Macro("SIP/240-00000183", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/240-00000183", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] NoOp("SIP/240-00000183", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/240-00000183", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/240-00000183", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,10)
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/240-00000183", "1?theend") in new stack
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on 'SIP/240-00000183' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/240-00000183'
== Extension Changed 240[ext-local] new state Idle for Notify User 240
Really destroying SIP dialog '1a3a5ca03a7a46f474f4553b117ee584@sip.xxx.com' Method: BYE
ippbx*CLI> sip set debug off
Задан: 2011-03-05 18:55:48 +0400
Просмотрен: 4,829 раз
Обновлен: Jul 27 '11
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.