- Mitglied seit
- 4 Aug 2005
- Beiträge
- 238
- Punkte für Reaktionen
- 1
- Punkte
- 16
Servus Leute!
Ich baue gerade an eine JAVASCRIPT-Library, die über das Asterisk-Manager-Interface (AMI) alle Telefone anzeigt, den aktuellen Status, und wer mit wem spricht.
Nun hatte ich jedoch viele Probleme und nun möchte ich von euch wissen, warum Asterisk sooo kompliziert arbeitet, und was der Grund sein kann, dass er das bei meinem Dial-Plan so macht.
Mal ganz einfach:
Ein Anruf kommt auf Channel SIP/rsm-connect.net-0000004b herein und wird auf Channel Local/11@phones-10fc;1 terminiert. Danach macht Asterisk wieder einen Channel auf Local/11@phones-10fc;2 und terminiert diese auf SIP/1234500011-0000004c und SIP/1234500011-01-0000004d.
Warum macht Asterisk diesen Zwischenschritt (Local/11@phones-10fc;1 und Local/11@phones-10fc;2) ????
In meinem AMI kann ich diesen Zwischenschritt nicht nachvollziehen.
Jetzt kommt aber noch das geilste:
Ich nehme den Anrufer an Line SIP/1234500011-0000004c an und setze den Anrufer "on_hold". Später hole ich mir den Anrufer zurück. Nun renamed Asterisk <MASQ> und <ZOMBIE> die Channels, was mich doch sehr verwirrt. Warum macht Asterisk das? In meinem AMI-Code muss ich saumäßig viele Sachen berücksichtigen deswegen.
Meine AMI-Auswertung:
Asterisk-Log
Asterisk 1.8.0 Final in Verwendung.
Ich baue gerade an eine JAVASCRIPT-Library, die über das Asterisk-Manager-Interface (AMI) alle Telefone anzeigt, den aktuellen Status, und wer mit wem spricht.
Nun hatte ich jedoch viele Probleme und nun möchte ich von euch wissen, warum Asterisk sooo kompliziert arbeitet, und was der Grund sein kann, dass er das bei meinem Dial-Plan so macht.
Mal ganz einfach:
Ein Anruf kommt auf Channel SIP/rsm-connect.net-0000004b herein und wird auf Channel Local/11@phones-10fc;1 terminiert. Danach macht Asterisk wieder einen Channel auf Local/11@phones-10fc;2 und terminiert diese auf SIP/1234500011-0000004c und SIP/1234500011-01-0000004d.
Warum macht Asterisk diesen Zwischenschritt (Local/11@phones-10fc;1 und Local/11@phones-10fc;2) ????
In meinem AMI kann ich diesen Zwischenschritt nicht nachvollziehen.
Jetzt kommt aber noch das geilste:
Ich nehme den Anrufer an Line SIP/1234500011-0000004c an und setze den Anrufer "on_hold". Später hole ich mir den Anrufer zurück. Nun renamed Asterisk <MASQ> und <ZOMBIE> die Channels, was mich doch sehr verwirrt. Warum macht Asterisk das? In meinem AMI-Code muss ich saumäßig viele Sachen berücksichtigen deswegen.
Meine AMI-Auswertung:
Code:
asterisk/collector.js getChannel(): Create channel [SIP/rsm-connect.net-0000004b]
asterisk/collector.js onNewchannel(): Channel [SIP/rsm-connect.net-0000004b] dials out to [11] from context [in-direct]
asterisk/collector.js onNewstate(): State on channel [SIP/rsm-connect.net-0000004b] changed to [Ring]
asterisk/collector.js getChannel(): Create channel [Local/11@phones-10fc;1]
asterisk/collector.js onNewchannel(): Channel [Local/11@phones-10fc;1] dials out to [11] from context [phones]
asterisk/collector.js getChannel(): Create channel [Local/11@phones-10fc;2]
asterisk/collector.js onNewchannel(): Channel [Local/11@phones-10fc;2] dials out to [11] from context [phones]
asterisk/collector.js onDial(): Channel [SIP/rsm-connect.net-0000004b] was linked with [Local/11@phones-10fc;1]
asterisk/collector.js getChannel(): Create channel [Local/121112@phones-delayed-179f;1]
asterisk/collector.js onNewchannel(): Channel [Local/121112@phones-delayed-179f;1] dials out to [121112] from context [phones-delayed]
asterisk/collector.js getChannel(): Create channel [Local/121112@phones-delayed-179f;2]
asterisk/collector.js onNewchannel(): Channel [Local/121112@phones-delayed-179f;2] dials out to [121112] from context [phones-delayed]
asterisk/collector.js onDial(): Channel [SIP/rsm-connect.net-0000004b] was linked with [Local/121112@phones-delayed-179f;1]
asterisk/collector.js getChannel(): Create channel [Local/241151@phones-delayed-e3f9;1]
asterisk/collector.js onNewchannel(): Channel [Local/241151@phones-delayed-e3f9;1] dials out to [241151] from context [phones-delayed]
asterisk/collector.js getChannel(): Create channel [Local/241151@phones-delayed-e3f9;2]
asterisk/collector.js onNewchannel(): Channel [Local/241151@phones-delayed-e3f9;2] dials out to [241151] from context [phones-delayed]
asterisk/collector.js onDial(): Channel [SIP/rsm-connect.net-0000004b] was linked with [Local/241151@phones-delayed-e3f9;1]
asterisk/collector.js getChannel(): Create channel [Local/361110@phones-delayed-b027;1]
asterisk/collector.js onNewchannel(): Channel [Local/361110@phones-delayed-b027;1] dials out to [361110] from context [phones-delayed]
asterisk/collector.js getChannel(): Create channel [Local/361110@phones-delayed-b027;2]
asterisk/collector.js onNewchannel(): Channel [Local/361110@phones-delayed-b027;2] dials out to [361110] from context [phones-delayed]
asterisk/collector.js onDial(): Channel [SIP/rsm-connect.net-0000004b] was linked with [Local/361110@phones-delayed-b027;1]
asterisk/collector.js getChannel(): Create channel [SIP/1234500011-0000004c]
asterisk/collector.js getChannel(): Channel [SIP/1234500011-0000004c] assigned to peer [1234500011]
asterisk/collector.js onDial(): Channel [Local/11@phones-10fc;2] was linked with [SIP/1234500011-0000004c]
asterisk/collector.js onExtensionStatus(): Extension [1234500011] changes status to [8]
asterisk/collector.js getChannel(): Create channel [SIP/1234500011-01-0000004d]
asterisk/collector.js getChannel(): Channel [SIP/1234500011-01-0000004d] assigned to peer [1234500011-01]
asterisk/collector.js onDial(): Channel [Local/11@phones-10fc;2] was linked with [SIP/1234500011-01-0000004d]
asterisk/collector.js onExtensionStatus(): Extension [1234500011-01] changes status to [8]
asterisk/collector.js onNewstate(): State on channel [SIP/1234500011-0000004c] changed to [Ringing]
asterisk/collector.js onNewstate(): State on channel [Local/11@phones-10fc;1] changed to [Ringing]
asterisk/collector.js onNewstate(): State on channel [SIP/1234500011-01-0000004d] changed to [Ringing]
asterisk/collector.js onExtensionStatus(): Extension [1234500011] changes status to [2]
asterisk/collector.js onNewstate(): State on channel [SIP/1234500011-0000004c] changed to [Up]
asterisk/collector.js onHangup(): Hangup received on channel [SIP/1234500011-01-0000004d] for cause [Unknown]
asterisk/collector.js onHangup(): Channel [SIP/1234500011-01-0000004d] was removed from peer [1234500011-01]
asterisk/collector.js onNewstate(): State on channel [Local/11@phones-10fc;2] changed to [Up]
asterisk/collector.js onExtensionStatus(): Extension [1234500011-01] changes status to [0]
asterisk/collector.js onNewstate(): State on channel [Local/11@phones-10fc;1] changed to [Up]
asterisk/collector.js onNewstate(): State on channel [SIP/rsm-connect.net-0000004b] changed to [Up]
asterisk/collector.js onHangup(): Hangup received on channel [Local/361110@phones-delayed-b027;1] for cause [Unknown]
asterisk/collector.js onHangup(): Hangup received on channel [Local/241151@phones-delayed-e3f9;1] for cause [Unknown]
asterisk/collector.js onHangup(): Hangup received on channel [Local/121112@phones-delayed-179f;1] for cause [Unknown]
asterisk/collector.js onHangup(): Hangup received on channel [Local/361110@phones-delayed-b027;2] for cause [Unknown]
asterisk/collector.js onHangup(): Hangup received on channel [Local/121112@phones-delayed-179f;2] for cause [Unknown]
asterisk/collector.js onHangup(): Hangup received on channel [Local/241151@phones-delayed-e3f9;2] for cause [Unknown]
asterisk/collector.js onExtensionStatus(): Extension [1234500011] changes status to [16]
asterisk/collector.js onExtensionStatus(): Extension [1234500011] changes status to [2]
asterisk/collector.js onRename(): Channel Rename [SIP/1234500011-0000004c] to [SIP/1234500011-0000004c<MASQ>]
asterisk/collector.js onRename(): Channel Rename [Local/11@phones-10fc;1] to [SIP/1234500011-0000004c]
asterisk/collector.js getChannel(): Channel [SIP/1234500011-0000004c] assigned to peer [1234500011]
asterisk/collector.js onRename(): Channel Rename [SIP/1234500011-0000004c<MASQ>] to [Local/11@phones-10fc;1<ZOMBIE>]
asterisk/collector.js onHangup(): Hangup received on channel [Local/11@phones-10fc;1<ZOMBIE>] for cause [Normal Clearing]
asterisk/collector.js onHangup(): Channel [Local/11@phones-10fc;1<ZOMBIE>] was removed from peer [1234500011]
asterisk/collector.js onDial(): Channel [Local/11@phones-10fc;2] unlinked after received [ANSWER]
asterisk/collector.js onHangup(): Hangup received on channel [Local/11@phones-10fc;2] for cause [Normal Clearing]
asterisk/collector.js onHangup(): Hangup received on channel [SIP/1234500011-0000004c] for cause [Normal Clearing]
asterisk/collector.js onHangup(): Channel [SIP/1234500011-0000004c] was removed from peer [1234500011]
asterisk/collector.js onExtensionStatus(): Extension [1234500011] changes status to [0]
asterisk/collector.js onDial(): Channel [SIP/rsm-connect.net-0000004b] unlinked after received [ANSWER]
asterisk/collector.js onHangup(): Hangup received on channel [SIP/rsm-connect.net-0000004b] for cause [Normal Clearing]
Asterisk-Log
Code:
[Nov 4 13:01:03] VERBOSE[16048] pbx.c: -- Executing [11@in-direct:1] Goto("SIP/rsm-connect.net-0000004b", "in-checknumber,11,1") in new stack
[Nov 4 13:01:03] VERBOSE[16048] pbx.c: -- Goto (in-checknumber,11,1)
[Nov 4 13:01:03] VERBOSE[16048] pbx.c: -- Executing [11@in-checknumber:1] Set("SIP/rsm-connect.net-0000004b", "_PICKUPMARK=11") in new stack
[Nov 4 13:01:03] VERBOSE[16048] pbx.c: -- Executing [11@in-checknumber:2] Goto("SIP/rsm-connect.net-0000004b", "in-phones,11,1") in new stack
[Nov 4 13:01:03] VERBOSE[16048] pbx.c: -- Goto (in-phones,11,1)
[Nov 4 13:01:03] VERBOSE[16048] pbx.c: -- Executing [11@in-phones:1] Dial("SIP/rsm-connect.net-0000004b", "LOCAL/11@phones&LOCAL/121112@phones-delayed&LOCAL/241151@phones-delayed&LOCAL/361110@phones-delayed,,c") in new stack
[Nov 4 13:01:03] VERBOSE[16048] app_dial.c: -- Called 11@phones
[Nov 4 13:01:03] VERBOSE[16048] app_dial.c: -- Called 121112@phones-delayed
[Nov 4 13:01:03] VERBOSE[16048] app_dial.c: -- Called 241151@phones-delayed
[Nov 4 13:01:03] VERBOSE[16048] app_dial.c: -- Called 361110@phones-delayed
[Nov 4 13:01:03] VERBOSE[16049] pbx.c: -- Executing [11@phones:1] Dial("Local/11@phones-10fc;2", "SIP/1234500011&SIP/1234500011-01,,o") in new stack
[Nov 4 13:01:03] VERBOSE[16050] pbx.c: -- Executing [121112@phones-delayed:1] ResetCDR("Local/121112@phones-delayed-179f;2", "") in new stack
[Nov 4 13:01:03] VERBOSE[16049] netsock2.c: == Using SIP RTP TOS bits 184
[Nov 4 13:01:03] VERBOSE[16049] netsock2.c: == Using SIP RTP CoS mark 5
[Nov 4 13:01:03] VERBOSE[16050] pbx.c: -- Executing [121112@phones-delayed:2] Wait("Local/121112@phones-delayed-179f;2", "12") in new stack
[Nov 4 13:01:03] VERBOSE[16051] pbx.c: -- Executing [241151@phones-delayed:1] ResetCDR("Local/241151@phones-delayed-e3f9;2", "") in new stack
[Nov 4 13:01:03] VERBOSE[16051] pbx.c: -- Executing [241151@phones-delayed:2] Wait("Local/241151@phones-delayed-e3f9;2", "24") in new stack
[Nov 4 13:01:03] VERBOSE[16049] app_dial.c: -- Called 1234500011
[Nov 4 13:01:03] VERBOSE[16052] pbx.c: -- Executing [361110@phones-delayed:1] ResetCDR("Local/361110@phones-delayed-b027;2", "") in new stack
[Nov 4 13:01:03] VERBOSE[16049] netsock2.c: == Using SIP RTP TOS bits 184
[Nov 4 13:01:03] VERBOSE[16049] netsock2.c: == Using SIP RTP CoS mark 5
[Nov 4 13:01:03] VERBOSE[16049] app_dial.c: -- Called 1234500011-01
[Nov 4 13:01:03] VERBOSE[16052] pbx.c: -- Executing [361110@phones-delayed:2] Wait("Local/361110@phones-delayed-b027;2", "36") in new stack
[Nov 4 13:01:04] VERBOSE[16049] app_dial.c: -- SIP/1234500011-0000004c is ringing
[Nov 4 13:01:04] VERBOSE[16048] app_dial.c: -- Local/11@phones-10fc;1 is ringing
[Nov 4 13:01:04] VERBOSE[16049] app_dial.c: -- SIP/1234500011-01-0000004d is ringing
[Nov 4 13:01:04] VERBOSE[16049] app_dial.c: -- SIP/1234500011-0000004c is ringing
[Nov 4 13:01:05] VERBOSE[16049] app_dial.c: -- SIP/1234500011-0000004c is ringing
[Nov 4 13:01:05] VERBOSE[16049] app_dial.c: -- SIP/1234500011-0000004c connected line has changed. Saving it until answer for Local/11@phones-10fc;2
[Nov 4 13:01:05] VERBOSE[16049] app_dial.c: -- SIP/1234500011-0000004c answered Local/11@phones-10fc;2
[Nov 4 13:01:05] VERBOSE[16048] app_dial.c: -- Local/11@phones-10fc;1 connected line has changed. Saving it until answer for SIP/rsm-connect.net-0000004b
[Nov 4 13:01:05] VERBOSE[16048] app_dial.c: -- Local/11@phones-10fc;1 answered SIP/rsm-connect.net-0000004b
[Nov 4 13:01:05] VERBOSE[16052] pbx.c: == Spawn extension (phones-delayed, 361110, 2) exited non-zero on 'Local/361110@phones-delayed-b027;2'
[Nov 4 13:01:05] VERBOSE[16050] pbx.c: == Spawn extension (phones-delayed, 121112, 2) exited non-zero on 'Local/121112@phones-delayed-179f;2'
[Nov 4 13:01:05] VERBOSE[16051] pbx.c: == Spawn extension (phones-delayed, 241151, 2) exited non-zero on 'Local/241151@phones-delayed-e3f9;2'
[Nov 4 13:01:10] ERROR[15860] chan_sip.c: No SRTP module loaded, can't setup SRTP session.
[Nov 4 13:01:10] VERBOSE[16048] rtp_engine.c: -- Locally bridging SIP/rsm-connect.net-0000004b and SIP/1234500011-0000004c
[Nov 4 13:01:10] VERBOSE[16049] pbx.c: == Spawn extension (phones, 11, 1) exited non-zero on 'Local/11@phones-10fc;2'
[Nov 4 13:01:13] VERBOSE[16048] pbx.c: == Spawn extension (in-phones, 11, 1) exited non-zero on 'SIP/rsm-connect.net-0000004b'
Asterisk 1.8.0 Final in Verwendung.
Zuletzt bearbeitet: