Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sip Trunk to Asterisk System

Status
Not open for further replies.

coolbrad

IS-IT--Management
Aug 4, 2005
55
US
I am trying to setup a sip trunk between an IP406 and a Asterisk system. I am able to get inbound calls from the Asterisk side to the IPO, but I cannot make an outbound call from the IPO. I get invalid sip header from the Asterisk side. Please Help.
 
20580482mS SipDebugInfo: CMMediaSTUNFilter substituting

20580483mS SipDebugInfo: extension is dialing 3147577993

20580483mS SipDebugInfo: CMSetup receive, ep fee05868, dialog fedc9f7c
20580483mS SipDebugInfo: MZ extension is dialing 3147577993
20580484mS SipDebugInfo: *********************************************************
20580484mS SipDebugInfo: INVITE (method) SENT TO 63.246.27.240 5060
20580484mS SipDebugInfo: Registration Required is 1, Primary Status 1, Secondary Status 1
20580484mS SipDebugInfo: *********************************************************
20580488mS SipDebugInfo: *********************************************************
20580489mS SipDebugInfo: TxInvite: INVITE SENT TO 63.246.27.240 5060
20580489mS SipDebugInfo: *********************************************************
20580489mS SipDebugInfo: Sending INVITE, ep fee05868, dialog fedc9f7c
20580490mS SipDebugInfo: Sip_sendToNetwork packet of length 770
20580491mS SipDebugInfo: SIPTrunk SendToTarget 3ff61bf0, 5060
20580491mS SIP Trunk: 9:Tx
INVITE Tel:+3147577993 SIP/2.0
Via: SIP/2.0/UDP 97.87.83.10:50445;rport;branch=z9hG4bKd78b2d852a4f7b21ab56a0a8389191cc
From: P1_100064 <sip:p1_100064@63.246.27.240>;tag=4cf9126494fd787e
To: Tel:+3147577993
Call-ID: c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
CSeq: 596201423 INVITE
Contact: P1_100064 <sip:p1_100064@97.87.83.10:50445;transport=udp>
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Content-Type: application/sdp
Content-Length: 299

v=0
o=UserA 2126371058 3296815812 IN IP4 97.87.83.10
s=Session SDP
c=IN IP4 97.87.83.10
t=0 0
m=audio 50458 RTP/AVP 8 18 4 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:0 PCMU/8000
a=fmtp:18 annexb = no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
20580491mS SIP Tx: UDP 10.50.50.10:5060 -> 63.246.27.240:5060

INVITE Tel:+3147577993 SIP/2.0
Via: SIP/2.0/UDP 97.87.83.10:50445;rport;branch=z9hG4bKd78b2d852a4f7b21ab56a0a8389191cc
From: P1_100064 <sip:p1_100064@63.246.27.240>;tag=4cf9126494fd787e
To: Tel:+3147577993
Call-ID: c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
CSeq: 596201423 INVITE
Contact: P1_100064 <sip:p1_100064@97.87.83.10:50445;transport=udp>
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Content-Type: application/sdp
Content-Length: 299

v=0
o=UserA 2126371058 3296815812 IN IP4 97.87.83.10
s=Session SDP
c=IN IP4 97.87.83.10
t=0 0
m=audio 50458 RTP/AVP 8 18 4 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:0 PCMU/8000
a=fmtp:18 annexb = no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
20580492mS SipDebugInfo: initialising mTxnContext
20580493mS SipDebugInfo: *********************************************************
20580493mS SipDebugInfo: State Transtion form Old State 0 to New state 1
20580494mS SipDebugInfo: *********************************************************
20580494mS SipDebugInfo: SIPDialog::UpdateSDPState has just transitioned to state 1
20580583mS SIP Rx: UDP 63.246.27.240:5060 -> 10.50.50.10:5060

SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 97.87.83.10:50445;branch=z9hG4bKd78b2d852a4f7b21ab56a0a8389191cc;received=97.87.83.10;rport=50460
From: P1_100064 <sip:p1_100064@63.246.27.240>;tag=4cf9126494fd787e
To: Tel:+3147577993;tag=as08fad034
Call-ID: c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
CSeq: 596201423 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:Tel:+3147577993@63.246.27.240>
Content-Length: 0

20580583mS SIP Trunk: 9:Rx
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 97.87.83.10:50445;branch=z9hG4bKd78b2d852a4f7b21ab56a0a8389191cc;received=97.87.83.10;rport=50460
From: P1_100064 <sip:p1_100064@63.246.27.240>;tag=4cf9126494fd787e
To: Tel:+3147577993;tag=as08fad034
Call-ID: c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
CSeq: 596201423 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:Tel:+3147577993@63.246.27.240>
Content-Length: 0

20580584mS SipDebugInfo: MZ SIPDialog: ReceiveFromTarget
20580587mS SipDebugInfo: MZ SIPDialog TXN : Decoding of message Succeded 1
20580587mS SipDebugInfo: SIP: ProcessInbound Message
20580588mS SipDebugInfo: Find End Point c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
20580588mS SipDebugInfo: Process SIP response dialog fedc9f7c, method INVITE,CodeNum 404 in state 1
20580589mS SipDebugInfo: ExtractRouteFromRecord, entered
20580590mS SipDebugInfo: *********************************************************
20580590mS SipDebugInfo: State Transtion form Old State 1 to New state 17
20580590mS SipDebugInfo: *********************************************************
20580591mS SipDebugInfo: *********************************************************
20580591mS SipDebugInfo: SendSIPRequest: ACK SENT TO 63.246.27.240 5060
20580591mS SipDebugInfo: *********************************************************
20580594mS SipDebugInfo: Sip_sendToNetwork packet of length 380
20580594mS SipDebugInfo: SIPTrunk SendToTarget 3ff61bf0, 5060
20580594mS SIP Trunk: 9:Tx
ACK Tel:+3147577993 SIP/2.0
Via: SIP/2.0/UDP 97.87.83.10:50445;rport;branch=z9hG4bKd78b2d852a4f7b21ab56a0a8389191cc
From: P1_100064 <sip:p1_100064@63.246.27.240>;tag=4cf9126494fd787e
To: <sip:3147577993>;tag=as08fad034
Call-ID: c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
CSeq: 596201423 ACK
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Content-Length: 0

20580595mS SIP Tx: UDP 10.50.50.10:5060 -> 63.246.27.240:5060

ACK Tel:+3147577993 SIP/2.0
Via: SIP/2.0/UDP 97.87.83.10:50445;rport;branch=z9hG4bKd78b2d852a4f7b21ab56a0a8389191cc
From: P1_100064 <sip:p1_100064@63.246.27.240>;tag=4cf9126494fd787e
To: <sip:3147577993>;tag=as08fad034
Call-ID: c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
CSeq: 596201423 ACK
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Content-Length: 0

20580596mS CMLineRx: v=0
CMReleaseComp
Line: type=NoLine 0 Call: lid=0 id=-1 in=0
Cause=1, Unallocated (unassigned) number
20580597mS CMARS: LINE ep Received: CMReleaseComp - child->state = CMCSOffering - ARS Call State = CMCSOverlapRecv
20580602mS SipDebugInfo: Terminating dialog fedc9f7c, state 17 for cause 16
20580602mS CMARS: Target: Short_Code: N; - Line_Group_ID: 1 has been set to: CMARS_OUTOFSERVICE
20580603mS CMExtnCopyProcessCallMsg: v=3
CMProgress
Line: type=NoLine 0 Call: lid=0 id=1401 in=0
IE CMIEProgressIndicator (30) cs=CMCSITUT (0), loc=CMLUser (0), pd=CMPDInbandPattern (8)
Display [WAITING FOR LINE]
20580604mS CMExtnTxP: v=3
CMProgress
Line: type=DigitalExtn 3 Call: lid=0 id=1401 in=0
IE CMIEProgressIndicator (30) cs=CMCSITUT (0), loc=CMLUser (0), pd=CMPDInbandPattern (8)
Display [WAITING FOR LINE]
Timed: 18/12/07 21:49
20580604mS CMExtnTx: v=502, p1=0
CMProgress
Line: type=DigitalExtn 3 Call: lid=0 id=1401 in=0
IE CMIEProgressIndicator (30) cs=CMCSITUT (0), loc=CMLUser (0), pd=CMPDInbandPattern (8)
Display [WAITING FOR LINE]
Timed: 18/12/07 21:49
20580605mS SipDebugInfo: *********************************************************
20580605mS SipDebugInfo: State Transtion form Old State 17 to New state 40
20580605mS SipDebugInfo: *********************************************************
20580606mS SipDebugInfo: SipTrunks: Cannot free Txn Key 2015
20580616mS CD: CALL: 0.1401.0 State=1 Cut=3 Music=0.0 Aend="BCooper(502)" (1.19) Bend="" [] (0.0) CalledNum=3147577993 () CallingNum=502 (BCooper) Internal=1 Time=4241 AState=1
20582602mS CMARS: Retarget existing BUSY targets - Num of Busy Targets: 1 - Current Form: [8]
20582604mS CMMap: a=5.5 b=1.255 T
20582604mS CMMap: a=5.5 b=1.255 T
20582604mS CMMap: PCG::MapBChan pcp[75]b1r0 cp_b fee45cfe other_cp_b fee97c0e type CGTypeDTMF
20582604mS CMMap: a=5.5 b=1.19 M2
20582605mS CMMap: DTMF::playTones g T[31] ,EEEEE
20582605mS CMMap: Started playing tones, cp[75]b1r0 (from g null)
20582605mS CMMap: cp[75]b1r0 SetOperGroup from g null to g null not executed, playing tones in progress ,EEEEE
20582754mS RES: Tue 18/12/2007 21:49:36 FreeMem=47924272(22) CMMsg=5 (6) Buff=100 599 290 1084 3 Links=1931
20584426mS CMMap: PCG::UnmapBChan pcp[75]b1r0 cp_b fee45cfe other_cp_b fee97c0e
20584426mS CMMap: a=5.5 b=1.19 M0
20584427mS CMMap: a=5.5 b=0.0 T0
 
On lan 1 or 2 fill in at "lan setting" an IP of your avaya and that same adress should also be on the "network topology" tab under public ip adress firewall is open internet public port is 5060 and mark the Run stun on startup.

In your ARS;

Code= N;
Feat= Dial
Tel= N"@IpadressAsterisk"
Line group id= 0

good luck

greetzzz...Bas

___________________________________________
It works! Now if only I could remember what I did...
___________________________________________
 
Also in your sipline;

Mark registration required, in servic and re-invite and set in on g711 the rest is unmarked

When you fill in at the sip uri tab at display name Anonymouse then there will CLI send.

___________________________________________
It works! Now if only I could remember what I did...
___________________________________________
 
Found your problem yet?!

Looks like it goes wrong here;

INVITE Tel:+3147577993 SIP/2.0
Via: SIP/2.0/UDP 97.87.83.10:50445;rport;branch=z9hG4bKd78b2d852a4f7b21ab56a0a8389191cc
From: P1_100064 <sip:p1_100064@63.246.27.240>;tag=4cf9126494fd787e

>>>>>>>>>>>>>>>>>>>>>>>>>>>>> To: Tel:+3147577993

Call-ID: c7d1cb1b8259c04240aa482930f4fd2e@97.87.83.10
CSeq: 596201423 INVITE
Contact: P1_100064 <sip:p1_100064@97.87.83.10:50445;transport=udp>
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Content-Type: application/sdp
Content-Length: 299



To Tel: +314xxxx

Go to; line > SIP line > and un mark Use Tel URI this will remove Tel: and it will change it in to Sip:

And i think that you haf to remove your +31 and at a 0


Greetzzz....Bas


___________________________________________
It works! Now if only I could remember what I did...
___________________________________________
 
Have the exact same problem, only my system IS set to SIP!
Here is my log:

81110183mS SIP Trunk: 7:Tx
ACK sip:8104576522002@Voip-gk.lvivfarlep.net SIP/2.0
Via: SIP/2.0/UDP 195.95.147.2:5060;rport;branch=z9hG4bKd4616c83d2a66d9df07cadb2260d0b97
From: 2448348 <sip:2448348@voip-gk.lvivfarlep.net>;tag=d9401813c926d35a
To: <sip:8104576522002@Voip-gk.lvivfarlep.net>;tag=9fc1003e600e0c417d959233a7e35b42-afbf
Call-ID: 58dffac78a08484c1a2bff918e1ed588@195.95.147.2
CSeq: 1643336771 ACK
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, INFO
Content-Length: 0

81110188mS SipDebugInfo: *********************************************************
81110183mS SIP Tx: UDP 195.95.147.2:5060 -> 62.221.56.2:5060

ACK sip:8104576522002@Voip-gk.lvivfarlep.net SIP/2.0
Via: SIP/2.0/UDP 195.95.147.2:5060;rport;branch=z9hG4bKd4616c83d2a66d9df07cadb2260d0b97
From: 2448348 <sip:2448348@voip-gk.lvivfarlep.net>;tag=d9401813c926d35a
To: <sip:8104576522002@Voip-gk.lvivfarlep.net>;tag=9fc1003e600e0c417d959233a7e35b42-afbf
Call-ID: 58dffac78a08484c1a2bff918e1ed588@195.95.147.2
CSeq: 1643336771 ACK
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, INFO
Content-Length: 0

81110188mS SipDebugInfo: State Transtion form Old State 17 to New state 40
81110188mS SipDebugInfo: *********************************************************
81110188mS SipDebugInfo: SIP Line (7): Cannot free Txn Key 2015
81115183mS SipDebugInfo: Timer 4 callback
81115183mS SipDebugInfo: SIPDialog destructor ... f58e9dd4
81115183mS SipDebugInfo: Completed ... removing Dialog of CallId: 58dffac78a08484c1a2bff918e1ed588@195.95.147.2 and State: 40
81115183mS SipDebugInfo: SIPDialog - Free SDPBody....
81115184mS SipDebugInfo: ~SipTrunkEndpoint
81140488mS PRN: DCP message rejected because the terminal is off-hook. port 8024 type 5


The SIP provder guy tells me that the problem is that my first package comes without the number, so the gateway doesnt know it. How can i correct this?

Can you gurus help me?
 
Here is some of the asterisk log:
U 62.221.56.2:5060 -> 195.95.147.2:5060
~ BYE sip:2448348@195.95.147.2:5060 SIP/2.0..Via: SIP/2.0/UDP
62.221.56.2;branch=z9hG4bK0b7f.e55edc55.0..Via: SIP/2.0/UDP 62.221.56.5:506
~ 0;branch=z9hG4bK4734ad4f;rport=5060..From:
<sip:2403340@Voip-gk.lvivfarlep.net>;tag=as1fa21781..To: 2448348
<sip:2448348@voip-gk.lvivfa
~ rlep.net>;tag=df22272f0993b2e9..Call-ID:
92b35fa2074bcff8e5a5fd09654c7e11@195.95.147.2..CSeq: 102
BYE..User-Agent: Asterisk PBX..Max-Fo
~ rwards: 16..Content-Length: 0....

U 62.221.56.2:5060 -> 195.95.147.2:5060
~ BYE sip:2448348@195.95.147.2:5060 SIP/2.0..Via: SIP/2.0/UDP
62.221.56.2;branch=z9hG4bK0b7f.e55edc55.0..Via: SIP/2.0/UDP 62.221.56.5:506
~ 0;branch=z9hG4bK4734ad4f;rport=5060..From:
<sip:2403340@Voip-gk.lvivfarlep.net>;tag=as1fa21781..To: 2448348
<sip:2448348@voip-gk.lvivfa
~ rlep.net>;tag=df22272f0993b2e9..Call-ID:
92b35fa2074bcff8e5a5fd09654c7e11@195.95.147.2..CSeq: 102
BYE..User-Agent: Asterisk PBX..Max-Fo
~ rwards: 16..Content-Length: 0....
 
It was my sonicwall firewall. I upgraded to 4.1 and put the second lan right on the internet it is working great now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top