Please help with SIP configuration on 2801 router

Answered Question
Jan 24th, 2012

Hi All.

Please help me to setup a SIP account. I’m already struggling to do that for a few days, and can’t find out how to finish that. We have 2xISDN lines running, so I need to add a SIP trunk to existing config.

The information from our SIP provider:

We have issued the following DDI range: 018877000 – 99

There is no need to register the DDI’s as these will be offered to your PABX IP address provided to in the completed SIP trunking form.

Configuration details are as follows:

Our Primary Proxy:-        99.234.56.78

Codec supported:-             G711Alaw, G729 (G711Alaw is the preferred codec)

Fax Support:-                     T38 and G711Alaw

DTMF:-                                 RFC2833 and INFO

CLI Method:-                     Remote-Party-ID

Trunk doesn’t require registration; you just need to send Invite. In cisco this is done through Dial-peer session-target command. We are authenticating your IP address for outgoing calls and incoming calls we then forward to the IP mentioned in the sip form.

This is a SIP configuration on Cisco2801 router (I used outgoing calls only):

!

translation-rule 10

Rule 0 ^90 0

Rule 1 ^91 1

Rule 2 ^92 2

Rule 3 ^93 3

Rule 4 ^94 4

Rule 5 ^95 5

Rule 6 ^96 6

Rule 7 ^97 7

Rule 8 ^98 8

Rule 9 ^99 9

!

interface FastEthernet0/0.1

description ***DATA VLAN***

encapsulation dot1Q 1 native

ip address 10.1.1.101 255.255.255.0

!

interface FastEthernet0/0.2

description ***VOICE VLAN***

encapsulation dot1Q 2

ip address 192.168.22.1 255.255.255.0

!

!

voice service voip

allow-connections h323 to h323

allow-connections h323 to sip

allow-connections sip to h323

allow-connections sip to sip

supplementary-service h450.12

h323

  call start slow

sip

  bind control source-interface FastEthernet0/0.2

  bind media source-interface FastEthernet0/0.2

  registrar server expires max 36000 min 600

!

!

voice class codec 1

codec preference 1 g729r8

codec preference 2 g711ulaw

codec preference 3 g711alaw

!

!

dial-peer voice 1 pots

description ### External Dialling via BRI ###

preference 7

destination-pattern 9T

translate-outgoing called 10

direct-inward-dial

port 0/0/0

forward-digits all

!

dial-peer voice 2 pots

description ### External Dialling via BRI ###

preference 2

destination-pattern 9T

translate-outgoing called 10

direct-inward-dial

port 0/0/1

forward-digits all

!

!

dial-peer voice 9000 voip

description ** Outgoing calls to SIP **

preference 1

destination-pattern 9T

voice-class sip dtmf-relay force rtp-nte

session protocol sipv2

session target ipv4:99.234.56.78:5060

dtmf-relay rtp-nte

codec g711alaw

no vad

!

sip-ua

timers connect 100

sip-server ipv4:99.234.56.78

!

I used debugging commands to troubleshoot the calls.

!

2801(config-dial-peer)#

094509: Jan 24 09:27:06.204: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Calling Number=211, Called Number=, Voice-Interface=0x65FA35B4,

   Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE,

   Peer Info Type=DIALPEER_INFO_SPEECH

094510: Jan 24 09:27:06.204: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=20018

094511: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=9, Peer Info Type=DIALPEER_INFO_SPEECH

094512: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=9

094513: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094514: Jan 24 09:27:06.716: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094515: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90, Peer Info Type=DIALPEER_INFO_SPEECH

094516: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90

094517: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094518: Jan 24 09:27:06.816: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094519: Jan 24 09:27:06.912: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=908, Peer Info Type=DIALPEER_INFO_SPEECH

094520: Jan 24 09:27:06.912: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=908

094521: Jan 24 09:27:06.916: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094522: Jan 24 09:27:06.916: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094523: Jan 24 09:27:07.012: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=9086, Peer Info Type=DIALPEER_INFO_SPEECH

094524: Jan 24 09:27:07.012: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=9086

094525: Jan 24 09:27:07.016: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094526: Jan 24 09:27:07.016: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094527: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862, Peer Info Type=DIALPEER_INFO_SPEECH

094528: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862

094529: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094530: Jan 24 09:27:07.116: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094531: Jan 24 09:27:07.212: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=908621, Peer Info Type=DIALPEER_INFO_SPEECH

094532: Jan 24 09:27:07.212: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=908621

094533: Jan 24 09:27:07.216: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094534: Jan 24 09:27:07.216: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094535: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=9086215, Peer Info Type=DIALPEER_INFO_SPEECH

094536: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=9086215

094537: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094538: Jan 24 09:27:07.316: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094539: Jan 24 09:27:07.412: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157, Peer Info Type=DIALPEER_INFO_SPEECH

094540: Jan 24 09:27:07.412: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157

094541: Jan 24 09:27:07.416: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094542: Jan 24 09:27:07.416: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094543: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=908621577, Peer Info Type=DIALPEER_INFO_SPEECH

094544: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=908621577

094545: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094546: Jan 24 09:27:07.516: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094547: Jan 24 09:27:07.612: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=9086215777, Peer Info Type=DIALPEER_INFO_SPEECH

094548: Jan 24 09:27:07.612: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=9086215777

094549: Jan 24 09:27:07.616: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094550: Jan 24 09:27:07.616: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094551: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

094552: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

094553: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Partial Matches(1) after DP_MATCH_DEST

094554: Jan 24 09:27:07.716: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=MORE_DIGITS_NEEDED(1)

094555: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774T, Peer Info Type=DIALPEER_INFO_SPEECH

094556: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774T

094557: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

094558: Jan 24 09:27:10.711: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

094559: Jan 24 09:27:10.711: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=90862157774, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

094560: Jan 24 09:27:10.711: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

094561: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

094562: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

094563: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Calling Number=90862157774, Called Number=, Voice-Interface=0x0,

   Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,

   Peer Info Type=DIALPEER_INFO_SPEECH

094564: Jan 24 09:27:10.715: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=9000

094565: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

094566: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

094567: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

094568: Jan 24 09:27:10.715: //-1/6A877F6F9054/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

094569: Jan 24 09:27:10.719: fb_get_reject_cause_code: ERROR cause_code NULL

094570: Jan 24 09:27:10.727: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:90862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3

Remote-Party-ID: "Sam " <sip:211@192.168.22.1>;party=calling;screen=no;privacy=off

From: "Sam " <sip:211@192.168.22.1>;tag=CDCFB8AC-F98

To: <sip:90862157774@99.234.56.78>

Date: Tue, 24 Jan 2012 09:27:10 GMT

Call-ID: 6D3919CF-45A411E1-9059813F-74BAA80B@192.168.22.1

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 1787264879-1168380385-2421457215-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327397230

Contact: <sip:211@192.168.22.1:5060>

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 244

v=0

o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1

s=SIP Call

c=IN IP4 192.168.22.1

t=0 0

m=audio 18258 RTP/AVP 8 101

c=IN IP4 192.168.22.1

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

094571: Jan 24 09:27:11.227: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:90862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3

Remote-Party-ID: "Sam" <sip:211@192.168.22.1>;party=calling;screen=no;privacy=off

From: "Sam " <sip:211@192.168.22.1>;tag=CDCFB8AC-F98

To: <sip:90862157774@99.234.56.78>

Date: Tue, 24 Jan 2012 09:27:11 GMT

Call-ID: 6D3919CF-45A411E1-9059813F-74BAA80B@192.168.22.1

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 1787264879-1168380385-2421457215-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327397231

Contact: <sip:211@192.168.22.1:5060>

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 244

v=0

o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1

s=SIP Call

c=IN IP4 192.168.22.1

t=0 0

m=audio 18258 RTP/AVP 8 101

c=IN IP4 192.168.22.1

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

094572: Jan 24 09:27:12.227: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:90862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3

Remote-Party-ID: "Sam " <sip:211@192.168.22.1>;party=calling;screen=no;privacy=off

From: "Sam " <sip:211@192.168.22.1>;tag=CDCFB8AC-F98

To: <sip:90862157774@99.234.56.78>

Date: Tue, 24 Jan 2012 09:27:12 GMT

Call-ID: 6D3919CF-45A411E1-9059813F-74BAA80B@192.168.22.1

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 1787264879-1168380385-2421457215-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327397232

Contact: <sip:211@192.168.22.1:5060>

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 244

v=0

o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1

s=SIP Call

c=IN IP4 192.168.22.1

t=0 0

m=audio 18258 RTP/AVP 8 101

c=IN IP4 192.168.22.1

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

094573: Jan 24 09:27:14.227: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:90862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.22.1:5060;branch=z9hG4bK47D116D3

Remote-Party-ID: "Sam" <sip:211@192.168.22.1>;party=calling;screen=no;privacy=off

From: "Sam" <sip:211@192.168.22.1>;tag=CDCFB8AC-F98

To: <sip:90862157774@99.234.56.78>

Date: Tue, 24 Jan 2012 09:27:14 GMT

Call-ID: 6D3919CF-45A411E1-9059813F-74BAA80B@192.168.22.1

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 1787264879-1168380385-2421457215-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327397234

Contact: <sip:211@192.168.22.1:5060>

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 244

v=0

o=CiscoSystemsSIP-GW-UserAgent 3237 2021 IN IP4 192.168.22.1

s=SIP Call

c=IN IP4 192.168.22.1

t=0 0

m=audio 18258 RTP/AVP 8 101

c=IN IP4 192.168.22.1

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

I made some changes in the router configuration.

I removed FA0/0.2 Voice interface from Voice service voip configuration (bind control source-interface FastEthernet0/0.2 and bind media source-interface FastEthernet0/0.2). And now it’s using ip address 10.1.1.101 (data ip).

The debugging is changed now. I can send and receive a respond from SIP server. But  It shows an error: SIP/2.0 404 Not Found

Then it moves to ISDN line, and use this line to make a call.

102988: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774T, Peer Info Type=DIALPEER_INFO_SPEECH

102989: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774T

102990: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

102991: Jan 24 14:45:47.290: //-1/EDCA21089304/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

102992: Jan 24 14:45:47.290: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=90862157774, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

102993: Jan 24 14:45:47.290: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

102994: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

102995: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

102996: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Calling Number=90862157774, Called Number=, Voice-Interface=0x0,

   Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,

   Peer Info Type=DIALPEER_INFO_SPEECH

102997: Jan 24 14:45:47.294: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=9000

102998: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

102999: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

103000: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

103001: Jan 24 14:45:47.294: //-1/EDCA21089304/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

103002: Jan 24 14:45:47.298: fb_get_reject_cause_code: ERROR cause_code NULL

103003: Jan 24 14:45:47.310: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:90862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK4875CB9

Remote-Party-ID: "Sam" <sip:211@10.1.1.101>;party=calling;screen=no;privacy=off

From: "Seam" <sip:211@10.1.1.101>;tag=CEF37490-172C

To: <sip:90862157774@99.234.56.78>

Date: Tue, 24 Jan 2012 14:45:47 GMT

Call-ID: EF977E91-45D011E1-9309813F-74BAA80B@10.1.1.101

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 3989446920-1171263969-2466545983-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327416347

Contact: <sip:211@10.1.1.101:5060>

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 2438 9821 IN IP4 10.1.1.101

s=SIP Call

c=IN IP4 10.1.1.101

t=0 0

m=audio 19412 RTP/AVP 8 101

c=IN IP4 10.1.1.101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

103004: Jan 24 14:45:47.354: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Received:

SIP/2.0 404 Not Found

From: "Sam "<sip:211@10.1.1.101>;tag=CEF37490-172C

To: <sip:90862157774@99.234.56.78>;tag=7fad61f03708-100007f-13c4-55013-a0142-10fd12c8-a0142

Call-ID: EF977E91-45D011E1-9309813F-74BAA80B@10.1.1.101

CSeq: 101 INVITE

Via: SIP/2.0/UDP 10.1.1.101:5060;received=88.99.77.44;branch=z9hG4bK4875CB9

Content-Length: 0

103005: Jan 24 14:45:47.362: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

ACK sip:90862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK4875CB9

From: "Sam " <sip:211@10.1.1.101>;tag=CEF37490-172C

To: <sip:90862157774@99.234.56.78>;tag=7fad61f03708-100007f-13c4-55013-a0142-10fd12c8-a0142

Date: Tue, 24 Jan 2012 14:45:47 GMT

Call-ID: EF977E91-45D011E1-9309813F-74BAA80B@10.1.1.101

Max-Forwards: 70

CSeq: 101 ACK

Allow-Events: telephone-event

Content-Length: 0

103006: Jan 24 14:45:47.374: %ISDN-6-LAYER2UP: Layer 2 for Interface BR0/0/1, TEI 96 changed to up

103007: Jan 24 14:45:51.313: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=211, Peer Info Type=DIALPEER_INFO_SPEECH

103008: Jan 24 14:45:51.313: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=211

103009: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

103010: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=20018

103011: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=0862157774, Peer Info Type=DIALPEER_INFO_SPEECH

103012: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=0862157774

103013: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   No Outgoing Dial-peer Is Matched; Result=NO_MATCH(-1)

103014: Jan 24 14:45:51.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:

   Result=NO_MATCH(-1)

103015: Jan 24 14:46:08.815: %ISDN-6-LAYER2DOWN: Layer 2 for Interface BR0/0/1, TEI 96 changed to down

2801(config-dial-peer)#

Then I removed SIP-UA as I was told there is no registration necessary, only Dial-peer configuration.

But it didn’t affect anything.

Then I add translate-outgoing called 10 command to dial-peer 9000, nothing happened.

Really stuck and don't know where to look at.

Any help will be highly appreciated.

Thanks.

I have this problem too.
0 votes
Correct Answer by Daniele Giordano about 2 years 1 month ago

Ok, now is clear.

You must adjust the session-target of dial-peer 9002 to forward the incoming call to Call Manage:

dial-peer voice 9002 voip

description ** Outbound DialPeer from SIP Trunk ### handle incoming calls to CME **

preference 10

translate-outgoing called 20

voice-class codec 1

session protocol sipv2

session target ipv4: 10.1.1.101 "ip address of f0/0.1 of your 2801"

destination-pattern 018877000

dtmf-relay rtp-nte

no vad

It will work.

Regards.

Correct Answer by Daniele Giordano about 2 years 2 months ago

SIP + NAT = problem

Can you enable the inspection?

from command line use these commands:

conf t

class-map inspection_default

match default-inspection-traffic

policy-map global_policy

class inspection_default

  inspect sip

service-policy global_policy global

wr mem

Regards.

  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 5 (3 ratings)
Daniele Giordano Wed, 01/25/2012 - 01:19

Now your provider responds to you with a 404 User Not Found message.

In my opinion the provider must receive a different Remote-Party-ID.

Sometimes ITSPs authorize a call on the base of whitelist/blacklist of CALLING NUMBER.

ITSP instructions contain "CLI Method:-  Remote-Party-ID".

In your Remote Party ID there is the private extension number:

Remote-Party-ID: "Sam" ;party=calling;screen=no;privacy=off

You can try to use a translation rule to insert in the RPID one of public numbers assigned from your ITSP, e.g. 018877000

This can be an example:

translation-rule 1

Rule 0 any 018877000

dial-peer 9000

translate-outgoing calling 11

Let me know what happens.

Regards.

firestormnet Wed, 01/25/2012 - 02:44

Hi Daniele.

Thank you for your reply. I did those changes, and debugging looks like that now:

109131: Jan 25 10:10:24.313: //-1/9FBDA65D9466/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774T, Peer Info Type=DIALPEER_INFO_SPEECH

109132: Jan 25 10:10:24.313: //-1/9FBDA65D9466/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774T

109133: Jan 25 10:10:24.313: //-1/9FBDA65D9466/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

109134: Jan 25 10:10:24.313: //-1/9FBDA65D9466/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

109135: Jan 25 10:10:24.313: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=90862157774, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

109136: Jan 25 10:10:24.313: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

109137: Jan 25 10:10:24.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

109138: Jan 25 10:10:24.317: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

109139: Jan 25 10:10:24.317: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Calling Number=90862157774, Called Number=, Voice-Interface=0x0,

   Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,

   Peer Info Type=DIALPEER_INFO_SPEECH

109140: Jan 25 10:10:24.317: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=9000

109141: Jan 25 10:10:24.317: //-1/9FBDA65D9466/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

109142: Jan 25 10:10:24.317: //-1/9FBDA65D9466/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

109143: Jan 25 10:10:24.317: //-1/9FBDA65D9466/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

109144: Jan 25 10:10:24.317: //-1/9FBDA65D9466/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

109145: Jan 25 10:10:24.321: fb_get_reject_cause_code: ERROR cause_code NULL

109146: Jan 25 10:10:24.329: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:0862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK48ADAAD

Remote-Party-ID: "Sam " ;party=calling;screen=no;privacy=off

From: "Sam " ;tag=D31DD558-289

To:

Date: Wed, 25 Jan 2012 10:10:24 GMT

Call-ID: A18B03E6-467311E1-946B813F-74BAA80B@10.1.1.101

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 2680006237-1181946337-2489745727-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327486224

Contact:

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 3121 3032 IN IP4 10.1.1.101

s=SIP Call

c=IN IP4 10.1.1.101

t=0 0

m=audio 19490 RTP/AVP 8 101

c=IN IP4 10.1.1.101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

109147: Jan 25 10:10:24.389: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Received:

SIP/2.0 404 Not Found

From: "Sam ";tag=D31DD558-289

To: ;tag=7fad626f7fe8-100007f-13c4-55013-b1237-5716034e-b1237

Call-ID: A18B03E6-467311E1-946B813F-74BAA80B@10.1.1.101

CSeq: 101 INVITE

Via: SIP/2.0/UDP 10.1.1.101:5060;received=88.99.77.44;branch=z9hG4bK48ADAAD

Content-Length: 0

109148: Jan 25 10:10:24.393: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

ACK sip:0862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK48ADAAD

From: "Sam " ;tag=D31DD558-289

To: ;tag=7fad626f7fe8-100007f-13c4-55013-b1237-5716034e-b1237

Date: Wed, 25 Jan 2012 10:10:24 GMT

Call-ID: A18B03E6-467311E1-946B813F-74BAA80B@10.1.1.101

Max-Forwards: 70

CSeq: 101 ACK

Allow-Events: telephone-event

Content-Length: 0

109149: Jan 25 10:10:24.413: %ISDN-6-LAYER2UP: Layer 2 for Interface BR0/0/1, TEI 96 changed to up

109150: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=211, Peer Info Type=DIALPEER_INFO_SPEECH

109151: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=211

109152: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

109153: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=20018

109154: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=0862157774, Peer Info Type=DIALPEER_INFO_SPEECH

109155: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=0862157774

109156: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   No Outgoing Dial-peer Is Matched; Result=NO_MATCH(-1)

109157: Jan 25 10:10:28.448: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:

   Result=NO_MATCH(-1)

109158: Jan 25 10:10:56.108: %ISDN-6-LAYER2DOWN: Layer 2 for Interface BR0/0/1, TEI 96 changed to down

As you can see nothing happened.

I was told that there is no registration or authentication required, only setup Dial-peer with session target to Invite. This Invite should work when it sees our public IP address 88.99.77.44.

Do you think that this line should have our public IP 88.99.77.44 instead of 10.1.1.101? And normal extension number?

From: "Sam ">;tag=D31DD558-289

To: ;tag=7fad626f7fe8-100007f-13c4-55013-b1237-5716034e-b1237

Not sure where I can change that.

Regards,

Daniele Giordano Wed, 01/25/2012 - 03:23

In my experience, the IP ACL of SIP provider checks the ip address in IP packet (layer 3) and not in SIP signalling. This because a sip user agent can be behind a router with NAT.

Probably the better way to fix your issue is ask to your provider the reason of the 404 message.

Can you do this?

With more informations we can fix the problem.

Regards.

Daniele Giordano Wed, 01/25/2012 - 03:27

It could be also a problem of called number format.

Maybe, you must add a prefix or format the number in E.164.

firestormnet Wed, 01/25/2012 - 03:29

I asked them already yesterday. They said it's my configuration problem and they will come back to me to talk about that. It's just I can't find out where the problem is in my config.

P.S. I've tried many combinations of prefixes in rule 11, which I used to configure BRI or PRI, but none of them worked.

translation-rule 11

Rule 1 any 018877000

Such as 18877000; 7000.

And for called number as I think I need just remove 9 in from of number and send the rest to SIP server.

Thanks.

Cheeers,

Daniele Giordano Wed, 01/25/2012 - 03:48

What is your ITSP? Can you try another change?

Try to remove the name in your outgoing SIP messages.

Use "clid strip name" under dial-peer config.

Daniele Giordano Wed, 01/25/2012 - 03:54

Another idea.

Can you debug an incoming call?

In this way we can see the called number format and other sip parameters.

firestormnet Wed, 01/25/2012 - 06:29

Hi Daniele.

Thanks for your comments.

I spoke to our SIP provider. He checked the connecton on his side and as I think he added our public IP address.

So now I can place the outgoing call and a receiving phone shows SIP provider phone number 018877000.

But there is no audio.

They told me that our router keep sending Invites, but can't receive replies. So I need to configure a few things:

1) Cisco Gateway, there is no 100 (code) for replies are coming through.

2) RTP for audio. Not sure how I can change that and to what.

3) "bind control source-interface" and " bind media source-interface" commands under "voice service voip" should show ip address of Cisco gateway. Not sure about that, but I was pointing to Fa0/0.1 and Fa0/0.2 only.

4) Configure ASA5505 for NAT translation to forward Proxy server to Router for port 5060. I think I did that but it didn't work, so maybe I was doing something wrong.

I haven't put Dial-peer for incoming calls yet, but will do that later.

Any thoughts what should be done?

P.S. Now it's very funny. When mobile phone rings using SIP provider, I end a call in the office, but mobile phone keeps ringing.

Thanks.

Cheers.

Daniele Giordano Wed, 01/25/2012 - 06:53

The RTP stream is negotiated by SIP/SDP parameters:

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 2438 9821 IN IP4 10.1.1.101

s=SIP Call

c=IN IP4 10.1.1.101

t=0 0

m=audio 19412 RTP/AVP 8 101

c=IN IP4 10.1.1.101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

In this case your router says "contact me on IP 10.1.1.101, use port 19412 and use codec PCMA".

I think that your ASA uses "fix up or inspection" to change the private ip address with the public one.

Can you add an incoming dial-peer? If an incoming call doesn't match any dial-peer, the cisco router uses the hidden dial-peer 0 but sometimes the default config is not right for specific cases.

Can you add a new debug ccsip messages?

Can you add the ASA config of NAT and fix up or inspect?

Regards.

firestormnet Wed, 01/25/2012 - 08:02

Hi Dan.

Yes, I saw that RTP debugging, but what can I change there? Maybe I need to open more ports on ASA for RTP like 19412?

I use Cisco ASDM for ASA to make changes.

There are static NAT rules for: Server source IPs(10.1.1.100) to Outside(translated IPs, 88.99.77.44)  for a few ports.

Also I added Security policy access rules for LAN: Any to SIP, and Outside: SIP to any.

For NAT:

I can't add this: for LAN: STATIC ROUTER IP 10.1.1.101 (AS SOURCE) UDP 5060 TO OUTSIDE IP 88.99.77.44

(AS TRANSLATED) UDP 5060

Because there is already translation for the Server.

Debugging looks like that now. There is no Received: SIP/2.0, but I can make an outside call with no audio.

116013: Jan 25 15:28:25.584: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Calling Number=90862157774, Called Number=, Voice-Interface=0x0,

   Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,

   Peer Info Type=DIALPEER_INFO_SPEECH

116014: Jan 25 15:28:25.584: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=9000

116015: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=90862157774, Peer Info Type=DIALPEER_INFO_SPEECH

116016: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=90862157774

116017: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersCore:

   Result=Success(0) after DP_MATCH_DEST

116018: Jan 25 15:28:25.584: //-1/0D0EB9CE9708/DPM/dpMatchPeersMoreArg:

   Result=SUCCESS(0)

   List of Matched Outgoing Dial-peer(s):

     1: Dial-peer Tag=9000

     2: Dial-peer Tag=2

     3: Dial-peer Tag=1

116019: Jan 25 15:28:25.588: fb_get_reject_cause_code: ERROR cause_code NULL

116020: Jan 25 15:28:25.600: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:0862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D

Remote-Party-ID: "Sam " ;party=calling;screen=no;privacy=off

From: "Sam " ;tag=D4410748-1C9D

To:

Date: Wed, 25 Jan 2012 15:28:25 GMT

Call-ID: EDD5040-46A011E1-970D813F-74BAA80B@10.1.1.101

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 219068878-1184895457-2533916991-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327505305

Contact:

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101

s=SIP Call

c=IN IP4 10.1.1.101

t=0 0

m=audio 18782 RTP/AVP 8 101

c=IN IP4 10.1.1.101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

116021: Jan 25 15:28:26.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:0862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D

Remote-Party-ID: "Sam " ;party=calling;screen=no;privacy=off

From: "Sam " ;tag=D4410748-1C9D

To:

Date: Wed, 25 Jan 2012 15:28:26 GMT

Call-ID: EDD5040-46A011E1-970D813F-74BAA80B@10.1.1.101

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 219068878-1184895457-2533916991-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327505306

Contact:

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101

s=SIP Call

c=IN IP4 10.1.1.101

t=0 0

m=audio 18782 RTP/AVP 8 101

c=IN IP4 10.1.1.101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

116022: Jan 25 15:28:27.096: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:0862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D

Remote-Party-ID: "Sam " ;party=calling;screen=no;privacy=off

From: "Sam " ;tag=D4410748-1C9D

To:

Date: Wed, 25 Jan 2012 15:28:27 GMT

Call-ID: EDD5040-46A011E1-970D813F-74BAA80B@10.1.1.101

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 219068878-1184895457-2533916991-1958389771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327505307

Contact:

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101

s=SIP Call

c=IN IP4 10.1.1.101

t=0 0

m=audio 18782 RTP/AVP 8 101

c=IN IP4 10.1.1.101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

116026: Jan 25 15:28:57.092: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

INVITE sip:0862157774@99.234.56.78:5060 SIP/2.0

Via: SIP/2.0/UDP 10.1.1.101:5060;branch=z9hG4bK491484D

Remote-Party-ID: "Sam" ;party=calling;screen=no;privacy=off

From: "Sam " ;tag=D4410748-1C9D

To:

Date: Wed, 25 Jan 2012 15:28:57 GMT

Call-ID: EDD5040-46A011E1-970D813F-74BAA80B@10.1.1.101

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 219068878-1184895457-2533916991-1958389preference 1771

User-Agent: Cisco-SIPGateway/IOS-12.x

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Max-Forwards: 70

Timestamp: 1327505337

Contact:

Expires: 180

Allow-Events: telephone-event

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 1984 5803 IN IP4 10.1.1.101

s=SIP Call

c=IN IP4 10.1.1.101

t=0 0

m=audio 18782 RTP/AVP 8 101

c=IN IP4 10.1.1.101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

I'll add Incoming dial-peer now.

Not sure what kind of NAT rule should I put into ASA to allow in and out sip traffic.

Appretiate your help.

Thanks a mill.

firestormnet Wed, 01/25/2012 - 09:12

I added incoming peer:

!

translation-rule 20

rule 1 ^18877000 211

!

voice translation-profile IN

translate called 20

!

!

dial-peer voice 9001 voip

description ** Incoming Call from SIP Trunk **

preference 1

translation-profile incoming IN

codec g711alaw

session protocol sipv2

session target ipv4:99.234.56.78

dtmf-relay rtp-nte

no vad

!

But no calls coming through. I can hear only beep twice then call ends.

Debugging doesn't show anything.

Is it Dial-peer configuration or ASA not letting calls in problem?

Cheers,

Daniele Giordano Wed, 01/25/2012 - 10:01

From debug we can see outgoing INVITE from your 2801 but no responses.

Now I think in a NAT problem. We must check your ASA.

Can you run the "debug sip" on the firewall?

firestormnet Thu, 01/26/2012 - 03:50

Hi Dan.

Coming back again. I've tried some ASA monitoring but with no much luck.

I added:

#debug sip (level 1 and 255)

#term mon

then, #capture sip match udp 10.1.1.101 255.255.255.255 any

when I make in and out calls, nothing showing, its empty.

In ASDM, in Real-time log viewer I found only this, when I made an outside call. Nothing for incoming call.

6

Jan 26   2012

09:29:38

302016

SIP-Primary-Proxy(source)

  router(destin)

Teardown   UDP connection 20523150 for outside:SIP-Primary-Proxy/5060 to   LAN:router/51914 duration 0:02:31 bytes 8078








6

Jan 26   2012

09:30:04

302015

SIP-Primary-Proxy

router

Built   outbound UDP connection 20523435 for outside:SIP-Primary-Proxy/5060   (SIP-Primary-Proxy/5060) to LAN:router/51914 (88.99.77.44/36007)

6

Jan 26   2012

09:47:06

302016

SIP-Primary-Proxy

router

Teardown   UDP connection 20524230 for outside:SIP-Primary-Proxy/5060 to   LAN:router/63675 duration 0:03:50 bytes 16135

Also, some #SH NAT in ASA:

There are NAT for DMZ and LAN only.

LAN NAT has Exempts, Static and Dynamic translations. Some examples below:

#sh nat lan

  match ip LAN Voice-LAN 255.255.255.0 _internal_loopback remote1-LAN 255.255.255.0

    NAT exempt

    translate_hits = 0, untranslate_hits = 0

  match ip LAN Voice-LAN 255.255.255.0 _internal_loopback Remote2-LAN 255.255.255.0

    NAT exempt

    translate_hits = 0, untranslate_hits = 0

  match ip LAN Voice-LAN 255.255.255.0 _internal_loopback Voice-LAN 255.255.255.0

    NAT exempt

    translate_hits = 0, untranslate_hits = 0

  match ip LAN host LAN-Server _internal_loopback host NMC

    NAT exempt

    translate_hits = 0, untranslate_hits = 0

  match tcp LAN host LAN-Server eq 25 outside any

    static translation to 88.99.77.44/25

    translate_hits = 0, untranslate_hits = 50522

  match tcp LAN host LAN-Server eq 443 outside any

    static translation to 88.99.77.44/443

    translate_hits = 0, untranslate_hits = 26588

  match tcp LAN host LAN-Server eq 3389 outside any

    static translation to 88.99.77.44/3389

    translate_hits = 0, untranslate_hits = 1727035

  match tcp LAN host LAN-Server eq 8 outside any

    static translation to 88.99.77.44/8

    translate_hits = 0, untranslate_hits = 4

  match ip LAN 10.1.1.0 255.255.255.0 LAN any

    dynamic translation to pool 1 (No matching global)

    translate_hits = 0, untranslate_hits = 0

  match ip LAN 10.1.1.0 255.255.255.0 DMZ any

    dynamic translation to pool 1 (No matching global)

    translate_hits = 0, untranslate_hits = 0

  match ip LAN 10.1.1.0 255.255.255.0 outside any

    dynamic translation to pool 1 (88.99.77.44 [Interface PAT])

    translate_hits = 2527191, untranslate_hits = 133920

  match ip LAN 10.1.1.0 255.255.255.0 _internal_loopback any

    dynamic translation to pool 1 (No matching global)

    translate_hits = 0, untranslate_hits = 0

  match ip LAN any DMZ any

    no translation group, implicit deny

    policy_hits = 0

  match ip LAN any outside any

    no translation group, implicit deny

    policy_hits = 28368

firewall# sh nat outside

ERROR: No matching NAT policy found

ASA5505 NAT config:

nat-control

global (DMZ) 2 interface

global (outside) 1 interface

nat (LAN) 0 access-list remote-vpn

nat (LAN) 1 10.1.1.0 255.255.255.0

nat (DMZ) 1 NMC 255.255.255.255

static (LAN,outside) tcp interface smtp LAN-Server smtp netmask 255.255.255.255

static (LAN,outside) tcp interface https LAN-Server https netmask 255.255.255.255

static (LAN,outside) tcp interface 3389 LAN-Server 3389 netmask 255.255.255.255

static (DMZ,outside) tcp 88.99.77.45 5900 NMC 5900 netmask 255.255.255.255

static (LAN,outside) tcp interface 8 LAN-Server 8 netmask 255.255.255.255

I'm not sure if it gives you some clues.

Thank you for time.

Cheers.

Daniele Giordano Sat, 01/28/2012 - 00:37

If I've correctly understand, the call is established but without audio in both direction.

Right?

Your ASA real time log shows the call, so SIP signalling should be ok.

Do you have ACL that can block RTP traffic?

Regards.

firestormnet Mon, 01/30/2012 - 03:32

Hi Dan.

I can make only Outgoing call without Audio.

Incoming call I can't make at all, and ASA debug sip doesn't show anything.

Also I added Security policy access rules for LAN: Any to SIP(UDP and TCP: 5060), and Outside: SIP(UDP and TCP: 5060) to any.

Should I open more ports? As I can see in ASA log (LAN:route/51914 and /63675).

Regards,

Daniele Giordano Mon, 01/30/2012 - 10:19

Please try these steps:

1) The default RTP port range is from 16384 to 32767 UDP port.

Can you try to add a rule in your ACL to permit this range?

2) Can you add the output of "debug ccsip messages" command from your 2801 again?

Ensure that SIP uses interface FastEthernet 0/0.2 of the router. This must be the port that connect to ASA (bind control source-interface FastEthernet0/0.2 and bind media source-interface FastEthernet0/0.2).

provider ===> ASA ===> f0/0.2 2801

3) What is the IOS version of ASA? Can you try to disable SIP inspect?

policy-map global_policy

class inspection_default

no inspect sip

Sometimes SIP ALG or SIP inspection can create issues with privider SBC.

4) As last option and temporary test, can you try to bypass ASA and connect the 2801 direct to internet?

Let me know what happens.

Regards.

firestormnet Fri, 02/03/2012 - 01:06

Hi Dan.

Thank you for your advise, was busy on other projects, so will try that hopefully today.

Cheers

firestormnet Thu, 02/09/2012 - 02:46

Ok, did a lot of testing. Some results are below:

On ASA and 2801 side:

1) The default RTP port range is from 16384 to 32767 UDP port. Can you try to add a rule in your ACL to permit this range?

I tried to implement many ACL rules and NAT translations but nothing worked. I used:

ACL:

LAN:   any  to SIP(IP)    tcp/udp  sip(5060)

Outside:  SIP(IP)  to  any  tcp/udp  sip(5060)

NAT:

for LAN:  Static  source - LANrouter (10.1.1.101)   udp 5060     to    translated - SIP (IP)   udp 5060

for outside: Static  source - SIP (IP)  udp 5060      to    translated - LANrouter(10.1.1.101)     udp 5060

I couldn't find how to allow RTP port range, it was using default port range 0-65553 only.  ASDM has a Packet Tracer, so I did some testing (for UDP):

1) Int:LAN     Source:10.1.1.101     Dest:88.99.77.44    Port:sip         Status: ok

2) Int:LAN     Source:10.1.1.101     Dest:99.234.56.78    Port:sip         Status: ok

3) Int:LAN     Source:192.168.22.1    Dest:88.99.77.44    Port:sip         Status: drop  NAT action - drop

4) Int:outside     Source:99.234.56.78  Dest:10.1.1.101    Port:sip         Status:drop  NAT action - drop

5) Int:outside     Source:88.99.77.44  Dest:10.1.1.101    Port:sip         Status:drop  ACL action - drop

6) Int:outside     Source:99.234.56.78  Dest:192.168.22.1    Port:sip         Status:drop  NAT or ACL action - drop

7) Int:outside    Source:99.234.56.78      Dest:88.99.77.44     Port:sip         Status: ok

I tried #debug ip nat sip command, shows nothing.

Tried to use 192.168.22.1 insteed of 10.1.1.101 in NAT and ACL but with no results.

2) Can you add the output of "debug ccsip messages" command from your 2801 again?

Ensure  that SIP uses interface FastEthernet 0/0.2 of the router. This must be  the port that connect to ASA (bind control source-interface  FastEthernet0/0.2 and bind media source-interface FastEthernet0/0.2).

provider ===> ASA ===> f0/0.2 2801

When I use Fa0/0.2 (voice subint) nothing works, when I remove it, outgoing call works without audio. Debug looks the same, shows only Send Invite, no Receive.

3) What is the IOS version of ASA? Can you try to disable SIP inspect?

ASA v.7.2(4). SIP inspect is disabled.

4) As last option and temporary test, can you try to bypass ASA and connect the 2801 direct to internet?

As nothing worked for me I decided to create a new connection. I connected UC540 to public ip 88.99.77.45 one from our ip range and asked SIP provider to change ip to .45 then configured UC with SIP details. So now all calls are working. There are NAT and ACL, but I didn't configure them at all and all calls work fine. It means SIP connection is working, now I need to move back to ASA and 2801 to make it work.

What I can see from working config and debug is that there is no Private IPs, but my old debugs shows them it means there is NAT problem in ASA, and maybe ACL problem as well.

Does anybody can provide what NAT and ACL commands should look like to allow SIP calls through ASA?

I want to configure spare ASA port with ip .45 and forward all sip calls through it. Is it possible to do that?

Thanks for your advices and time.

Regards

Daniele Giordano Thu, 02/09/2012 - 10:29

From your last test we can assume that your issue is a NAT issue of ASA.

You have write that the SIP inspect feature of ASA is disabled.

Do you have already tried with SIP inspection enabled?

Regards.

firestormnet Fri, 02/10/2012 - 04:31

Hi.

There is no commands in ASA such as:

class-map inspection_default

match default-inspection-traffic

!                  

policy-map global_policy

class inspection_default

  inspect sip

!            

service-policy global_policy global

I pressume there is no sip inspection configured.

Do I really need that, can we just use ACL and NAT for SIP signalling and RTP packets to flow through?

As SIP calls are working now on public ip 88.99.77.45, I need to configure a new interface Ethernet 0/5 and vlan with this ip then forward all sip traffic to that interface. Is there a way how to do this simplier?

Thanks a lot. Cheers.

Correct Answer
Daniele Giordano Sat, 02/11/2012 - 02:05

SIP + NAT = problem

Can you enable the inspection?

from command line use these commands:

conf t

class-map inspection_default

match default-inspection-traffic

policy-map global_policy

class inspection_default

  inspect sip

service-policy global_policy global

wr mem

Regards.

firestormnet Wed, 02/22/2012 - 07:42

Hi Daniele.

Finally something start working.

The outgoing calls are working fine now after I added policy-map and inspection rules, and NAT rule in ASA.

But incoming calls are not getting through. Debug shows:

Received:

INVITE sip:018877000@10.1.1.101 SIP/2.0

Sent:

SIP/2.0 100 Trying

Sent:

SIP/2.0 404 Not Found

Via: SIP/2.0/UDP 99.234.56.78:5060;branch=z9hG4bK-303f99-bc78707e-29931e37

Received:

ACK sip:018877000@10.1.1.101 SIP/2.0

It looks like dial-peer problem, but I tried so many configurations with no results.

My dial-peer config looks:

!

translation-rule 20

Rule 1 ^018877000 211

!

dial-peer voice 9001 voip

description ** Incoming Call from SIP Trunk **

preference 10

translate-outgoing called 20

voice-class codec 1

session protocol sipv2

session target ipv4:99.234.56.78:5060

incoming called-number 018877000

dtmf-relay rtp-nte

no vad

!

Any thoughts what is missing there?

Best regards,

Daniele Giordano Wed, 02/22/2012 - 09:46

I'm happy to hear that.

Can you add a full debug of 2801 incoming call:

debug ccsip all

and

debug voip dialpeer

Are you sure of dp matching?

Does the 211 extension exist?

Best regards.

firestormnet Fri, 02/24/2012 - 05:24

Hi Dan.

Ok, you can see debugging from 2801 and ASA5505 in a file.

As I can see the firewall is letting packets through, so we don't need to configure anything there.

From 2801 debugging I can see that 404 error appears after it says Dial-peer no match or maybe I'm missing something.

Ext. 211 is my working phone (we use ISDN lines in office), so it should work and ring directly (direct number reach). Also I tried ext.461, spare phone, with the same result. I'll try to connect to our hunt group or AutoAttendant, I don't think it's gonna make difference.

Thanks a lot.

Regards,

Daniele Giordano Fri, 02/24/2012 - 10:50

Your debug shows this:

SIP/2.0 100 Trying

....

007452: Feb 24 11:32:28.947: //-1/xxxxxxxxxxxx/SIP/Event/sipSPIEventInfo: Queued event from SIP SPI : SIPSPI_EV_CC_CALL_PROCEEDING

007453: Feb 24 11:32:28.947: //-1/1137C22FA7A5/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=018877000, Peer Info Type=DIALPEER_INFO_SPEECH

007454: Feb 24 11:32:28.947: //-1/1137C22FA7A5/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=018877000

007455: Feb 24 11:32:28.947: //-1/1137C22FA7A5/DPM/dpMatchPeersCore:

   No Outgoing Dial-peer Is Matched; Result=NO_MATCH(-1)

007456: Feb 24 11:32:28.947: //-1/1137C22FA7A5/DPM/dpMatchPeersMoreArg:

   Result=NO_MATCH(-1)

007457: Feb 24 11:32:28.947: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Calling Number=018877000, Called Number=018877000, Peer Info Type=DIALPEER_INFO_SPEECH

007458: Feb 24 11:32:28.947: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=018877000

007459: Feb 24 11:32:28.947: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:

   No Outgoing Dial-peer Is Matched; Result=NO_MATCH(-1)

007460: Feb 24 11:32:28.947: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:

   Result=NO_MATCH(-1)

007461: Feb 24 11:32:28.947: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Calling Number=018877000, Called Number=, Voice-Interface=0x0,

   Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,

   Peer Info Type=DIALPEER_INFO_SPEECH

007462: Feb 24 11:32:28.951: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:

   Result=NO_MATCH(-1) After All Match Rules Attempt

007463: Feb 24 11:32:28.951: //-1/1137C22FA7A5/DPM/dpMatchPeersCore:

   Calling Number=, Called Number=018877000, Peer Info Type=DIALPEER_INFO_SPEECH

007464: Feb 24 11:32:28.951: //-1/1137C22FA7A5/DPM/dpMatchPeersCore:

   Match Rule=DP_MATCH_DEST; Called Number=018877000

007465: Feb 24 11:32:28.951: //-1/1137C22FA7A5/DPM/dpMatchPeersCore:

   No Outgoing Dial-peer Is Matched; Result=NO_MATCH(-1)

007466: Feb 24 11:32:28.951: //-1/1137C22FA7A5/DPM/dpMatchPeersMoreArg:

   Result=NO_MATCH(-1)

007467: Feb 24 11:32:28.951: //3598/1137C22FA7A5/SIP/Info/ccsip_call_statistics: Stats are not supported for IPIP call.

007468: Feb 24 11:32:28.951: //-1/xxxxxxxxxxxx/SIP/Event/sipSPIEventInfo: Queued event from SIP SPI : SIPSPI_EV_CC_CALL_DISCONNECT

007469: Feb 24 11:32:28.955: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_sipspi_queue_event: ccsip_spi_get_msg_type returned: 3 for event 3

007470: Feb 24 11:32:28.955: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_sipspi_queue_event: ccsip_spi_get_msg_type returned: 3 for event 7

007471: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Info/act_recdinvite_disconnect: Performing disconnect

007472: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Info/sipSPIUaddCcbToUASRespTable: ****Adding to UAS Response table.

007473: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Info/sipSPIUaddCcbToTable: Added to table. ccb=0x6528AC0C key=7f6ecc2ed340-837fad6643d7d6c-001b78e4b2e4@99.234.56.786C13AB08-550

007474: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Info/sipSPISendInviteResponse: Associated container=0x65C49190 to Invite Response 404

007475: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Transport/sipSPITransportSendMessage: msg=0x64FC93B4, addr=99.234.56.78, port=5060, sentBy_port=5060, is_req=0, transport=1, switch=0, callBack=0x61108734

007476: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Transport/sipSPITransportSendMessage: Proceedable for sending msg immediately

007477: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Transport/sipTransportLogicSendMsg: switch transport is 0

007478: Feb 24 11:32:28.955: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportPostSendMessage: Posting send for msg=0x64FC93B4, addr=99.234.56.78, port=5060, connId=0 for UDP

007479: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/Info/sentErrResDisconnecting: Sent an 3456XX Error Response

007480: Feb 24 11:32:28.955: //3598/1137C22FA7A5/SIP/State/sipSPIChangeState: 0x6528AC0C : State change from (STATE_RECD_INVITE, SUBSTATE_NONE)  to (STATE_DISCONNECTING, SUBSTATE_NONE)

007481: Feb 24 11:32:28.959: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

SIP/2.0 404 Not Found

The incoming call doesn't match any dial-peer.

Try this config:

dial-peer voice 9001 voip

description ** Inbound DialPeer from SIP Trunk **

voice-class codec 1

session protocol sipv2

incoming called-number 018877000

dtmf-relay rtp-nte

no vad

dial-peer voice 9002 voip

description ** Outbound DialPeer from SIP Trunk **

preference 10

translate-outgoing called 20

voice-class codec 1

session protocol sipv2

session target ipv4:99.234.56.78:5060

destination-pattern 018877000

dtmf-relay rtp-nte

no vad

The inbound dial-peers don't have a "destination". The gateway itself is the destination. These dial-peer are used to set the incoming "capability" of the gateway like codec, fax and modem gateway, vad, etc.

The outbound dial-peers are used to "forward" the call to a destination.

In order to match outbound dial peers, the router or gateway uses the dial peer destination-pattern called_number command.

More info at this link:

http://www.cisco.com/en/US/tech/tk652/tk90/technologies_tech_note09186a008010fed1.shtml

Try this and let me know the result.

Regards.

firestormnet Mon, 02/27/2012 - 08:56

Hi Dan.

I've tried your config and I'm receiving different errors now. Below is attached file with 2801 sip config; debug ccsip mess; debug ccsip all and debug voip dialpeer.

Now, I'm receiving:

Received:

SIP/2.0 603 Decline             The called party was contacted but cannot or does not want to participate in the call.

Sent:

SIP/2.0 403 Forbidden        The server has received and understood the request  but will not provide the service. The SIP gateway does not generate                                                    this response.





Now, I'm really lost what is going on. Why is the system decline sip connection?

As only I can see in debugging is:



//4469/2897E225B416/SIP/Transport/sipSPIGetSwitchTransportFlag: Return the Global configuration, Switch Transport is FALSE



and



//4469/2897E225B416/SIP/Info/sentErrorResponseCallClose: Sent Error Response since the Gw is Shutdown



Could it be a problem in this? And what is it exactly?

Thanks,

Cheers.





Daniele Giordano Mon, 02/27/2012 - 10:01

I don't understand the call flow.

Received --> Incoming INVITE from 99.234.56.78 to 2801; calling 086215777 - called 018877000

Sent <-- outgoint TRYING

Sent <-- outgoing INVITE from 2801 to 99.234.56.78; calling 086215777 - called 211

Received --> Incoming TRYING from 99.234.56.78

Received --> Incoming 603 DECLINE from 99.234.56.78

Your 2801 receives a call from the provider; changes the called number and sends the call to the provider again.

Why?

At this point the provider answers with a 603 DECLINE.

The 211 is a private number extension.

Do you have an IP PBX?

Who handle the 211 extension?

We should adjust the "session-target" of dial-peer 9002.

Regards.

firestormnet Wed, 02/29/2012 - 07:38

Hi.

I'm confused as well. As I can see there are a multiply sessions instead of one call. Even once when call ended on my mobile but the sessions were kept opening, sending and receiving INV and ACK, then I removed dial-peer 9002 and everything stopped. On firewall side I saw more than 120 sip session created then deleted. I don't know why it's happening. It was like debug all, non-stop opening.

Ext.211 is normal ephone-dn extension, it's my desktop 7960 phone. I tried atoattendant, hunt group, other phone extensions, but it was the same.

!

ephone-dn  18

number 211

pickup-group 1

label 211

description Sam

name Sam

call-forward busy 800

call-forward noan 800 timeout 10

hold-alert 30 originator

!

!

ephone  5

mac-address 0011.2222.3333

username "Sam"

blf-speed-dial 1 204 label "204"

speed-dial 1 208 label "208"

speed-dial 2 204 label "204"

type 7960

button  1:18 2:1 3:31 4:40

night-service bell

!

There is only 2801 router with CME 4.2 and CUE 3.1 only.

When I remove dial-peer 9002 it shows 404 error, no dial-peer match. So something wrong with 9002.

With 9002 it shows 603, 500, 403 errors.

Thanks a lot.

Regards,

Correct Answer
Daniele Giordano Wed, 02/29/2012 - 09:49

Ok, now is clear.

You must adjust the session-target of dial-peer 9002 to forward the incoming call to Call Manage:

dial-peer voice 9002 voip

description ** Outbound DialPeer from SIP Trunk ### handle incoming calls to CME **

preference 10

translate-outgoing called 20

voice-class codec 1

session protocol sipv2

session target ipv4: 10.1.1.101 "ip address of f0/0.1 of your 2801"

destination-pattern 018877000

dtmf-relay rtp-nte

no vad

It will work.

Regards.

firestormnet Thu, 03/01/2012 - 01:37

Hi Dan.

Once I changed session target ip incoming calls start working.

I had that feeling to remove session target or change to local ip of 2801 when I was writing a reply to you. And next day I forgot to do that, and you prooved my thoughts that I was thinking in right direction.

Thank you very much for your time and patience.

Looking back I can see that all that config could be easily done for couple of hours.

Just one more quick question about securing sip connection.

At the beginning I configured firewall to allow all sip connections for everybody: any   any  tcp/udp  port 5060.

After a few minutes of configured Ougoing dial-peer I saw (on 2801 and ASA using debugging) that some ip address connected to our system and started opening sessions (different phone numbers started appear), and only after removing dial-peer it stopped. Firewall showed between 100-200 created and deleted sessions. Then I reconfigured firewall ACL and it stopped.

The question is. If a potential customer doesn't have a firewall or firewall is not configured and not blocking other ip addresses using sip port 5060, then it is possible to connect to system and use their sip account for calls. How can it be done to prevent any outside connection?

Thanks a mill.

Regards,

Daniele Giordano Thu, 03/01/2012 - 10:07

There are many technics:

- implement ACL filter on the voice gateway;

- enable "sip - source filter" under voice service voip menu;

- use ip trusted list if supported by IOS feature;

- block prefix;

- etc.

You can find more info searching for "cisco toll fraud prevention".

firestormnet Fri, 03/02/2012 - 06:22

That's great, thanks.

I'll definitely have a look at that.

Thanks for all your time.

Cheers.

Actions

Login or Register to take actions

This Discussion

Posted January 24, 2012 at 9:17 AM
Stats:
Replies:32 Avg. Rating:5
Views:8193 Votes:0
Shares:0
Tags: No tags.