Andreas Ruf
2009-May-25 09:54 UTC
[asterisk-users] Connected Number on incoming calls with mISDN
Hello list, we have a problem with ISDN-Phones (not cell, not analog) calling into our Asterisk-Server. Assume we have the number (Germany) +49 123 4567 89 to be called from one ISDN-Phone. I will term (0)123 local dialling code, 4567 base number of our ISDN-line and 89 the extension (of our Asterisk-Server) to be actually called. If a call is initiated from an ISDN-Phone to 0123 4567 89 and it gets connected by asterisk, the display of the ISDN-Phone shows the called Number like "0123 4567 4567 89". The local dialling code 0123 and the first appearance of the base number 4567 are O.K.. The second displaying of the base number 4567 is not O.K.. There should be only the extension 89 shown. The Log attached below shows, that this comes from an empty/not set "cad" and so chan_misdn sets variable "cad" to the value of variable "dad" (which is 4567 89, base number + extension). So our "dad" is always set to base number + extension (4567 89). And variable "cad" being empty, is set to variable "dad". What possibilities are there to get correct handling of this "misbehaviour"? - Can we configure something to get "dad" set to extension only? - Can we configure something to get "cad" set to extension only? Not evaluating the value of "dad"? - For chan_capi there is a variable termed "CONNECTEDNUMBER" in Asterisk. With this variable the value of the "connected number" can be explicitly set. Is there a similar variable in Asterisk for chan_misdn? - Something else? Many thanks in advance Sincerely Andreas Ruf Our setup and Logs: ISDN (Germany): BRI Point-to-Point (Anlagenanschluss) ISDN-Card: BN4S0 ISDN card Asterisk: 1.4.24.1 (+ integrated "chan_misdn") mISDN: 1.1.9.1 (from www.misdn.org) (FreePBX: 2.5.1.2) (Debian/Lenny: 2.6.26) misdn.conf: [general] misdn_init=/etc/misdn-init.conf debug=0 ntdebugflags=0 ntdebugfile=/var/log/misdn-nt.log ntkeepcalls=no bridging=no l1watcher_timeout=60 stop_tone_after_first_digit=yes append_digits2exten=yes dynamic_crypt=no crypt_prefix=** crypt_keys=test,muh [default] context=from-pstn language=de musicclass=default senddtmf=yes far_alerting=no allowed_bearers=all nationalprefix=0 internationalprefix=00 rxgain=0 txgain=5 te_choose_channel=no pmp_l1_check=no reject_cause=16 need_more_infos=no nttimeout=no method=standard overlapdial=yes dialplan=0 localdialplan=0 cpndialplan=0 early_bconnect=yes incoming_early_audio=no nodialtone=no immediate=no presentation=-1 screen=-1 echotraining=no jitterbuffer=4000 jitterbuffer_upper_threshold=0 hdlc=no max_incoming=-1 max_outgoing=-1 [isdn_provider] ; define your ports, e.g. 1,2 (depends on mISDN-driver loading order) ports=1,2,3,4 ; context where to go to when incoming Call on one of the above ports context=from-pstn msns=* max_incoming=4 max_outgoing=4 misdn.log: Wed May 20 12:31:33 2009: P[ 2] I IND :NEW_CHANNEL oad:611xxxxxxx dad:4567 pid:13 state:none Wed May 20 12:31:33 2009: P[ 2] --> channel:1 mode:TE cause:16 ocause:16 rad: cad: Wed May 20 12:31:33 2009: P[ 2] --> info_dad: onumplan:2 dnumplan:4 rnumplan: cpnnumplan:0 Wed May 20 12:31:33 2009: P[ 2] --> caps:Speech pi:0 keypad: sending_complete:0 Wed May 20 12:31:33 2009: P[ 2] --> screen:0 --> pres:0 Wed May 20 12:31:33 2009: P[ 2] --> addr:0 l3id:40007 b_stid:0 layer_id:50010280 Wed May 20 12:31:33 2009: P[ 2] --> facility:Fac_None out_facility:Fac_None Wed May 20 12:31:33 2009: P[ 2] --> urate:0 rate:16 mode:0 user1:0 Wed May 20 12:31:33 2009: P[ 2] --> bc:0x8acdf9c h:0 sh:0 Wed May 20 12:31:33 2009: P[ 2] --> bc_state:BCHAN_CLEANED Wed May 20 12:31:33 2009: P[ 2] Chan not existing at the moment bc->l3id:40007 bc:0x8acdf9c event:NEW_CHANNEL port:2 channel:1 Wed May 20 12:31:33 2009: P[ 2] NO USERUESRINFO Wed May 20 12:31:33 2009: P[ 2] find_free_chan: req_chan:1 Wed May 20 12:31:33 2009: P[ 2] --> found chan (preselected): 1 Wed May 20 12:31:33 2009: P[ 2] set_chan_in_stack: 1 Wed May 20 12:31:33 2009: P[ 2] $$$ Setting up bc with stid :10010200 Wed May 20 12:31:33 2009: P[ 2] setup_bc: with dsp Wed May 20 12:31:33 2009: P[ 2] --> Channel is 1 Wed May 20 12:31:33 2009: P[ 2] --> TRANSPARENT Mode Wed May 20 12:31:33 2009: P[ 2] $$$ Bchan Activated addr 50010202 Wed May 20 12:31:33 2009: P[ 2] BC_STATE_CHANGE: l3id:40007 from:BCHAN_CLEANED to:BCHAN_ACTIVATED Wed May 20 12:31:33 2009: P[ 2] lib Got Prim: Addr 42000203 prim 30582 dinfo 40007 Wed May 20 12:31:33 2009: P[ 2] I IND :SETUP oad:611xxxxxxx dad:4567 pid:13 state:none Wed May 20 12:31:33 2009: P[ 2] --> channel:1 mode:TE cause:16 ocause:16 rad: cad: Wed May 20 12:31:33 2009: P[ 2] --> info_dad: onumplan:2 dnumplan:4 rnumplan: cpnnumplan:0 Wed May 20 12:31:33 2009: P[ 2] --> caps:Speech pi:0 keypad: sending_complete:0 Wed May 20 12:31:33 2009: P[ 2] --> screen:0 --> pres:0 Wed May 20 12:31:33 2009: P[ 2] --> addr:50010202 l3id:40007 b_stid:10010200 layer_id:50010280 Wed May 20 12:31:33 2009: P[ 2] --> facility:Fac_None out_facility:Fac_None Wed May 20 12:31:33 2009: P[ 2] --> urate:0 rate:16 mode:0 user1:0 Wed May 20 12:31:33 2009: P[ 2] --> bc:0x8acdf9c h:0 sh:0 Wed May 20 12:31:33 2009: P[ 2] --> bc_state:BCHAN_ACTIVATED Wed May 20 12:31:33 2009: P[ 2] --> Bearer: Speech Wed May 20 12:31:33 2009: P[ 2] --> Codec: Alaw Wed May 20 12:31:33 2009: P[ 0] --> * NEW CHANNEL dad:4567 oad:611xxxxxx Wed May 20 12:31:33 2009: P[ 2] read_config: Getting Config Wed May 20 12:31:33 2009: P[ 2] config_jb: Called Wed May 20 12:31:33 2009: P[ 2] --> * CallGrp: PickupGrp: Wed May 20 12:31:33 2009: P[ 2] --> CTON: Unknown Wed May 20 12:31:33 2009: P[ 2] --> EXPORT_PID: pid:13 Wed May 20 12:31:33 2009: P[ 2] --> PRES: Allowed (0) Wed May 20 12:31:33 2009: P[ 2] --> SCREEN: Unscreened (0) Wed May 20 12:31:33 2009: P[ 2] * Queuing chan 0x8b0a450 Wed May 20 12:31:33 2009: P[ 2] CONTEXT:from-pstn Wed May 20 12:31:33 2009: P[ 2] I SEND:SETUP_ACKNOWLEDGE oad:0611xxxxxxx dad:4567 pid:13 Wed May 20 12:31:33 2009: P[ 2] --> bc_state:BCHAN_ACTIVATED Wed May 20 12:31:33 2009: P[ 2] --> channel:1 mode:TE cause:16 ocause:16 rad: cad: Wed May 20 12:31:33 2009: P[ 2] --> info_dad: onumplan:2 dnumplan:4 rnumplan: cpnnumplan:0 Wed May 20 12:31:33 2009: P[ 2] --> caps:Speech pi:0 keypad: sending_complete:0 Wed May 20 12:31:33 2009: P[ 2] --> screen:0 --> pres:0 Wed May 20 12:31:33 2009: P[ 2] --> addr:50010202 l3id:40007 b_stid:10010200 layer_id:50010280 Wed May 20 12:31:33 2009: P[ 2] --> facility:Fac_None out_facility:Fac_None Wed May 20 12:31:33 2009: P[ 2] --> urate:0 rate:16 mode:0 user1:0 Wed May 20 12:31:33 2009: P[ 2] --> bc:0x8acdf9c h:0 sh:0 Wed May 20 12:31:33 2009: P[ 2] Sending msg, prim:30d80 addr:41000204 dinfo:40007 Wed May 20 12:31:33 2009: P[ 2] GOT SETUP OK Wed May 20 12:31:33 2009: P[ 0] Waking up misdn_tasks thread Wed May 20 12:31:33 2009: P[ 2] Freeing Msg on prim:30582 Wed May 20 12:31:33 2009: P[ 2] BCHAN: bchan ACT Confirm pid:13 Wed May 20 12:31:33 2009: P[ 2] overlap dial task, chan_state: 1 Wed May 20 12:31:34 2009: P[ 2] handle_frm: frm->addr:42000203 frm->prim:37b82 Wed May 20 12:31:34 2009: P[ 2] lib Got Prim: Addr 42000203 prim 37b82 dinfo 40007 Wed May 20 12:31:34 2009: P[ 2] I IND :INFORMATION oad:0611xxxxxx dad:4567 pid:13 state:WAITING4DIGS Wed May 20 12:31:34 2009: P[ 2] --> channel:1 mode:TE cause:16 ocause:16 rad: cad: Wed May 20 12:31:34 2009: P[ 2] --> info_dad:89 onumplan:2 dnumplan:4 rnumplan: cpnnumplan:0 Wed May 20 12:31:34 2009: P[ 2] --> caps:Speech pi:0 keypad: sending_complete:0 Wed May 20 12:31:34 2009: P[ 2] --> screen:0 --> pres:0 Wed May 20 12:31:34 2009: P[ 2] --> addr:50010202 l3id:40007 b_stid:10010200 layer_id:50010280 Wed May 20 12:31:34 2009: P[ 2] --> facility:Fac_None out_facility:Fac_None Wed May 20 12:31:34 2009: P[ 2] --> urate:0 rate:16 mode:0 user1:0 Wed May 20 12:31:34 2009: P[ 2] --> bc:0x8acdf9c h:0 sh:0 Wed May 20 12:31:34 2009: P[ 2] --> bc_state:BCHAN_ACTIVATED Wed May 20 12:31:34 2009: P[ 2] --> None Wed May 20 12:31:34 2009: P[ 2] Freeing Msg on prim:37b82 Wed May 20 12:31:37 2009: P[ 2] overlap dial task, chan_state: 1 Wed May 20 12:31:38 2009: P[ 2] overlap dial task, chan_state: 1 Wed May 20 12:31:38 2009: P[ 2] --> None Wed May 20 12:31:38 2009: P[ 2] * ANSWER: Wed May 20 12:31:38 2009: P[ 2] --> Connection is without BF encryption Wed May 20 12:31:38 2009: P[ 2] --> None Wed May 20 12:31:38 2009: P[ 2] --> empty cad using dad Wed May 20 12:31:38 2009: P[ 2] I SEND:CONNECT oad:0611xxxxxxx dad:456789 pid:13 Wed May 20 12:31:38 2009: P[ 2] --> bc_state:BCHAN_ACTIVATED Wed May 20 12:31:38 2009: P[ 2] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:456789 Wed May 20 12:31:38 2009: P[ 2] --> info_dad:0 onumplan:2 dnumplan:4 rnumplan: cpnnumplan:0 Wed May 20 12:31:38 2009: P[ 2] --> caps:Speech pi:0 keypad: sending_complete:0 Wed May 20 12:31:38 2009: P[ 2] --> screen:0 --> pres:0 Wed May 20 12:31:38 2009: P[ 2] --> addr:50010202 l3id:40007 b_stid:10010200 layer_id:50010280 Wed May 20 12:31:38 2009: P[ 2] --> facility:Fac_None out_facility:Fac_None Wed May 20 12:31:38 2009: P[ 2] --> urate:0 rate:16 mode:0 user1:0 Wed May 20 12:31:38 2009: P[ 2] --> bc:0x8acdf9c h:0 sh:0 Wed May 20 12:31:38 2009: P[ 2] Sending msg, prim:30780 addr:41000204 dinfo:40007 Wed May 20 12:31:38 2009: P[ 2] * IND : Indication [-1] from s Wed May 20 12:31:38 2009: P[ 2] --> * IND : -1! (stop indication) pid:13 Wed May 20 12:31:38 2009: P[ 2] --> None Wed May 20 12:31:38 2009: P[ 2] handle_frm: frm->addr:42000203 frm->prim:30f82 Wed May 20 12:31:38 2009: P[ 2] $$$ bc already setup stid :10010200 (state:BCHAN_ACTIVATED) Wed May 20 12:31:38 2009: P[ 2] ph_control: c1:2100 c2:0 Wed May 20 12:31:38 2009: P[ 2] ec_enable Wed May 20 12:31:38 2009: P[ 2] lib Got Prim: Addr 42000203 prim 30f82 dinfo 40007 Wed May 20 12:31:38 2009: P[ 2] I IND :CONNECT_ACKNOWLEDGE oad:0611xxxxxx dad:456789 pid:13 state:CONNECTED Wed May 20 12:31:38 2009: P[ 2] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:456789 Wed May 20 12:31:38 2009: P[ 2] --> info_dad:0 onumplan:2 dnumplan:4 rnumplan: cpnnumplan:0 Wed May 20 12:31:38 2009: P[ 2] --> caps:Speech pi:0 keypad: sending_complete:0 Wed May 20 12:31:38 2009: P[ 2] --> screen:0 --> pres:0 Wed May 20 12:31:38 2009: P[ 2] --> addr:50010202 l3id:40007 b_stid:10010200 layer_id:50010280 Wed May 20 12:31:38 2009: P[ 2] --> facility:Fac_None out_facility:Fac_None ...