[Gelöst] Pick up mit Asterisk 15.5 und Snom 3xx (dialog-info+xml)

frispete

Neuer User
Mitglied seit
16 Apr 2016
Beiträge
2
Punkte für Reaktionen
0
Punkte
1
Hi,

beim Versuch, eine alte Asterisk 1.2.31 Installation an einem ISDN-Anlagenanschuß mit Snom-Endgeräten auf etwas Zeitgemäßes mit SIP-Trunk zu wechseln, hänge ich an einem kleinen, aber mir wichtigen Detail: Pick up von Gesprächen, während sie auf anderen Telefonen klingeln. Den alten Asterisk habe ich das damals mit Patches beigebracht, der aktuelle sollte eigentlich alles am Start haben, was man dafür braucht...

Rein/rauswählen/vermitteln funktioniert.

Beim Pick up geht es um Variante 1, wie in http://wiki.snom.com/Category:HowTo:Call_Pickup beschrieben, welches wir seit 10 Jahren nutzen. Die Voraussetzungen dafür im aktuellen Asterisk habe ich geschaffen:

sip.conf (auf topic gestrippt):
Code:
[globals]
notifyringing = yes
notifycid = yes

[snom-phone](!)
type = friend
host = dynamic
context = internal-main
allowsubscribe = yes
subscribecontext = incoming
qualify = yes

[000413aaaaaa](snom-phone)
callerid = "hp Office" <60>
description = "hp Office <60>"
secret = ****
namedcallgroup = lisa
namedpickupgroup = lisa,privat

[000413bbbbbb](snom-phone)
callerid = "hp Office 2" <62>
description = "hp Office <62>"
secret = ****
namedcallgroup = lisa
namedpickupgroup = lisa,privat
extensions.conf (gestrippt):
Code:
[hints]
exten = _60,hint,SIP/000413aaaaaa
exten = _62,hint,SIP/000413bbbbbb

[phones]
exten = _60,1,Dial(SIP/000413aaaaaa)
exten = _62,1,Dial(SIP/000413bbbbbb)

[incoming]
include = hints
include = phones

[internal-main]
include = hints
include = phones
include = outgoing
include = dial-errors

Die Telefone ist angemeldet und subscribed:
Code:
hermes*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                     
000413aaaaaa/000413aaaaaa 172.16.23.60                             D  Yes        Yes         A  2135     OK (20 ms)  "hp Office <60>"                 
000413bbbbbb/000413bbbbbb 172.16.23.62                             D  Yes        Yes         A  44968    OK (10 ms)  "hp Office <62>"                 
hfo/012345678900                   213.167.162.244                             Yes        Yes         A  5060     Unmonitored   

3 sip peers [Monitored: 2 online, 0 offline Unmonitored: 1 online, 0 offline]

hermes*CLI> sip show subscriptions
Peer             User             Call ID          Extension        Last state     Type            Mailbox    Expiry
172.16.23.62     000413bbbbbb     313533363135373  60@incoming      Idle           dialog-info+xml <none>     003600
172.16.23.60     000413aaaaaa     3c267d507304-2t  62@incoming      Idle           dialog-info+xml <none>     003600 
2 active SIP subscriptions

Wenn ich jetzt auf der 62 anrufe, und das Gespräch auf die 60 holen möchte, und auf die entsprechende Funktionstaste drücke, passiert folgendes: (Kommentare nach #)
Code:
# Gespräch kommt rein
[Sep  5 16:37:02]        > 0x7fd0e400f840 -- Strict RTP learning after remote address set to: 213.167.161.49:21356
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:1] Verbose("SIP/hfosip.de-00000000", "1,"Incoming call from "" <01727777777>"") in new stack
[Sep  5 16:37:02]  "Incoming call from "" <01727777777>"
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:2] Verbose("SIP/hfosip.de-00000000", "2,"Incoming call dnid is 012345678900"") in new stack
[Sep  5 16:37:02]   == "Incoming call dnid is 012345678900"
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:3] Verbose("SIP/hfosip.de-00000000", "2,"The channel name is SIP/hfosip.de-00000000"") in new stack
[Sep  5 16:37:02]   == "The channel name is SIP/hfosip.de-00000000"
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:4] Verbose("SIP/hfosip.de-00000000", "2,"The unique id is 1536158222.0"") in new stack
[Sep  5 16:37:02]   == "The unique id is 1536158222.0"
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:5] Set("SIP/hfosip.de-00000000", "CALLERID(number)=001727777777") in new stack
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:6] Set("SIP/hfosip.de-00000000", "TO=<sip:0123456789060") in new stack
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:7] Set("SIP/hfosip.de-00000000", "TO=0123456789062") in new stack
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:8] Verbose("SIP/hfosip.de-00000000", "1,"Extension is 0123456789060"") in new stack
[Sep  5 16:37:02]  "Extension is 0123456789062"
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:9] Set("SIP/hfosip.de-00000000", "EXTEN=62") in new stack
[Sep  5 16:37:02]     -- Executing [012345678900@incoming:10] Goto("SIP/hfosip.de-00000000", "incoming_dispatch,62,1") in new stack
[Sep  5 16:37:02]     -- Goto (incoming_dispatch,62,1)
[Sep  5 16:37:02]     -- Executing [62@incoming_dispatch:1] Dial("SIP/hfosip.de-00000000", "SIP/000413bbbbbb,30") in new stack
[Sep  5 16:37:02]   == Using SIP RTP CoS mark 5
# wird auf Endgerät vermittelt (habe bereits debug code eingebaut)
[Sep  5 16:37:02]     -- Called SIP/000413bbbbbb
[Sep  5 16:37:02] NOTICE[8854]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 8, notifyringing: 1, notifycid: 1
[Sep  5 16:37:02] NOTICE[8854]: chan_sip.c:15240 state_notify_build_xml: DIALOG_INFO_XML: local_display: 62, remote_display: 62
[Sep  5 16:37:02] NOTICE[8854]: chan_sip.c:15248 state_notify_build_xml: DIALOG_INFO_XML: callee: 0
[Sep  5 16:37:02]   == Extension Changed 62[hints] new state Ringing for Notify User 000413aaaaaa
[Sep  5 16:37:02] NOTICE[8854]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 8, notifyringing: 1, notifycid: 1
[Sep  5 16:37:02] NOTICE[8854]: chan_sip.c:15240 state_notify_build_xml: DIALOG_INFO_XML: local_display: 62, remote_display: 62
[Sep  5 16:37:02] NOTICE[8854]: chan_sip.c:15248 state_notify_build_xml: DIALOG_INFO_XML: callee: 0
[Sep  5 16:37:02]   == Extension Changed 62[hints] new state Ringing for Notify User 000413bbbbbb
[Sep  5 16:37:02]   == Extension Changed 62[hints] new state Ringing for Notify User 000413aaaaaa (queued)
[Sep  5 16:37:02]   == Extension Changed 62[hints] new state Ringing for Notify User 000413bbbbbb (queued)
[Sep  5 16:37:02]     -- SIP/000413bbbbbb-00000001 is ringing
[Sep  5 16:37:02] NOTICE[8873]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 8, notifyringing: 1, notifycid: 1
[Sep  5 16:37:02] NOTICE[8873]: chan_sip.c:15240 state_notify_build_xml: DIALOG_INFO_XML: local_display: 62, remote_display: 62
[Sep  5 16:37:02] NOTICE[8873]: chan_sip.c:15248 state_notify_build_xml: DIALOG_INFO_XML: callee: 1
[Sep  5 16:37:02] NOTICE[8873]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 8, notifyringing: 1, notifycid: 1
[Sep  5 16:37:02] NOTICE[8873]: chan_sip.c:15240 state_notify_build_xml: DIALOG_INFO_XML: local_display: 62, remote_display: 62
[Sep  5 16:37:02] NOTICE[8873]: chan_sip.c:15248 state_notify_build_xml: DIALOG_INFO_XML: callee: 1
[Sep  5 16:37:03]     -- SIP/000413bbbbbb-00000001 is ringing
[Sep  5 16:37:04]     -- SIP/000413bbbbbb-00000001 is ringing
[Sep  5 16:37:06]     -- SIP/000413bbbbbb-00000001 is ringing
# Übernahmetaste gedrückt: * versucht 62@incoming zu übernehmen
[Sep  5 16:37:09] NOTICE[8873][C-00000002]: chan_sip.c:26276 handle_request_invite: Trying to pick up 62@incoming
[Sep  5 16:37:09] NOTICE[8873][C-00000002]: chan_sip.c:26276 handle_request_invite: Trying to pick up 62@incoming
[Sep  5 16:37:09]   == Using SIP RTP CoS mark 5
[Sep  5 16:37:09]        > 0x7fd0e404d970 -- Strict RTP learning after remote address set to: 172.16.23.60:53118
# wir sind in app_pickup:pickup_exec
[Sep  5 16:37:09] NOTICE[8873][C-00000002]: app_directed_pickup.c:356 pickup_exec: pickup_exec: chan SIP/000413aaaaaa-00000002, data: 62@incoming
[Sep  5 16:37:09] NOTICE[8854]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 1, notifyringing: 1, notifycid: 1
# der Iterator in pickup_by_exten() ist leer
[Sep  5 16:37:09] NOTICE[8873][C-00000002]: app_directed_pickup.c:384 pickup_exec: pickup_by_exten() failed for 62@incoming.
[Sep  5 16:37:09] NOTICE[8873][C-00000002]: app_directed_pickup.c:386 pickup_exec: No target channel found for 62@incoming.
[Sep  5 16:37:09]   == Extension Changed 60[hints] new state InUse for Notify User 000413aaaaaa
[Sep  5 16:37:09] NOTICE[8854]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 1, notifyringing: 1, notifycid: 1
[Sep  5 16:37:09]   == Extension Changed 60[hints] new state InUse for Notify User 000413bbbbbb
[Sep  5 16:37:09]   == Extension Changed 60[hints] new state Idle for Notify User 000413aaaaaa (queued)
[Sep  5 16:37:09]   == Extension Changed 60[hints] new state Idle for Notify User 000413bbbbbb (queued)
[Sep  5 16:37:09] NOTICE[8873]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 0, notifyringing: 1, notifycid: 1
[Sep  5 16:37:09] NOTICE[8873]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 0, notifyringing: 1, notifycid: 1
[Sep  5 16:37:10]     -- SIP/000413bbbbbb-00000001 is ringing
[Sep  5 16:37:12]   == Spawn extension (incoming_dispatch, 62, 1) exited non-zero on 'SIP/hfosip.de-00000000'
[Sep  5 16:37:12] NOTICE[8854]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 0, notifyringing: 1, notifycid: 1
[Sep  5 16:37:12]   == Extension Changed 62[hints] new state Idle for Notify User 000413aaaaaa
[Sep  5 16:37:12] NOTICE[8854]: chan_sip.c:15219 state_notify_build_xml: DIALOG_INFO_XML: data->state: 0, notifyringing: 1, notifycid: 1
[Sep  5 16:37:12]   == Extension Changed 62[hints] new state Idle for Notify User 000413bbbbbb

Habe schon ersatzweise den Iterator in pickup_by_exten() umgangen mit: target = ast_channel_get_by_exten(exten, context); target ist NULL.

Wenn ich noch Haare auf'm Kopf hätte, hätte ich sie mir spätestens jetzt ausgerupft..

Ich hänge noch den debug patch an, und bin für jeden Hinweis dankbar.

Danke schonmal im voraus und sorry für den vielen Text...
 
Hab es gelöst, der subscribecontext muss in meinem Fall internal-main heißen, und hat offenbar nichts mit dem reinkommenden Ruf zu tun! Das war mein Denkfehler.
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.