[asterisk-ss7] Undesired striping of leading zero?

Paul Timmins paul at timmins.net
Sat May 10 18:03:38 CDT 2008


Replies inline



On Sat, 2008-05-10 at 23:09 +0100, Magnus Kelly wrote:
> Hello,
> 
> I am making good steady progress with a msc to sip service using
> libss7, but on testing sip inward to msc calls it appears that the
> leading zero is missing from both the called number and the calling
> number, which causes both routing issues in the msc and the caller id
> showing up on the called mobile missing the leading 0 for caller id, I
> suspect it’s configurable in the zapta.conf file but googling has not
> yet helped?

ss7_called_nai=dynamic
ss7_calling_nai=dynamic
ss7_internationalprefix = 00
ss7_nationalprefix = 0
ss7_subscriberprefix = 
ss7_unknownprefix = 

This tells asterisk to remove a 00, and set the dialplan to
"International", and remove a "0" and set the dialplan to national.

If you need the leading zero in the front, change ss7_calling_nai to
"national" and it will ignore the dynamic plan for Calling Party Number,
always setting it as "National". This may of course cause undesired
operation but in that case you'll have to perform some sort of
modification to the caller ID to mark it as national or international
(such as prepending it with like 1111 or 1112 to mark international or
national respectively, and setting the ss7_xxxprefix stuff right, but
that'd be a huge pain).

Note that this rule also prepends a 0 to any call marked national, and
00 to any call marked as international to the called party number, and
that's probably why you're using it.

> The call is dialled as “exten => _07892111XXX,1,Dial(Zap/37/${EXTEN})”
> 
>  
> 
> And the 2nd question is how to dial from Chan 37 and up, instead of
> hardcoding it as Zap/37?

If you want to use seperate groups, you can do this:

group=1
cicbeginswith = 1
channel = 1-31
group=2
cicbeginswith = 32
channel = 32-64
group=3
cicbeginswith = 65
channel = 65-100

etc.

That would allow you to dial
Zap/g1/xxxxxx to use TCIC 1-31
Zap/g2/xxxxxx to use TCIC 32-64
Zap/g3/xxxxxx to use TCIC 65-100

There are other variants:
      * g: select the lowest-numbered non-busy Zap channel (aka.
        ascending sequential hunt group).
      * G: select the highest-numbered non-busy Zap channel (aka.
        descending sequential hunt group).
      * r: use a round-robin search, starting at the next highest
        channel than last time (aka. ascending rotary hunt group).
      * R: use a round-robin search, starting at the next lowest channel
        than last time (aka. descending rotary hunt group)

See: http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels for more
details

> One further question puzzling me is how might be possible to play
> music instead of ringback as do other cell operators? Can asterisk do
> this?

Good question. I could get an ISUP dump of such a call, if that helps.
-Paul

> Regards
> 
> Magnus
> 
>  
> 
> SS7 Trace & Zapata below
> 
>  
> 
> =========================================================================
> 
> Connected to Asterisk SVN-trunk-r111909 currently running on
> c7asterisk (pid = 3230)
> 
> c7asterisk*CLI>
> 
> c7asterisk*CLI> ss7 debug linkset 3
> 
> Enabled debugging on linkset 3
> 
>         Network Indicator: 3 Priority: 0 User Part: ISUP (5)
> 
>         [ c5 ]
> 
>         OPC 1025 DPC 1024 SLS 5
> 
>         [ 00 44 00 51 ]
> 
>                 CIC: 69
> 
>                 [ 45 00 ]
> 
>                 Message Type: IAM
> 
>                 [ 01 ]
> 
>                 --FIXED LENGTH PARMS[4]--
> 
>                 Nature of Connection Indicator:
> 
>                         Satellites in connection: 0
> 
>                         Continuity Check: Check not required (0)
> 
>                         Outgoing half echo control device: not
> included (0)
> 
>                         [ 00 ]
> 
>                 Forward Call Indicators:
> 
>                         Nat/Intl Call Ind: call to be treated as a
> national call (0)
> 
>                         End to End Method Ind: no end-to-end method(s)
> available (0)
> 
>                         Interworking Ind: no interworking encountered
> (0)
> 
>                         End to End Info Ind: no end-to-end information
> available (0)
> 
>                         ISDN User Part Ind: ISDN user part used all
> the way (1)
> 
>                         ISDN User Part Pref Ind: ISDN user part not
> preferred all the way (1)
> 
>                         ISDN Access Ind: originating access ISDN (1)
> 
>                         SCCP Method Ind: no indication (0)
> 
>                         [ 60 01 ]
> 
>                 Calling Party Category:
> 
>                         Category: Ordinary calling subscriber (10)
> 
>                         [ 0a ]
> 
>                 Transmission Medium Requirements:
> 
>                         Speech (0)
> 
>                         [ 00 ]
> 
>                 --VARIABLE LENGTH PARMS[1]--
> 
>                 Called Party Number:
> 
>                         Nature of address: 3
> 
>                         NI: 0
> 
>                         Numbering plan: 1
> 
>                         Address signals: 7892111023#
> 
>                         [ 08 83 10 87 29 11 01 32 0f ]
> 
>                 --OPTIONAL PARMS--
> 
>                 Calling Party Number:
> 
>                         Nature of address: 3
> 
>                         NI: 0
> 
>                         Numbering plan: 1
> 
>                         Presentation: 0
> 
>                         Screening: 0
> 
>                         Address signals: 7711590311
> 
>                         [ 0a 07 03 10 77 11 95 30 11 ]
> 
> c7asterisk*CLI>
> 
> Len = 14 [ c9 c8 0b c5 01 04 00 51 45 00 06 16 d4 00 ]
> 
> FSN: 72 FIB 1
> 
> BSN: 73 BIB 1
> 
> <[1] MSU
> 
> [ c9 c8 0b ]
> 
>         Network Indicator: 3 Priority: 0 User Part: ISUP (5)
> 
>         [ c5 ]
> 
>         OPC 1024 DPC 1025 SLS 5
> 
>         [ 01 04 00 51 ]
> 
>                 CIC: 69
> 
>                 [ 45 00 ]
> 
> c7asterisk*CLI> Message Type: ACM
> 
>                 [ 06 ]
> 
>                 --FIXED LENGTH PARMS[1]--
> 
>                 Backward Call Indicator:
> 
>                         Charge indicator: 2
> 
>                         Called party's status indicator: 1
> 
>                         Called party's category indicator: 1
> 
>                         End to End method indicator: 0
> 
>                         Interworking indicator: 0
> 
>                         End to End information indicator: 0
> 
>                         ISDN user part indicator: 1
> 
>                         Holding indicator: 0
> 
>                         ISDN access indicator: 1
> 
>                         Echo control device indicator: 0
> 
>                         SCCP method indicator: 1
> 
>                         [ 16 d4 ]
> 
> Zapata.conf
> 
> ;
> 
> [trunkgroups]
> 
> ;
> 
> [channels]
> 
> ;
> 
> language=en
> 
> context=msc-in
> 
> signalling=ss7
> 
> callwaiting=yes
> 
> usecallingpres=yes
> 
> threewaycalling=yes
> 
> transfer=yes
> 
> canpark=yes
> 
> cancallforward=yes
> 
> callreturn=yes
> 
> echocancel=yes
> 
> echocancelwhenbridged=yes
> 
> group=1
> 
> callgroup=1
> 
> pickupgroup=1
> 
> ;tonezone = 0 ; 0 is US
> 
> ss7type = itu
> 
> ss7_called_nai=dynamic
> 
> ss7_calling_nai=dynamic
> 
> ;
> 
> ss7_internationalprefix = 00
> 
> ss7_nationalprefix = 0
> 
> ss7_subscriberprefix = 
> 
> ss7_unknownprefix = 
> 
> ;
> 
> pointcode = 1025
> 
> adjpointcode = 1024
> 
> defaultdpc = 1024
> 
> ;
> 
> cicbeginswith = 33
> 
> channel = 32-46
> 
> cicbeginswith = 49
> 
> channel = 48-62
> 
> cicbeginswith = 65
> 
> channel = 63-77
> 
> cicbeginswith = 81
> 
> channel = 79-93
> 
> networkindicator=national_spare
> 
> sigchan = 47
> 
> sigchan = 78
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-ss7 mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-ss7




More information about the asterisk-ss7 mailing list