Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

incoming called-number is not working with sip, but destination-pattern is on CME

I have setup a CME lab environment with voip.ms.  I am able to make calls in and out with no issues.  However my incoming dial-peer is only working if I have "Destination-pattern .T" setup on it, if I replace it with "incoming called-number .%", then I cannot receive calls.  Any Idea why I cannot use incoming called-number?  Below is my conifg

 

voice translation-rule 1
 rule 1 /^9/ //
!
voice translation-rule 2
 rule 1 /^.*/ /91XXXX1462/
!
voice translation-rule 3
 rule 1 /^91XXXX1\(...\)$/ /\1/
!
!
voice translation-profile INCOMING_CALLS
 translate called 3
!
voice translation-profile OUTGOING_CALLS
 translate calling 2
 translate called 1

 

dial-peer voice 7 voip
 translation-profile outgoing OUTGOING_CALLS
 destination-pattern 9[2-9]......
 session protocol sipv2
 session target dns:newyork4.voip.ms
 no voice-class sip localhost
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
!
dial-peer voice 11 voip
 translation-profile outgoing OUTGOING_CALLS
 destination-pattern 91[2-9].........
 session protocol sipv2
 session target dns:newyork4.voip.ms
 no voice-class sip localhost
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad
!
dial-peer voice 1 voip
 translation-profile incoming INCOMING_CALLS
 destination-pattern .T
 session protocol sipv2
 session target dns:newyork4.voip.ms
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad

 

 

Everyone's tags (2)
26 REPLIES
VIP Super Bronze

Have you tried only "incoming

Have you tried only "incoming called number." without the %. I have personally never used incoming-called number.%, just incoming-called number. works for me

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

Tried it, it did not work.

Tried it, it did not work.

VIP Super Bronze

Please configure the ff:dial

Please configure the ff:

dial-peer voice 1 voip
 translation-profile incoming INCOMING_CALLS
 no destination-pattern .T

incoming called number.
 session protocol sipv2
 no session target dns:newyork4.voip.ms
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad

 

Then enable the ff debugs and do a test call..

debug voip ccapi inout

debug ccsip messages..

Attach logs here include calling and called number

 

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

no debug voip ccapi inout

no debug voip ccapi inout output

but here is the debug ccsip messages

 

VIP Super Bronze

From the logs this INVITE is

From the logs this INVITE is sent to an invalid ip address..74.101.112.85--

Which IP is this? It looks like this is not configured on your ccme..

Received:
INVITE sip:9142281462@74.101.112.85 SIP/2.0

Via: SIP/2.0/UDP 107.6.67.238:5060;branch=z9hG4bK6efa0445;rport

Sent:
SIP/2.0 400 Bad Request - 'Invalid Host'

Via: SIP/2.0/UDP 107.6.67.238:5060;branch=z9hG4bK6efa0445;rport

From: "9144410197" <sip:9144410197@107.6.67.238>;tag=as0257aead

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

that is my wan ip, its on

that is my wan ip, its on dhcp so it changes

VIP Super Bronze

This is where your issue is.

This is where your issue is. This will not work like this. You will need to send the call to the IP address of your ccme server. I am surprised you are even receiving calls at all. I would like to see the debugs for a working call with destination-pattern .T

 

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

how would I do that:this is

how would I do that:

this is my sip-ua profile

sip-ua
 credentials username XXXXXXX password 7 <removed> realm newyork4.voip.ms
 authentication username XXXXXXX password 7 <removed> realm newyork4.voip.ms
 no remote-party-id
 retry invite 3
 retry register 3
 timers register 150
 registrar 1 dns:newyork4.voip.ms expires 200
 sip-server dns:newyork4.voip.ms
!

 

VIP Super Bronze

How is your WAN IP on dhcp?

How is your WAN IP on dhcp? Why is it on DHCP..It should never be. What does your WAN gateway connects to? is this topology correct?

Can you describe your infrastructure here.. How does your ccme connect to the ITSP. Please include all the devices in the mix. On another note I think you should get your data team involved into routing calls from your ITSP to your internal network..

 

 

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

It is becuase this is a lab

It is becuase this is a lab in my apartment with a home ISP.  It is connected to voip.ms

sip-ua
 credentials username XXXXXXX password 7 <removed> realm newyork4.voip.ms
 authentication username XXXXXXX password 7 <removed> realm newyork4.voip.ms
 no remote-party-id
 retry invite 3
 retry register 3
 timers register 150
 registrar 1 dns:newyork4.voip.ms expires 200
 sip-server dns:newyork4.voip.ms

New Member

Also here are the devicesThe

Also here are the devices

The 2811 router as my SIP VOIP Gateway, and then it is connected via trunk to a Cisco 892FSP which is just used as an internet facing router.

VIP Super Bronze

In this scenario you will

In this scenario you will need to do the ff

1. Create a public ip for your ccme. This will be routed through your wan ip. All traffic to this ip must go via your wan gateway

2. on the wan gateway you will need to configure NAT, to translate this public IP to the internal IP of your ccme.

3. Your wan gateway must be able to do SIP ALG, so that sip messages are properly modified during the NAT conversion.

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

I am not sure you guys are

I am not sure you guys are understanding this, this is in a lab environment.  My router can get to the outside, I am using a home ISP so there is no static ip's.  I can make calls with no issues, I can receive calls with no issues.  All I need to know is why when I receive calls neither the answer-address nor the incoming called-number command work.  If I use destination-pattern .T then all of a sudden I can receive calls.

VIP Super Bronze

okay, can you please send the

okay, can you please send the following logs for a working call with destination-pattern.T ( I did asked for this earlier)

debug voip ccapi inout

debug ccsip messages

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

They are uploaded

They are uploaded

New Member

I was reviewing the debugs,

I was reviewing the debugs, and I am seeing the issue:

*Oct  5 22:28:24.255: //41/xxxxxxxxxxxx/CCAPI/cc_insert_call_entry:
   Total Call Count=1, Call Entry(Call Count On=FALSE, Incoming Call=FALSE)

 

for some reason, the incoming calls are not being recognized as incoming calls from the cisco router

VIP Super Bronze

Well I have to tell you that

Well I have to tell you that this must be some kind of a software error. This call should never work. The behaviour you have with the incoming called number. is the correct one. A router should not process calls for an ip that is not its own.  That means anyone can send calls to this router and it will accept the call. This is what is checked when you use incoming called number. You see the invalid host error. The gateway checks to see if the host ip in the sip RURI (request-URI) matches any configured ip on itself. if it doesn't, the call is rejected.

I would like to investigate this a little more..

Please use destination-pattern .T and configure the ff

service sequence-numbers
service timestamps debug datetime localtime msec
logging buffered 10000000 debug
no logging console
no logging monitor
default logging rate-limit
default logging queue-limit

Then..

<Enable debugs, then test again.>

debug ccsip all

<Enable session capture to txt file in terminal program.> (such as Putty)


then do the ff:

terminal length 0
show logging

Attach the logs please..

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

Here you go Thanks

Here you go

 

Thanks

New Member

maybe on my internet facing

maybe on my internet facing router I should have a nat statement like this:

ip nat source static udp 192.168.100.21 5060 int g9 5060

 

New Member

so you are saying I need a

So you mean doing this http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_nat/configuration/15-mt/nat-15-mt-book/nat-tcp-sip-alg.html? ;  Could I just map the 5060 port to the wan port on my wan router?

New Member

I made the following

I made the following changes

ip nat service sip udp port 5060

ip nat inside source static udp 192.168.100.21 5060 interface GigabitEthernet9 5060
ip nat inside source static tcp 192.168.100.21 5060 interface GigabitEthernet9 5060

 

 and I get this output debug ccsip all:

 

//-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 107.6.67.238,Port 5060, Transport 1, SentBy Port 5060
//-1/1BC87302802D/SIP/Info/resolve_sig_ip_address_to_bind: signaling bind address : 192.168.100.21
//-1/xxxxxxxxxxxx/SIP/Error/sipSPI_validate_own_ip_addr: ReqLine IP addr does not match with host IP addr
//-1/1BC87302802D/SIP/Error/sact_idle_new_message_invite: Invalid URL in incoming INVITE
//-1/1BC87302802D/SIP/Info/ccsip_set_cc_cause_for_spi_err: Categorized cause:100, category:100
//-1/xxxxxxxxxxxx/SIP/Info/ccsip_set_release_source_for_peer: ownCallId[-1], src[6]
//-1/1BC87302802D/SIP/Info/sipSPIUaddCcbToUASReqTable: ****Adding to UAS Request table.

 

anyone got any ideas?  could this be a carrier issue?

VIP Super Bronze

This is not a carrier issue.

This is not a carrier issue. Your nat doesn't seem to be working. The gateway is saying that the hostname in the request line doesn't match an ip on itself..

Have a look at this doc, see if it helps. I am not a security guy, so cant help much. You might want to post a new thread in the security forum on how to setup static nat for your scenario

http://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/13773-2.html

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

I created the outside source

I created the outside source-list

ip nat outside source static udp 172.101.112.85 5060 192.168.100.21 5060 extendable

 

when I applied it my phone went down, do the phones use 5060?  This is my CME config:

telephony-service
 max-ephones 20
 max-dn 20
 ip source-address 192.168.100.21 port 2000
 cnf-file perphone
 max-conferences 8 gain -6
 transfer-system full-consult
 create cnf-files version-stamp Jan 01 2002 00:00:00

 

New Member

Everything started working

Everything started working after I rebooted my wan router.  I also found an issue with my cipc, but I can now receive incoming call on sip.  Attached are the configurations.

VIP Super Bronze

Glad you go tit working,,

Glad you go tit working,,

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
VIP Super Bronze

So for calls working with

So for calls working with destination-pattern..The CCME processes the call with its local ip address even though the Request is sent to the WAN ip address.This is really strange. Here you can see the local ip address is different from the host portion of the INVITE

000141: *Oct  7 01:56:44.367: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpIPv4SocketReads: Msg enqueued for SPI with IP addr: [107.6.67.238]:5060, local_address:[192.168.100.21]
000142: *Oct  7 01:56:44.367: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_sipspi_queue_event: ccsip_spi_get_msg_type returned: 2 for event 1
000143: *Oct  7 01:56:44.367: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWNewConnMsg: context=0x4AC1437C
000144: *Oct  7 01:56:44.367: //-1/xxxxxxxxxxxx/SIP/Transport/sipConnectionManagerProcessNewConnMsg: gConnTab=0x4AC1437C, addr=107.6.67.238, port=5060, local_addr=192.168.100.21, connid=3, transport=UDP
000145: *Oct  7 01:56:44.367: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:9142281462@74.101.112.85:63717 SIP/2.0
Via: SIP/2.0/UDP 107.6.67.238:5060;branch=z9hG4bK51730524;rport
Max-Forwards: 70
From: "9144410197" <sip:9144410197@107.6.67.238>;tag=as01f3fcb9
 

yes you will need nat to resolve this..

You will need a dedicated public IP to which all your calls will be sent to. You will then configure NAT and enable ALG on your router, to translate the public ip to the local ip of the ccme.

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
1232
Views
0
Helpful
26
Replies