SIP 302 (Moved Temporarily): Ziel wird im falschen Kontext angerufen

sted

Neuer User
Mitglied seit
21 Apr 2005
Beiträge
94
Punkte für Reaktionen
0
Punkte
0
Hallo zusammen,

habe hier einen interessanten Effekt zwischen Asterisk (1.2.10) und einem Cisco Call Manager Express (CCME) bzw Unity Express.

Folgendes passiert:
- Anruf über SIP von 124 an 83104
- Es geht niemand ran und das Telefon leitet auf die Voicemail um => SIP 302 Paket mit der Info [email protected] (Unity) anzurufen
- Asterisk nimmt die Nummer und ruft im Kontext from-sip an, also 2100@from-sip

Code:
voip1*CLI>
P[ 1] I IND :SETUP oad:124 dad:83104
P[ 1] read_config: Getting Config
P[ 1] config_jb: Called
P[ 1] CONTEXT:from-misdn
P[ 1] I SEND:PROCEEDING oad:124 dad:83104
    -- Executing Macro("mISDN/1-2", "to-ccm|SIP|[email protected]") in new stack
    -- Executing NoOp("mISDN/1-2", "Macro to-CCM gestartet") in new stack
    -- Executing Dial("mISDN/1-2", "SIP/[email protected]|30") in new stack
    -- Called [email protected]
    -- SIP/10.1.1.67-087f3bb8 is ringing
P[ 1] * IND : Indication [3] from s
P[ 1]  --> * IND :      ringing pid:1014
P[ 1] I SEND:ALERTING oad:124 dad:83104
P[ 1]  --> incoming_early_audio off
P[ 1]  --> * SEND: State Ring pid:1014
    -- Got SIP response 302 "Moved Temporarily" back from 10.1.1.67
    -- Now forwarding mISDN/1-2 to 'Local/2100@from-sip' (thanks to SIP/10.1.1.67-087f3bb8)
    -- Executing Dial("Local/2100@from-sip-486f,2", "SIP/[email protected]|20|rT") in new stack
    -- Called [email protected]
    -- Local/2100@from-sip-486f,1 is ringing
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
    -- SIP/10.1.1.68-087f3bb8 is ringing
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
Jun 14 10:59:57 NOTICE[6398]: channel.c:1917 ast_read: Dropping incompatible voice frame on Local/2100@from-sip-486f,2 of format slin                   since our native format has changed to alaw
    -- SIP/10.1.1.68-087f3bb8 answered Local/2100@from-sip-486f,2
    -- Local/2100@from-sip-486f,1 stopped sounds
P[ 1] * IND : Indication [-1] from s
P[ 1]  --> * IND :      -1! (stop indication) pid:1014
P[ 1] Tone Indicate:
P[ 1]  --> None
    -- Local/2100@from-sip-486f,1 answered mISDN/1-2
P[ 1] * ANSWER:
P[ 1] I SEND:CONNECT oad:124 dad:83104
P[ 1] I IND :CONNECT_ACKNOWLEDGE  oad:124 dad:83104
  == Spawn extension (from-sip, 2100, 1) exited non-zero on 'Local/2100@from-sip-486f,2'
Jun 14 10:59:58 NOTICE[6368]: rtp.c:331 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on c                  lient if possible. Client IP: 10.1.1.68
P[ 1] I IND :DISCONNECT oad:124 dad:83104
P[ 1] I SEND:RELEASE oad:124 dad:83104
P[ 1] I IND :RELEASE_COMPLETE oad:124 dad:83104
P[ 1] Trying to Release bc with l3id: 201bf
P[ 1] * RELEASING CHANNEL pid:1014 ctx:macro-to-ccm dad:s oad:124 state: CONNECTED
  == Spawn extension (macro-to-ccm, s, 2) exited non-zero on 'mISDN/1-2' in macro 'to-ccm'
  == Spawn extension (macro-to-ccm, s, 2) exited non-zero on 'mISDN/1-2'
P[ 1] I IND :CLEAN_UP oad: dad:

Das Telefon mit der 124 ist über MISDN angebunden (HiPath 4000), lasst euch davon nicht irritieren.

Ich verstehe nicht ganz warum Asterisk im Kontext from-sip anruft und nicht einfach den auf die IP Adresse anruft.
Hat das was damit zu tun das in der sip.conf ein context=from-sip steht?

In der aktuellen Konfiguration (s.u.) fange ich die 2100 ab und starte einen völlig neuen Anruf an [email protected], das entspricht natürlich nicht dem weitergeleiteten Anruf an die Voicebox.

Ist das ein Bug in Asterisk (Ignorieren der IP Information im SIP Paket) oder muss ich da noch etwas entsprechend konfigurieren?

Ich kann mir nur vorstellen das es eben etwas mit der Kontextdefinition in der sip.conf zu tun hat, habe aber keine Idee wie ich das umbauen müsste...

Vielen Dank schonmal fürs lesen ;)
stephan

Noch die extensions.conf:
Code:
[general]
;
static=yes
writeprotect=yes

autofallthrough=yes

clearglobalvars=no

priorityjumping=no

;#include "filename.conf"

[globals]

[ccm-sc]
exten => _82.,1,Macro(to-ccm,SIP,${EXTEN}@10.1.3.10)

[ccm-ma]
exten => _83.,1,Macro(to-ccm,SIP,${EXTEN}@10.1.1.67)
; uninteressant da falscher kontext:
;exten => 2100,1,Dial(SIP/[email protected])
;exten => 2100,2,Hangup

[ccm-ct]
exten => _84.,1,Macro(to-ccm,SIP,${EXTEN}@10.1.1.33)


[to-sip-phones]
; SNOM Testphone


[hipath-main]
;; This is the step between Asterisk and the Hipath.
;; If you want to intercept things like 85999 to do
;; an echo test with asterisk do this here.

; SIP phone for testing purposes
exten => 85999,1,Dial(SIP/599,40)
exten => 85999,2,Hangup

; echo test
exten => 85998,1,Playback(demo-echotest)  ; Let them know what's going on
exten => 85998,n,Echo                     ; Do the echo test
exten => 85998,n,Playback(demo-echodone)  ; Let them know it's over
exten => 85998,n,Goto(s,6)                ; Start over


; forward anything else to the hipath and cut the first two digits (85124 => 124)
exten => _85.,1,Dial(misdn/1/${EXTEN:2},20)
exten => _85.,2,Hangup


[from-sip]
;; here goes anything coming from SIP phones and the Call Manager

include => to-sip-phones
include => ccm-sc
include => ccm-ma
include => ccm-ct
include => hipath-main


;; Abfangen von Voicebox Umleitungen in MA und CT (2100@from-sip)
;exten => 2100,1,Playback(were-sorry&were-sorry&were-sorry)
exten => 2100,1,Dial(SIP/[email protected],20,rT);
exten => 2100,2,Hangup


; other extensions with 4 digits
exten => _XXXX,1,Wait(1)
exten => _XXXX,2,Dial(misdn/2/${EXTEN},40)
exten => _XXXX,3,Hangup

; other extensions with 3 digits
exten => _XXX,1,Wait(1)
exten => _XXX,2,Dial(misdn/2/${EXTEN},40)
exten => _XXX,3,Hangup

exten => _00.,1,Wait(1)
exten => _00.,2,Dial(misdn/2/${EXTEN},60)
exten => _00.,3,Hangup


[from-misdn]
;; here goes everything coming from the HiPath

include => to-sip-phones

;; macro for sip
exten => 82999,1,Macro(to-sip,599)

; echotest from HiPath
exten => 82998,1,Playback(demo-echotest)  ; Let them know what's going on
exten => 82998,n,Echo                     ; Do the echo test
exten => 82998,n,Playback(demo-echodone)  ; Let them know it's over
exten => 82998,n,Goto(s,6)                ; Start over


include => ccm-sc

include => ccm-ma

include => ccm-ct


exten => _85.,1,Dial(SIP/${EXTEN:2},60)
exten => _85.,2,Hangup

exten => _86.,1,Dial(SIP/599,10)
exten => _86.,2,Hangup

exten => _87.,1,Dial(SIP/599,10)
exten => _87.,2,Hangup

exten => _88.,1,Dial(SIP/599,10)
exten => _88.,2,Hangup


;3 Digit Extensions from HiPath mapping to SIP Phones
exten => _XXX,1,Macro(sipvm,SIP,${EXTEN})


;;;;;**********************
;;;;; macros

; ausgelassen!
 
zeig mal bitte den relevanten Teil aus der SIP.conf
 
Bin mir nicht sicher was jetzt relevant ist, daher die ganze (bis auf auskommentierte Optionen und ein paar simple SIP accounts:

Code:
[general]
context=from-sip                ; Default context for incoming calls

bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls

disallow=all                    ; First disallow all codecs
allow=ulaw                      ; Allow codecs in order of preference
allow=gsm

language=en                     ; Default language setting for all users/peers


[CCM-SC]
type=friend
;username=asterisk
;secret=zapp
;from=asterisk
host=10.1.3.10
call-limit=4
;context=ccm-sc
disallow=all
allow=ulaw
dtmfmode=info
;;;;;;;;;;allow=alaw

[CCM-MA]
type=friend
host=10.1.1.67
call-limit=3
disallow=all
allow=ulaw
dtmfmode=info

[CCM-CT]
type=friend
host=10.1.1.33
call-limit=3
disallow=all
allow=ulaw
dtmfmode=info

[UNITY-MA]
type=friend
host=10.1.1.68
disallow=all
allow=ulaw
dtmfmode=info

Ich bin mir auch gar nicht sicher ob ich die SIP accounts für die CCMs überhaupt brauche, aber ich meine ich hätte mal sowas gelesen.

Danke schonmal :)
 
Hallo betateilchen - und natürlich alle anderen:

Noch eine Idee oder einen Ansatz dazu?
Wird ja sicherlich einen Grund gegeben haben aus dem die sip.conf gezeigt werden sollte...

Danke
stephan
 
ergänze mal

Code:
promiscredir=yes

in den SIP Contexten.
 
Sehr guter Tipp, jetzt funktioniert die Weiterleitung.
Allerdings wird an den CCME (.67) und nicht wie ich gedacht hatte ans Unity (.68) weitergeleitet. Das ist aber laut Cisco Berater korrekt.

Der Call sieht jetzt so aus:
Code:
P[ 1] I IND :SETUP oad:124 dad:83114
P[ 1] read_config: Getting Config
P[ 1] config_jb: Called
P[ 1] CONTEXT:from-misdn
P[ 1] I SEND:PROCEEDING oad:124 dad:83114
    -- Executing Macro("mISDN/1-1", "to-ccm|SIP|[email protected]") in new stack
    -- Executing NoOp("mISDN/1-1", "Macro to-CCM gestartet") in new stack
    -- Executing Dial("mISDN/1-1", "SIP/[email protected]|30") in new stack
    -- Called [email protected]
    -- SIP/10.1.1.67-08958cb8 is ringing
P[ 1] * IND : Indication [3] from s
P[ 1]  --> * IND :      ringing pid:1232
P[ 1] I SEND:ALERTING oad:124 dad:83114
P[ 1]  --> incoming_early_audio off
P[ 1]  --> * SEND: State Ring pid:1232
    -- Got SIP response 302 "Moved Temporarily" back from 10.1.1.67
    -- Now forwarding mISDN/1-1 to 'SIP/[email protected]' (thanks to SIP/10.1.1.67-08958cb8)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
    -- SIP/10.1.1.67-08987cc8 is ringing
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
Jun 20 08:54:57 WARNING[24497]: chan_sip.c:2552 sip_write: Asked to transmit frame type 64, while native formats is 4 (read/write = 4/4)
    -- SIP/10.1.1.67-08987cc8 answered mISDN/1-1
P[ 1] * IND : Indication [-1] from s
P[ 1]  --> * IND :      -1! (stop indication) pid:1232
P[ 1] Tone Indicate:
P[ 1]  --> None
P[ 1] * ANSWER:
P[ 1] I SEND:CONNECT oad:124 dad:83114
P[ 1] I IND :CONNECT_ACKNOWLEDGE  oad:124 dad:83114
Jun 20 08:54:57 NOTICE[24497]: rtp.c:331 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 10.1.1.67
P[ 1] I IND :DISCONNECT oad:124 dad:83114
P[ 1] I SEND:RELEASE oad:124 dad:83114
P[ 1] I IND :RELEASE_COMPLETE oad:124 dad:83114
P[ 1] Trying to Release bc with l3id: 201ee
P[ 1] * RELEASING CHANNEL pid:1232 ctx:macro-to-ccm dad:s oad:124 state: CONNECTED
  == Spawn extension (macro-to-ccm, s, 2) exited non-zero on 'mISDN/1-1' in macro 'to-ccm'
  == Spawn extension (macro-to-ccm, s, 2) exited non-zero on 'mISDN/1-1'
P[ 1] I IND :CLEAN_UP oad: dad:

Die Umleitung funktioniert also, jetzt sagt leider das Unity aber trotzdem
"Please enter your password, followed by pound".
Also wird leider nocht nicht erkannt, dass es ein weitergeleiteter Anruf von Extension 114 ist.

Liegt das möglicherweise an den falschen "Anrufkennungen" (SIP/10.1.1.67-08958cb8 vs SIP/10.1.1.67-08987cc8) oder ist das so völlig in Ordnung?

Hat noch jemand eine Idee?
Vielen Dank
Stephan
 
BUMP

Hat jemand noch eine Idee hierzu?
 
hallo

kann es sein, dass deine rufumleitung mit der A nummer an der unity ankommt, die dort als account konfiguriert ist? das würde erklären, dass diese evtl denkt du rufst an zur mailboxabfrage.

asterisk verwendet normalerweise bei einer weiterleitung wegen 302 als A nummer die vom umleitenden teilnehmer statt die des ursprünglichen anrufers.

warum benutzt du eine unity, die geld kostet statt den asterisk :confused:

gruss
/alex
 
Hallo Alex, danke für die Antwort.

alex-911 schrieb:
kann es sein, dass deine rufumleitung mit der A nummer an der unity ankommt, die dort als account konfiguriert ist? das würde erklären, dass diese evtl denkt du rufst an zur mailboxabfrage.
Meine Nummer gibt es in der Tat, gerade mit einer anderen getestet: gleicher Effekt.
alex-911 schrieb:
asterisk verwendet normalerweise bei einer weiterleitung wegen 302 als A nummer die vom umleitenden teilnehmer statt die des ursprünglichen anrufers.
So würde ich mir das auch vorstellen, die Unity scheint es aber trotzdem als neuen Anruf zu interpretieren.

Habe keine gute Idee wo ich da ansetzen könnte, außer mir Leute zu holen die sich mit beiden Systemen richtig auskennen... Und dafür fehlt mir dann die Zeit.

Wenn ihr noch Ideen habt.. :)
alex-911 schrieb:
warum benutzt du eine unity, die geld kostet statt den asterisk :confused:
Da müsste ich ziemlich weit ausholen... Kurz: Die Cisco Geschichten stehen in den USA, Asterisk ist einfach das Gateway zwischen zwei existierenden Telefonsystemen.
Mal sehen was die Zukunft bringt...

danke
stephan
 
hallo stephan

dann würde ich mal vergleichen, wie ein VM call vom CCME zur unity signalisiert wird. ohne die herren von cisco wirst du wohl nicht weiterkommen, wenn die ganze hardware in den staaten steht.

gruss
/alex
 
Hallo,
Nur mal zum Verständnis.

1) Call geht zum endpunkt
1.2) endPunkt schickt ein sip 302 (Zielnummer im contact header)
2.) Die asterisk verarbeitet das SIP 302
2.1) Die asterisk soll mit der Nummer aus dem Contact header eine neue Rufnummernbewertung machen und wieder in einen dialplan context springen.

Ist das so richtig?

Dieses Feature haben wir durch die Firma Datus in asterisk 1.6 implementieren lassen. Dieses muss nur noch getestet werden und ist Open sorce.

Wir wollen bei einem sip 302 ein Partitial reroute zur ISDN anlage schicken, sodass die Schleife im isdn aufgelöst wird.
 

Neueste Beiträge

Statistik des Forums

Themen
244,879
Beiträge
2,220,030
Mitglieder
371,604
Neuestes Mitglied
broekar
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.