Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-26 Thread Tarek Sawah

through a test .. i was able to send calls from Asterisk 1.4 to a PSTN number 
through a cisco router with a channel bank.. Audio worked well..  i setup a 
dial plan in asterisk to Dial(${ext...@ciscoip)  and authorise the cisco 
router's ip on the asterisk server and treat the calls comming from it like any 
other SIP calls inside the server.. 


--
AHD Tarek Sawah

Integrated Digital Systems

CCNA, MCSE, RHCE, VoIP

Syria: +963 944 618286

USA: +1 347 562 2308






 Date: Sat, 16 May 2009 14:46:27 +0300
 From: timotsm...@gmail.com
 To: asterisk-users@lists.digium.com
 Subject: [asterisk-users] Fwd: Asterisk With Cisco Voice Router
 
 Hi,
 
 In our office, we're slowly migrating from a cisco call manager set up
 to asterisk. Problem is management doesn't want to buy any other
 hardware  as they had already invested a lot in cisco. The main cause
 of this is asterisk's added features like unique FAX number for
 everyone in the company (which will be the same as phone DID), Voice
 mail, Auto Answer etc yet we need thousands of dollars to add those to
 our cisco call manager 4.1 set up.
 
 I have added the 3845 router as my SIP gateway (on asterisk 1.6.0.9),
 and also a dialpeer to forward on the router to forward calls to my
 asterisk. It works properly but the problem is there is NO AUDIO! I
 have tried to change codec but no sucess!
 
 Has anyone had the above set up working successfully? Attached are some confs.
 
 Thanks a lot for your assistance.
 
 Kind Regards,
 Wilson

_
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-18 Thread Timothy Smith
Thank David and Neeraj for your input.

Neeraj, I posted the configs in my first post, but i've also attached
some extracts here. they haven't changed much.

David, You're absolutely right and i think the problem could be the
reverse dial-peer or DTMF configuration. I think I have the
corresponding reverse dial-peer and the DTMF conf that you said.
However, I have checked my side and all seems to be ok. I've also
tried changing the dtmfmode to sip-notify on the gateway (and info in
sip.conf) but no luck!

Please look at the attached and give me some pointers.

Thanks,
Tim

On Sun, May 17, 2009 at 3:44 PM, David Backeberg dbackeb...@gmail.com wrote:
 On Sat, May 16, 2009 at 10:22 AM, Timothy Smith timotsm...@gmail.com wrote:
 I have finally managed to get voice working. I both parties can hear
 each other. The problem was nating. Our network is fairly big and
 these machines are atleast 2 switches from each other. I just enabled
 it (nat=route or nat=yes) and it worked.

 It's not yet done however. When I redirect a call to any Asterisk
 application, it just hangs up! I have read some history and archives,
 but none of the solutions has worked for me. e.g ip inspect udp
 idle-time 900. My router (or IOS) doesn't have thet command.

 Could you please assist point to what could be causing this and how to
 solve it? Below are some logs and attached is the router log.

 ; This is the extension conf. Enter the extension you want to reach
 now (something like auto attendant).
 exten = _X.,1,Read(NUM,beep,4,2,3)
 exten = _X.,n,Dial(SIP/${NUM})

 ; This is all i get when i call and the call hangs up!

 Did you ever set up that reverse dial-peer? If not, do that first.

 You put a three second timeout on the Read(). By any chance, is the
 call hanging up 3 seconds after you call? That would be expected
 behavior. Well, actually you give it two tries. So it should be
 beep
 three second wait
 beep
 three second wait
 hangup

 If you're actually entering numbers on your dialpad and they're not
 getting read, you have a misconfiguration on your DTMF. If you enable
 sip debugging on your asterisk side you can see exactly what's coming
 over the wire from the Cisco side. There are a lot of choices for DTMF
 on the asterisk side and the Cisco side, and they need to agree for
 the button presses to be encoded and passed correctly. You can pass
 them in-line as real audio, or you can convert them to a special dtmf
 sip encoding. You'll notice all those choices when you go to configure
 the Cisco dial-peer.

 My personal preference:
 on the Cisco dial-peer side
  dtmf-relay rtp-nte

 on the asterisk side
 I left the dtmf config blank, and I don't remember which default you
 end up with, but it worked in the default config for me.

 ___
interface Serial0/0/0:15
 no ip address
 encapsulation hdlc
 isdn switch-type primary-net5
 isdn incoming-voice voice
 isdn negotiate-bchan resend-setup
 no cdp enable
!
interface Serial0/0/1:15
 no ip address
 encapsulation hdlc
 isdn switch-type primary-net5
 isdn incoming-voice voice
 isdn negotiate-bchan resend-setup
 no cdp enable


dial-peer voice 1 pots
 destination-pattern 0T
 port 0/0/1:15
 forward-digits all
!

dial-peer voice 3 pots
 incoming called-number .
 direct-inward-dial
 port 0/0/1:15

dial-peer voice 4 pots
 incoming called-number .
 direct-inward-dial
 port 0/0/1:15
!

dial-peer voice 112 voip
 destination-pattern 730732888
 monitor probe icmp-ping
 session protocol sipv2
 session target ipv4:172.19.3.150
 session transport udp
 dtmf-relay rtp-nte
 codec g711ulaw



VG2# show dial-peer voice 112
VoiceOverIpPeer112
peer type = voice, system default peer = FALSE, information type = 
voice,
description = `',
tag = 112, destination-pattern = `730732888',
voice reg type = 0, corresponding tag = 0,
allow watch = FALSE
answer-address = `', preference=0,
CLID Restriction = None
CLID Network Number = `'
CLID Second Number sent
CLID Override RDNIS = disabled,
source carrier-id = `', target carrier-id = `',
source trunk-group-label = `',  target trunk-group-label = `',
numbering Type = `unknown'
group = 112, Admin state is up, Operation state is up,
incoming called-number = `', connections/maximum = 0/unlimited,
DTMF Relay = enabled,
modem transport = system,
URI classes:
Incoming (Request) =
Incoming (To) =
Incoming (From) =
Destination =
huntstop = disabled,
in bound application associated: 'DEFAULT'
out bound application associated: ''
dnis-map =
permission :both
incoming COR list:maximum capability
outgoing COR list:minimum requirement
Translation profile (Incoming):
Translation profile (Outgoing):
incoming call blocking:
translation-profile = `'

Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-17 Thread David Backeberg
On Sat, May 16, 2009 at 10:22 AM, Timothy Smith timotsm...@gmail.com wrote:
 I have finally managed to get voice working. I both parties can hear
 each other. The problem was nating. Our network is fairly big and
 these machines are atleast 2 switches from each other. I just enabled
 it (nat=route or nat=yes) and it worked.

 It's not yet done however. When I redirect a call to any Asterisk
 application, it just hangs up! I have read some history and archives,
 but none of the solutions has worked for me. e.g ip inspect udp
 idle-time 900. My router (or IOS) doesn't have thet command.

 Could you please assist point to what could be causing this and how to
 solve it? Below are some logs and attached is the router log.

 ; This is the extension conf. Enter the extension you want to reach
 now (something like auto attendant).
 exten = _X.,1,Read(NUM,beep,4,2,3)
 exten = _X.,n,Dial(SIP/${NUM})

 ; This is all i get when i call and the call hangs up!

Did you ever set up that reverse dial-peer? If not, do that first.

You put a three second timeout on the Read(). By any chance, is the
call hanging up 3 seconds after you call? That would be expected
behavior. Well, actually you give it two tries. So it should be
beep
three second wait
beep
three second wait
hangup

If you're actually entering numbers on your dialpad and they're not
getting read, you have a misconfiguration on your DTMF. If you enable
sip debugging on your asterisk side you can see exactly what's coming
over the wire from the Cisco side. There are a lot of choices for DTMF
on the asterisk side and the Cisco side, and they need to agree for
the button presses to be encoded and passed correctly. You can pass
them in-line as real audio, or you can convert them to a special dtmf
sip encoding. You'll notice all those choices when you go to configure
the Cisco dial-peer.

My personal preference:
on the Cisco dial-peer side
 dtmf-relay rtp-nte

on the asterisk side
I left the dtmf config blank, and I don't remember which default you
end up with, but it worked in the default config for me.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-16 Thread Steve Howes

On 16 May 2009, at 12:46, Timothy Smith wrote:
 blah

 Has anyone had the above set up working successfully? Attached are  
 some confs.

 Thanks a lot for your assistance.

Check about the sip.conf 'insecure' option. I have had to use it in  
the past for similar stuff. I think it was 'insecure=very' but that  
might be deprecated by now..

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-16 Thread Timothy Smith
Thanks Steve for this tip.

I have insecure=very is not yet deprecated. I have added it but still no good.

I personally think the problem could be with the codecs. Any ideas?

I have attached some debug info.

Regards,
Tim

On Sat, May 16, 2009 at 3:25 PM, Steve Howes st...@geekinter.net wrote:

 On 16 May 2009, at 12:46, Timothy Smith wrote:
 blah

 Has anyone had the above set up working successfully? Attached are
 some confs.

 Thanks a lot for your assistance.

 Check about the sip.conf 'insecure' option. I have had to use it in
 the past for similar stuff. I think it was 'insecure=very' but that
 might be deprecated by now..

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

VG2#
VG2#
VG2#
VG2#
VG2#
May 16 12:41:40.237: ISDN Se0/0/1:15 Q931: RX - SETUP pd = 8  callref = 0x0C73
Sending Complete
Bearer Capability i = 0x8090A3
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0xA98392
Exclusive, Channel 18
Calling Party Number i = 0x2183, '730230199'
Plan:ISDN, Type:National
Called Party Number i = 0xA1, '790792888'
Plan:ISDN, Type:National
May 16 12:41:40.237: ISDN Se0/0/1:15 EVENT: process_rxstate: ces/callid 
1/0x33B3 calltype 2 CALL_INCOMING
May 16 12:41:40.237: ISDN Se0/0/1:15 EVENT: call_incoming: call_id 0x33B3, Guid 
= BCBB464BB098
VG2#
May 16 12:41:40.241: fb_get_reject_cause_code: ERROR cause_code NULL

May 16 12:41:40.245: ISDN Se0/0/1:15 SERROR: process_pri_simple: NO name in GTD
May 16 12:41:40.245: ISDN Se0/0/1:15 Q931: TX - CALL_PROC pd = 8  callref = 
0x8C73
Channel ID i = 0xA98392
Exclusive, Channel 18
May 16 12:41:40.353: ISDN Se0/0/1:15 SERROR: process_pri_simple: NO name in GTD
May 16 12:41:40.353: ISDN Se0/0/1:15 Q931: TX - ALERTING pd = 8  callref = 
0x8C73
VG2#
May 16 12:41:46.697: ISDN Se0/0/0:15 SERROR: isdn_get_name_from_gtd: false ret
May 16 12:41:46.697: ISDN Se0/0/1:15 SERROR: process_pri_simple: NO name in GTD
May 16 12:41:46.697: ISDN Se0/0/1:15 Q931: TX - CONNECT pd = 8  callref = 
0x8C73
May 16 12:41:46.713: ISDN Se0/0/1:15 Q931: RX - CONNECT_ACK pd = 8  callref = 
0x0C73
May 16 12:41:46.713: ISDN Se0/0/1:15 EVENT: process_rxstate: ces/callid 
1/0x33B3 calltype 2 CALL_PROGRESS
OULKLAVG2#
May 16 12:41:46.713: %ISDN-6-CONNECT: Interface Serial0/0/1:17 is now connected 
to 730230199 N/A
VG2#
May 16 12:41:52.373: ISDN Se0/0/1:15 Q931: RX - DISCONNECT pd = 8  callref = 
0x0C73
Cause i = 0x8490 - Normal call clearing
May 16 12:41:52.373: ISDN Se0/0/1:15 EVENT: process_rxstate: ces/callid 
1/0x33B3 calltype 2 CALL_DISC
May 16 12:41:52.373: %ISDN-6-CONNECT: Interface Serial0/0/1:17 is now connected 
to 730230199 N/A
May 16 12:41:52.373: %ISDN-6-DISCONNECT: Interface Serial0/0/1:17  disconnected 
from 730230199 , call lasted 5 seconds
VG2#
May 16 12:41:52.373: ISDN Se0/0/1:15 Q931: TX - RELEASE pd = 8  callref = 
0x8C73
May 16 12:41:52.385: ISDN Se0/0/1:15 Q931: RX - RELEASE_COMP pd = 8  callref = 
0x0C73
May 16 12:41:52.385: ISDN Se0/0/1:15 EVENT: process_rxstate: ces/callid 
1/0x33B3 calltype 2 CALL_CLEARED
From: 730230199 sip:730230...@172.19.3.150;tag=as5f114784
To: sip:1...@172.19.4.102:32544;rinstance=e6a140ee2d1dee0f;tag=ae700477
Contact: sip:730230...@172.19.3.150
Call-ID: 7beff1bd661329c643aa69ec43628...@172.19.3.150
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.0.9
Content-Length: 0


---
-- SIP/100-00820520 answered SIP/172.17.3.248-007fc920
Audio is at 172.19.3.150 port 13312
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

--- Reliably Transmitting (no NAT) to 172.17.3.248:5060 ---
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.17.3.248:5060;branch=z9hG4bK501204;received=172.17.3.248
From: sip:730230...@172.17.3.248;tag=D8FE7BF8-4CA
To: sip:730232...@172.19.3.150;tag=as0fb38dd9
Call-ID: 4a137712-414d11de-9606c927-51af5...@172.17.3.248
CSeq: 101 INVITE
User-Agent: Asterisk PBX 1.6.0.9
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: sip:730232...@172.19.3.150
Content-Type: application/sdp
Content-Length: 261

v=0
o=root 544232458 544232458 IN IP4 172.19.3.150
s=Asterisk PBX 1.6.0.9
c=IN IP4 172.19.3.150
t=0 0
m=audio 13312 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv


-- Packet2Packet bridging SIP/172.17.3.248-007fc920 and SIP/100-00820520
cs-intranet*CLI
--- SIP read from UDP://172.17.3.248:62582 ---
ACK sip:730232...@172.19.3.150:5060 SIP/2.0
Via: SIP/2.0/UDP 172.17.3.248:5060;branch=z9hG4bK511A76
From: sip:730230...@172.17.3.248;tag=D8FE7BF8-4CA
To: 

Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-16 Thread David Backeberg
On Sat, May 16, 2009 at 7:46 AM, Timothy Smith timotsm...@gmail.com wrote:
 I have added the 3845 router as my SIP gateway (on asterisk 1.6.0.9),
 and also a dialpeer to forward on the router to forward calls to my
 asterisk. It works properly but the problem is there is NO AUDIO! I
 have tried to change codec but no sucess!
 Has anyone had the above set up working successfully?

Yes.

You have been caught by a not-very-well-documented issue with setting
up voice routing on the 3845, and probably other similar Cisco gear.
And I'm not sure how you've done your test.
This is the closest I've ever seen to a document that explains your problem:
http://www.cisco.com/en/US/tech/tk652/tk90/technologies_tech_note09186a0080147524.shtml

Did you have a SIP phone on one side of asterisk and a POTS phone on
the outside of the 3845?

If you did, and you could talk on both at the same time, I think you
would discover in fact that you do have some audio, in fact, one-way
audio to be precise. But I don't remember for sure, because it's been
a while since I've done this to myself.

At any rate, your problem is you have dial-peers to get voice packets
out from the 3845 to Cisco, but no dial-peers to get the packets from
SIP back to a physical circuit on the 3845. Think about this. What
should happen to a call inbound from asterisk, to the 3845? Should it
go out an E1 to the outside phones world? If so, you need to build a
dial-peer that does that. Until you do, you won't be getting two-way
audio.

you need another rule something like:
dial-peer voice 790792888 pots
map this back to the proper E1 circuit

A secondary problem could also be with the way you're managing your
DSPs. I don't know how many physical DSPs you have in your router, but
usually it's a GOOD thing to enable DSP farming.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-16 Thread Timothy Smith
David,

Thanks a lot for your input.  I will enable DSP farming. Like some
other techies, I just wanted to see it work before i consider others
things.

I have finally managed to get voice working. I both parties can hear
each other. The problem was nating. Our network is fairly big and
these machines are atleast 2 switches from each other. I just enabled
it (nat=route or nat=yes) and it worked.

It's not yet done however. When I redirect a call to any Asterisk
application, it just hangs up! I have read some history and archives,
but none of the solutions has worked for me. e.g ip inspect udp
idle-time 900. My router (or IOS) doesn't have thet command.

Could you please assist point to what could be causing this and how to
solve it? Below are some logs and attached is the router log.

; This is the extension conf. Enter the extension you want to reach
now (something like auto attendant).
exten = _X.,1,Read(NUM,beep,4,2,3)
exten = _X.,n,Dial(SIP/${NUM})

; This is all i get when i call and the call hangs up!

cs-intranet*CLI
  == Using SIP RTP CoS mark 5
-- Executing [730732...@default:1]
Read(SIP/172.17.3.248-30069280, NUM,beep,4,2,3) in new stack
-- Accepting a maximum of 4 digits.
  == Using SIP RTP CoS mark 5
-- Executing [730732...@default:1]
Read(SIP/172.17.3.248-30069280, NUM,beep,4,2,3) in new stack
-- Accepting a maximum of 4 digits.
cs-intranet*CLI

Thanks alot for your assistance.

On Sat, May 16, 2009 at 4:02 PM, David Backeberg dbackeb...@gmail.com wrote:
 On Sat, May 16, 2009 at 7:46 AM, Timothy Smith timotsm...@gmail.com wrote:
 I have added the 3845 router as my SIP gateway (on asterisk 1.6.0.9),
 and also a dialpeer to forward on the router to forward calls to my
 asterisk. It works properly but the problem is there is NO AUDIO! I
 have tried to change codec but no sucess!
 Has anyone had the above set up working successfully?

 Yes.

 You have been caught by a not-very-well-documented issue with setting
 up voice routing on the 3845, and probably other similar Cisco gear.
 And I'm not sure how you've done your test.
 This is the closest I've ever seen to a document that explains your problem:
 http://www.cisco.com/en/US/tech/tk652/tk90/technologies_tech_note09186a0080147524.shtml

 Did you have a SIP phone on one side of asterisk and a POTS phone on
 the outside of the 3845?

 If you did, and you could talk on both at the same time, I think you
 would discover in fact that you do have some audio, in fact, one-way
 audio to be precise. But I don't remember for sure, because it's been
 a while since I've done this to myself.

 At any rate, your problem is you have dial-peers to get voice packets
 out from the 3845 to Cisco, but no dial-peers to get the packets from
 SIP back to a physical circuit on the 3845. Think about this. What
 should happen to a call inbound from asterisk, to the 3845? Should it
 go out an E1 to the outside phones world? If so, you need to build a
 dial-peer that does that. Until you do, you won't be getting two-way
 audio.

 you need another rule something like:
 dial-peer voice 790792888 pots
 map this back to the proper E1 circuit

 A secondary problem could also be with the way you're managing your
 DSPs. I don't know how many physical DSPs you have in your router, but
 usually it's a GOOD thing to enable DSP farming.

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

May 16 14:18:28.640: ISDN Se0/0/1:15 Q931: RX - RELEASE_COMP pd = 8  callref = 
0x0CAB
Cause i = 0x80D1 - Invalid call reference value
May 16 14:18:28.640: ISDN Se0/0/1:15 SERROR: L3_GetUser_NLCB: EVENT 0X5A No 
NLCB 2
May 16 14:18:28.640: ISDN Se0/0/1:15 **ERROR**: L3_BadPeerMsg: event 0x5A cr 
0x8CAB callid 0x0
May 16 14:18:28.660: ISDN Se0/0/1:15 Q931: RX - SETUP pd = 8  callref = 0x0CAC
Sending Complete
Bearer Capability i = 0x8090A3
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0xA9838D
Exclusive, Channel 13
Calling Party Number i = 0x2183, '730730199'
Plan:ISDN, Type:National
Called Party Number i = 0xA1, '730732888'
Plan:ISDN, Type:National
May 16 14:18:28.664: ISDN Se0/0/1:15 EVENT: process_rxstate: ces/callid 
1/0x3407 calltype 2 CALL_INCOMING
May 16 14:18:28.664: ISDN Se0/0/1:15 EVENT: call_incoming: call_id 0x3407, Guid 
= 42D2FC70B0D1
May 16 14:18:28.664: fb_get_reject_cause_code: ERROR cause_code NULL

May 16 14:18:28.668: ISDN Se0/0/1:15 SERROR: process_pri_simple: NO name in GTD
May 16 14:18:28.668: ISDN Se0/0/1:15 Q931: TX - CALL_PROC pd = 8  callref = 
0x8CAC
Channel ID i = 0xA9838D
Exclusive, Channel 13
May 16 14:18:28.676: 

Re: [asterisk-users] Fwd: Asterisk With Cisco Voice Router

2009-05-16 Thread Philipp Kempgen
Steve Howes schrieb:
 Check about the sip.conf 'insecure' option. I have had to use it in  
 the past for similar stuff. I think it was 'insecure=very' but that  
 might be deprecated by now..

insecure=very should now be written as insecure=port,invite


Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  -  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 -  http://www.amoocon.de
-- 

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users