ПРОБЛЕМА РЕШЕНА (по крайней мере отбоев пока нет).
Дела было в основном с выборе предпочтения порта AddPac.
Звонок проходил на астериск только тогда, когда первым в очереди предаочтения оказывался voip порт.
Если первым был pots, то звонок уходил в никуда.
206     <CEP    000000> : GSM CID : time() callingNumber(79128564457) callingName()
207     <CEP    000000> : Calling number(79128564457)
208     <CEP    000000> : Call id(85c4cd4e-6b12-7874-8071-0002a4083d1e) callNum(79)
209     <Call   79>     : MatchAllProcess After Sorted
!!!!! ВОТ ОН id=300!!!
                          <0>  id(300) dest(T) prefer(0) selected(6)
                          <1>  id(1) dest(T) prefer(0) selected(34)
                          <2>  id(0) dest(T) prefer(0) selected(38)
210     <Call   79>     : Initiate callee with dial-peer(T) status(CalleeDeterminedAll) id(85c4cd4e-6b12-7874-8071-0002a4083d1e)
211     <NetEP  79>     : InitiateOutCall: calledNum(202)  callingNum(79128564457) target(sip-server)
212     <NetEP  79>     : DoCall: calledAddr(sip:202@192.168.4.1:5060) callingAddr(79128564457)
213     <SIP    79>     : SetLocalAudioFormats : outbound(TRUE) hqaEnable(FALSE)
214     <SIP    79>     : SetLocalAudioFormats : myVoipPeer(300) is not NULL, voiceCodecClass(0)
215     <SIP    79>     : SetLocalAudioFormats : outbound(TRUE) hqaEnable(FALSE)
216     <SIP    79>     : SetLocalAudioFormats : myVoipPeer(300) is not NULL, voiceCodecClass(0)
217     <SIP    0>      : No authentication information available 218     <SIP    79>     : Send INVITE Request
219     <SIP    79>     : Receive 100 Trying
220     <SIP    79>     : Transaction (14 INVITE) proceeding
221     <SIP    79>     : Receive 200 OK
222     <SIP    79>     : Received INVITE OK response
223     <SIP    79>     : Send ACK Request
224     <SIP    79>     : SetLocalAudioFormats : outbound(TRUE) hqaEnable(FALSE)
Поэтому в конфиге addpac пришлось добавить:
! Pots peer configuration. 
! 
dial-peer voice 0 pots
 destination-pattern T 
 port 0/0 
 user-name peer-gsm-1 
 preference 2 ! выбирать вторым всегда
! 
dial-peer voice 1 pots
 destination-pattern T 
 port 0/1 
 user-name peer-gsm-1 
 preference 1 ! выбирать первым всегда
! 
! 
! 
! Voip peer configuration. 
! 
dial-peer voice 300 voip 
 destination-pattern T 
 preference 0 ! можно не писать по умолчанию у всех preference = 0
 session target sip-server  
 session protocol sip 
 voice-class codec 0 
 no vad
 dtmf-relay info 
 fax protocol t38 redundancy 0 
 fax rate 9600 
! 
И для уверенности провожу регистрацию voip пеера на asteriske
! SIP UA configuration. 
! 
sip-ua 
 user-register !! регистрируем имя указанное в pots
 sip-server 192.168.4.1 
 register e164 !! регистрируем SIP
 hook-flash-info-ignore 
На Asterisk описание пира такое
...
[peer-gsm-1]
accountcode=sipgsm-1
type=friend
call-limit=2 !так как у нас 2 линии, то по этому аккаунту не более 2 линий занимать.
context=gsm-in
host=dynamic
deny=0.0.0.0/0
permit=192.168.4.8
nat=no
canreinvite=no
disallow=all
allow=alaw
allow=ulaw
username=peer-gsm-1 ! это имя должно соответствовать имени пира. По другому не работает.
qualify=yes
maxcallbitrate=64
dtmfmode=info
...
Все, теперь звонки по GSM ходят туда и обратно.
			
			
									
						
										
						
