S'identifier

Voir la version complète : DAHDI ISDN bloquer (masquer) le numéro sortant



dose
19/04/2013, 12h48
Bonjour,

J'ai un petit souci qui doit pas être bien compliquer à résoudre mais malheureusement je trouve toujours pas...

Ma version d'asterisk 1.8.20.1

J'ai mon téléphone SIP connecté sur un Asterisk en Suisse avec carte ISDN reliée chez Colt, quand j'effectue un appel sortant vers mon mobile en France ou un numéro Suisse j'ai besoin de masquer le numéro d'appelant, malheureusement ça ne fonctionne pas, j'arrive soit a afficher la tête de ligne soit le numéro de DID de l'extension.

Voici le dialplan


;International numbers
exten => _000Z.,1,NoOp(Outbound international call to number ==> ${EXTEN:1})
same => n,NoOp(${CALLINGPRES})
same => n,Set(CALLERID(number)=32321${CALLERID(num)})
same => n,Set(CALLERID(num-pres)=prohib)
same => n,Dial(DAHDI/g11/${EXTEN:1})



Voici ce que j'ai quand j'active les traces pri set debug on span 1


-- Executing [00033625081954@from-sip:1] NoOp("SIP/7034-00000003", "Outbound international call to number ==> 0033625081954") in new stack
-- Executing [00033625081954@from-sip:2] NoOp("SIP/7034-00000003", "0") in new stack
-- Executing [00033625081954@from-sip:3] Set("SIP/7034-00000003", "CALLERID(number)=323217034") in new stack
-- Executing [00033625081954@from-sip:4] Set("SIP/7034-00000003", "CALLERID(num-pres)=prohib") in new stack
-- Executing [00033625081954@from-sip:5] Dial("SIP/7034-00000003", "DAHDI/g11/0033625081954") in new stack
PRI Span: 1 -- Making new call for cref 32772
-- Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=45
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=9, window is open V(A)=9 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=45
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a3]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 > User information layer 1: A-Law (35)
PRI Span: 1 > [18 03 a1 83 81]
PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
PRI Span: 1 > ChanSel: As indicated in following octets
PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 > Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 > [6c 0b 21 81 33 32 33 32 31 37 30 33 34]
PRI Span: 1 > Calling Party Number (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, verified and passed (1) '323217034' ]
PRI Span: 1 > [70 0e 80 30 30 33 33 36 32 35 30 38 31 39 35 34]
PRI Span: 1 > Called Party Number (len=16) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '0033625081954' ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)
PRI Span: 1 q931.c:6334 q931_setup: Call 32772 enters state 1 (Call Initiated). Hold state: Idle
-- Called DAHDI/g11/0033625081954
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=10
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent to originator)
PRI Span: 1 < Message Type: CALL PROCEEDING (2)
PRI Span: 1 < [18 03 a9 83 81]
PRI Span: 1 < Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
PRI Span: 1 < ChanSel: As indicated in following octets
PRI Span: 1 < Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 < Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 Received message for call 0x7f2e38641610 on link 0x22a6320 TEI/SAPI 0/0
PRI Span: 1 -- Processing IE 24 (cs0, Channel ID)
PRI Span: 1 q931.c:8831 post_handle_q931_message: Call 32772 enters state 3 (Outgoing Call Proceeding). Hold state: Idle
Span 1: Processing event PRI_EVENT_PROCEEDING
-- DAHDI/i1/0033625081954-4 is proceeding passing it to SIP/7034-00000003
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=13
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent to originator)
PRI Span: 1 < Message Type: PROGRESS (3)
PRI Span: 1 < [1e 02 82 88]
PRI Span: 1 < Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
PRI Span: 1 < Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
PRI Span: 1 < [1e 02 82 82]
PRI Span: 1 < Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
PRI Span: 1 < Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ]
PRI Span: 1 Received message for call 0x7f2e38641610 on link 0x22a6320 TEI/SAPI 0/0
PRI Span: 1 -- Processing IE 30 (cs0, Progress Indicator)
PRI Span: 1 -- Processing IE 30 (cs0, Progress Indicator)
Span 1: Processing event PRI_EVENT_PROGRESS
-- DAHDI/i1/0033625081954-4 is making progress passing it to SIP/7034-00000003
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent to originator)
PRI Span: 1 < Message Type: ALERTING (1)
PRI Span: 1 < [1e 02 84 88]
PRI Span: 1 < Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the remote user (4)
PRI Span: 1 < Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
PRI Span: 1 Received message for call 0x7f2e38641610 on link 0x22a6320 TEI/SAPI 0/0
PRI Span: 1 -- Processing IE 30 (cs0, Progress Indicator)
PRI Span: 1 q931.c:8684 post_handle_q931_message: Call 32772 enters state 4 (Call Delivered). Hold state: Idle
Span 1: Processing event PRI_EVENT_RINGING
-- DAHDI/i1/0033625081954-4 is ringing
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent to originator)
PRI Span: 1 < Message Type: PROGRESS (3)
PRI Span: 1 < [1e 02 84 88]
PRI Span: 1 < Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the remote user (4)
PRI Span: 1 < Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
PRI Span: 1 Received message for call 0x7f2e38641610 on link 0x22a6320 TEI/SAPI 0/0
PRI Span: 1 -- Processing IE 30 (cs0, Progress Indicator)
Span 1: Processing event PRI_EVENT_PROGRESS


Peu importe ce que je paramètre dans CALLERID(num-pres) le champ suivant reste toujours pareil:

calling party number
Presentation: Presentation allowed, User-provided, verified and passed (1) '323217034' ]

J'aimerai avoir presentation restricted mais rien n'y fait.

Dans chan_dahdi.conf j'ai:
usecallingpres=yes

Si vous avez une idée je suis preneur ?

Dans l'attente de votre retour et merci d'avance.

Cordialement.

fastm3
19/04/2013, 22h41
Ca depends des operateurs mais essaie de combiner un
Set(CALLERID(all)="hidden <0102030405>") avec en plus SetCallerPres(prohib_passed_screen)

Sinon , plus simple , generalement tous les operateurs propose un prefixe pour appeler en masquer au coup par coup. En France, un Dial(DAHDI/g0/3651${EXTEN}) masque le numero avec quasi tous les operateurs.
Fastm3.

dose
24/04/2013, 12h05
Bonjour,

Merci pour le retour, j'ai essayé ces paramètres mais rien n'y fait.

En fait dans les traces "PRI" bizarremment le calling party est toujours au format suivant:

Calling Party Number (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, verified and passed (1) '323217034' ]

A priori peu importe ce que je passe comme information dans CALLERPRES ça change absolument rien dans la présentation

allowed_not_screened - Presentation Allowed, Not Screened.
allowed_passed_screen - Presentation Allowed, Passed Screen.
allowed_failed_screen - Presentation Allowed, Failed Screen.
allowed - Presentation Allowed, Network Number.
prohib_not_screened - Presentation Prohibited, Not Screened.
prohib_passed_screen - Presentation Prohibited, Passed Screen.
prohib_failed_screen - Presentation Prohibited, Failed Screen.
prohib - Presentation Prohibited, Network Number.
unavailable - Number Unavailable.

Si vous avez une autre idée je suis preneur ?

Merci

Cordialement.

F6HQZ
24/04/2013, 13h28
Bonjour,

Essayez de passer un CID bidon, non conforme, genre "ABCDE" (des lettres). Il arrive alors que certains opérateurs masquent le "faux numéro" présenté.

Cordialement,
Francois

al3x
24/04/2013, 13h50
Salut,

pour l'utiliser moi-même, SetCallerPres(prohib) est un moyen efficace de bloquer la présentation du CALLERID.


;International numbers
exten => _000Z.,1,NoOp(Outbound international call to number ==> ${EXTEN:1})
same => n,NoOp(${CALLINGPRES})
same => n,Set(CALLERID(number)=32321${CALLERID(num)})
same => n,SetCallerPres(prohib)
same => n,Dial(DAHDI/g11/${EXTEN:1})

Tu auras ensuite dans ton SETUP ISDN normalement :

Presentation: Presentation restricted, Network provided (35) '32321NNNNN'

Et par sécurité, sur certains cas, je mets le CALLERID(num) à 0 (0000000000).

@+

dose
24/04/2013, 15h39
Je viens de tester l'exemple de Al3x et de F6HQZ mais rien n'y fait


example d'Al3x:


Using SIP RTP CoS mark 5
-- Executing [00033625081954@from-sip-cyril:1] NoOp("SIP/7034-000000fa", "Outbound international call to number ==> 0033625081954") in new stack
-- Executing [00033625081954@from-sip-cyril:2] NoOp("SIP/7034-000000fa", "0") in new stack
-- Executing [00033625081954@from-sip-cyril:3] Set("SIP/7034-000000fa", "CALLERID(number)=323217034") in new stack
-- Executing [00033625081954@from-sip-cyril:4] SetCallerPres("SIP/7034-000000fa", "prohib") in new stack
-- Executing [00033625081954@from-sip-cyril:5] Dial("SIP/7034-000000fa", "DAHDI/g11/0033625081954") in new stack
PRI Span: 1 -- Making new call for cref 32832
-- Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=45
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 64/0x40) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=56, window is open V(A)=56 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=45
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 64/0x40) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a3]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 > User information layer 1: A-Law (35)
PRI Span: 1 > [18 03 a1 83 82]
PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
PRI Span: 1 > ChanSel: As indicated in following octets
PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 > Ext: 1 Channel: 2 Type: CPE]
PRI Span: 1 > [6c 0b 21 81 33 32 33 32 31 37 30 33 34]
PRI Span: 1 > Calling Party Number (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, verified and passed (1) '323217034' ]
PRI Span: 1 > [70 0e 80 30 30 33 33 36 32 35 30 38 31 39 35 34]
PRI Span: 1 > Called Party Number (len=16) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '0033625081954' ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)


2ème example d'Al3x avec callerid 0:


Executing [00033625081954@from-sip-cyril:1] NoOp("SIP/7034-000000fc", "Outbound international call to number ==> 0033625081954") in new stack
-- Executing [00033625081954@from-sip-cyril:2] NoOp("SIP/7034-000000fc", "0") in new stack
-- Executing [00033625081954@from-sip-cyril:3] Set("SIP/7034-000000fc", "CALLERID(number)=0000000000") in new stack
-- Executing [00033625081954@from-sip-cyril:4] SetCallerPres("SIP/7034-000000fc", "prohib") in new stack
-- Executing [00033625081954@from-sip-cyril:5] Dial("SIP/7034-000000fc", "DAHDI/g11/0033625081954") in new stack
PRI Span: 1 -- Making new call for cref 32834
-- Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=46
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 66/0x42) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=64, window is open V(A)=64 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=46
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 66/0x42) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a3]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 > User information layer 1: A-Law (35)
PRI Span: 1 > [18 03 a1 83 81]
PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
PRI Span: 1 > ChanSel: As indicated in following octets
PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 > Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 > [6c 0c 21 81 30 30 30 30 30 30 30 30 30 30]
PRI Span: 1 > Calling Party Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, verified and passed (1) '0000000000' ]
PRI Span: 1 > [70 0e 80 30 30 33 33 36 32 35 30 38 31 39 35 34]
PRI Span: 1 > Called Party Number (len=16) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '0033625081954' ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)


test de F6HQZ:


Parsing '/etc/asterisk/unistim.conf': == Found
== Using SIP RTP CoS mark 5
-- Executing [00033625081954@from-sip-cyril:1] NoOp("SIP/7034-000000fe", "Outbound international call to number ==> 0033625081954") in new stack
-- Executing [00033625081954@from-sip-cyril:2] NoOp("SIP/7034-000000fe", "0") in new stack
-- Executing [00033625081954@from-sip-cyril:3] Set("SIP/7034-000000fe", "CALLERID(number)=000ABCD000") in new stack
-- Executing [00033625081954@from-sip-cyril:4] SetCallerPres("SIP/7034-000000fe", "prohib") in new stack
-- Executing [00033625081954@from-sip-cyril:5] Dial("SIP/7034-000000fe", "DAHDI/g11/0033625081954") in new stack
PRI Span: 1 -- Making new call for cref 32835
-- Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=46
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 67/0x43) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=72, window is open V(A)=72 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=46
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 67/0x43) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a3]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 > User information layer 1: A-Law (35)
PRI Span: 1 > [18 03 a1 83 81]
PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
PRI Span: 1 > ChanSel: As indicated in following octets
PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 > Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 > [6c 0c 21 81 30 30 30 41 42 43 44 30 30 30]
PRI Span: 1 > Calling Party Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation allowed, User-provided, verified and passed (1) '000ABCD000' ]
PRI Span: 1 > [70 0e 80 30 30 33 33 36 32 35 30 38 31 39 35 34]
PRI Span: 1 > Called Party Number (len=16) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '0033625081954' ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)



peu importe ce que j'indique pour "prohiber" le CLI le paramètre présentation est toujours avec la même valeur:
Presentation allowed, User-provided, verified and passed

Je pense que c'est peut-être un bug car la pas moyen de modifier ce paramètre de présentation.

Cordialement.

al3x
24/04/2013, 16h01
Chan_dahdi.conf & version DAHDI ?

dose
24/04/2013, 16h17
Bon j'ai trouvé d'où vient le problème, tellement facile que c'est énervant.

En fait dans chan_dahdi.conf j'avais bien fait mon include de dahdi-channels.conf juste en dessous de [channels]

il y avait bien le paramètre de usecallingpres=yes plus bas dans la configuration mais il n'était pas pris en compte par Asterisk, car si usecallingpres se trouve après ma déclaration de channel ce dernier n'était pas pris en compte.

donc pour corriger le problème j'ai tout simplement modifié dahdi-channels.conf et ajouté usecallingpres=yes avant les channels


group=0,11
context=from-colt-isdn
switchtype = euroisdn
signalling = pri_cpe
usecallingpres=yes
channel => 1-15,17-31



Voilà une bonne journée de perdue juste pour ce paramètre à la mauvaise place...

Merci à tous pour vos propositions et bonne continuation!

al3x
24/04/2013, 16h26
Cool, bonne suite !