newbiecrd hat geschrieben:Ist im BASIC dann nur ein Gespräch ein- bzw. ausgehend möglch?
Immer zwei Leitungen.
sparkie hat geschrieben:Insofern laessen sich sogar mehr als 12 Rufnummern "kostenlos" ueber einen VoIP Provider realisieren. Z.b. Sipgate BASIC oder PLUS Tarif.
Japp, da hast du Recht. Ich nutze das ja auch bei über 150 Rufnummern so, die ich für meine Kunden über SIPGATE verwalte.
Code: Alles auswählen
[inbound-sipgate]
exten => s,1,NoOp(Incoming call trough DownStream-Provider SIPGATE: CallerID is ${CALLERID(number)})
exten => s,n,Set(TO=${CUT(SIP_HEADER(TO):5,@,1)})
exten => s,n,GoTo(${IF($["${TO:0:2}"="00"]?${TO:2}:${IF($["${TO:0:1}"="0"]?${INTERNATIONAL_PREFIX}${TO:1}:${INTERNATIONAL_PREFIX}${LOCAL_PREFIX}${TO})})},1)
; Michael Rack - Freilassing
exten => sipgate-id,1,Set(INTERNATIONAL_PREFIX=49)
exten => sipgate-id,n,Set(LOCAL_PREFIX=8654)
exten => sipgate-id,n,GoTo(s,1)
; Alle Anrufe passieren diesen Punkt. Hier werten wir die P-Asserted-Identity von SIPGATE aus,
; wenn diese Übertragen wurde. Das stellt sicher, dass wir statt der SIP-ID von Sipgate die
; Rufnummer am Telefon angezeigt bekommen
exten => i,1,NoOp(Checking for P-Asserted-Identity: ${SIP_HEADER("P-Asserted-Identity")})
exten => i,n,Set(CALLERID(number)=${IF($[${LEN(${SIP_HEADER("P-Asserted-Identity")})}=0]?${CALLERID(number)}:${CUT(SIP_HEADER("P-Asserted-Identity"):5,@,1)})})
exten => i,n,Set(CALLERID(number)=${IF($[${LEN(${CALLERID(number)})}=0]?anonymous:${IF($["${CALLERID(number)}"="anonymous"]?anonymous:${IF($[${CALLERID(number):0:2}=00]?${CALLERID(number)}:${IF($[${CALLERID(number):0:1}=0]?00${INTERNATIONAL_PREFIX}${CALLERID(number):1}:00${INTERNATIONAL_PREFIX}${LOCAL_PREFIX}${CALLERID(number)})})})})})
exten => i,n,Set(CALLERID(name)=${CALLERID(number)})
exten => i,n,NoOp(Try to find local destination)
exten => i,n,GoTo(call-local-number,${INVALID_EXTEN},1)
In der Call-Auswertung, wenn ein SIPGATE-Teilnehmer anruft, sieht das dann so aus:
Code: Alles auswählen
-- Executing [9480xxxxx@inbound-sipgate:1] Set("SIP/sipgate-803xxxx-0000c17d", "INTERNATIONAL_PREFIX=49") in new stack
-- Executing [9480xxxxx@inbound-sipgate:2] Set("SIP/sipgate-803xxxx-0000c17d", "LOCAL_PREFIX=8654") in new stack
-- Executing [9480xxxxx@inbound-sipgate:3] Goto("SIP/sipgate-803xxxx-0000c17d", "s,1") in new stack
-- Goto (inbound-sipgate,s,1)
-- Executing [s@inbound-sipgate:1] NoOp("SIP/sipgate-803xxxx-0000c17d", "Incoming call via SIPGATE: 9480xxxe1") in new stack
-- Executing [s@inbound-sipgate:2] Set("SIP/sipgate-803xxxx-0000c17d", "TO=08654607xxx") in new stack
-- Executing [s@inbound-sipgate:3] Goto("SIP/sipgate-803xxxx-0000c17d", "498654607xxx,1") in new stack
-- Goto (inbound-sipgate,498654607xxx,1)
-- Sent into invalid extension '498654607xxx' in context 'inbound-sipgate' on SIP/sipgate-803xxxx-0000c17d
-- Executing [i@inbound-sipgate:1] NoOp("SIP/sipgate-803xxxx-0000c17d", "Checking for P-Asserted-Identity: <sip:086544803xxx@sipgate.de>") in new stack
-- Executing [i@inbound-sipgate:2] Set("SIP/sipgate-803xxxx-0000c17d", "CALLERID(number)=086544803xxx") in new stack
-- Executing [i@inbound-sipgate:3] Set("SIP/sipgate-803xxxx-0000c17d", "CALLERID(number)=004986544803xxx") in new stack
-- Executing [i@inbound-sipgate:4] Set("SIP/sipgate-803xxxx-0000c17d", "CALLERID(name)=004986544803xxx") in new stack
-- Executing [i@inbound-sipgate:5] NoOp("SIP/sipgate-803xxxx-0000c17d", "Try to find local destination") in new stack
-- Executing [i@inbound-sipgate:6] Goto("SIP/sipgate-803xxxx-0000c17d", "call-local-number,498654607xxx,1") in new stack
-- Goto (call-local-number,498654607xxx,1)
-- Executing [498654607xxx@call-local-number:1] Dial("SIP/sipgate-803xxxx-0000c17d", "SIP/498654607xxx1&SIP/498654607xxx2&SIP/498654607xxx3") in new stack
Ich weis

Es hat niemand danach gefragt

Aber ich finds cool ^^