Bridging between SIP and H323

Mates,

Here is the senario:

Exsisting PBX is an Avaya IP Office, but the customer wants to integrate an Asterisk box. I’ve compiled successfully H323 support into Asterisk, and I’m able to call any number on the Avaya. The problem is when the user on the other end (Avaya) picks up, the SIP (Asterisk) connection just hangs up. Same happens when calling from Avaya to Asterisk.

Here is the code I used to make this happen:

  • Extensions.conf
    exten => _1XX,1,Dial,OOH323/${EXTEN}@ipo

  • ooh323.conf
    [general]

faststart=yes
h245tunneling=yes
gatekeeper = DISABLE
bindaddr=0.0.0.0

[ipo]
type=peer
context=internal
ip=192.168.50.34
port=1720
;disallow=all
allow=all
conreinvite=no
dtmfmode=rfc2833

  • sip.conf
    [general]

port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
allow=all ; Allow all codecs
context = bogon-calls ; Send SIP callers that we don’t know about here
srvlookup=yes

[500]
type=friend
username=500
secret=500
host=dynamic
context=from-sip
mailbox=500

Debug out put from Asterisk-ooh323:

– Executing Dial(“SIP/504-0292”, “OOH323/100@ipo”) in new stack
— ooh323_request - data 100@ipo format 0x4 (ulaw)
— find_peer
+++ find_peer
+++ ooh323_request
— ooh323_call- 100@ipo
+++ ooh323_call
– Called 100@ipo
— onNewCallCreated ooh323c_o_11
— find_call
+++ find_call
setting callid number 504
Outgoing call ipo(ooh323c_o_11) - Codec prefs - ()
AsteriskAdding capabilities to call(outgoing, ooh323c_o_11)
— configure_local_rtp
+++ configure_local_rtp
+++ onNewCallCreated ooh323c_o_11
— onAlerting ooh323c_o_11
— find_call
+++ find_call
+++ onAlerting ooh323c_o_11
– OOH323/ipo-0988 is ringing
— ooh323_hangup
hanging ipo
+++ ooh323_hangup
== Spawn extension (from-sip, 100, 1) exited non-zero on ‘SIP/504-0292’
— onCallCleared ooh323c_o_11
— find_call
+++ find_call
+++ onCallCleared
— ooh323_destroy
Destroying ipo
+++ ooh323_destroy

I’m not sure what needs to be done next. Can you help?

can you turn on debug logging and post a fragment from /var/log/asterisk/full for a failed call ?

Here is what was recored in /var/log/asterisk/full:

2006-10-19 08:02:12 VERBOSE[3545] logger.c: – Registered SIP ‘504’ at 192.168.50.250 port 17644 expires 3600
2006-10-19 08:02:13 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘14fd78d2107aa072280eafe4573cfa6d@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:02:16 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘19f0da3d3e723658692c8d3e0d53a3c7@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:02:17 DEBUG[3545] chan_sip.c: Setting NAT on RTP to 0
2006-10-19 08:02:17 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘1e01851ef4170338OTQ5NDg5M2Q0ZjBjYTk4NjQ1ZTE2MjI4YTY3YmFhZGU.’ of Response 1: Match Found
2006-10-19 08:02:17 DEBUG[3545] chan_sip.c: Setting NAT on RTP to 0
2006-10-19 08:02:17 DEBUG[3545] chan_sip.c: Checking SIP call limits for device 504
2006-10-19 08:02:17 DEBUG[3545] chan_sip.c: build_route: Contact hop: sip:504@192.168.50.250:17644
2006-10-19 08:02:17 DEBUG[3539] channel.c: Avoiding initial deadlock for 'SIP/504-15f1’
2006-10-19 08:02:17 VERBOSE[14309] logger.c: – Executing Dial(“SIP/504-15f1”, “OOH323/104@ipo”) in new stack
2006-10-19 08:02:17 VERBOSE[14309] logger.c: — ooh323_request - data 104@ipo format 0x4 (ulaw)
2006-10-19 08:02:17 DEBUG[14309] src/chan_h323.c: — ooh323_alloc
2006-10-19 08:02:17 DEBUG[14309] src/chan_h323.c: +++ ooh323_alloc
2006-10-19 08:02:17 VERBOSE[14309] logger.c: — find_peer
2006-10-19 08:02:17 VERBOSE[14309] logger.c: +++ find_peer
2006-10-19 08:02:17 DEBUG[14309] src/chan_h323.c: — ooh323_new - ipo
2006-10-19 08:02:17 DEBUG[14309] src/chan_h323.c: +++ h323_new
2006-10-19 08:02:17 VERBOSE[14309] logger.c: +++ ooh323_request
2006-10-19 08:02:17 VERBOSE[14309] logger.c: — ooh323_call- 104@ipo
2006-10-19 08:02:17 VERBOSE[14309] logger.c: +++ ooh323_call
2006-10-19 08:02:17 VERBOSE[14309] logger.c: – Called 104@ipo
2006-10-19 08:02:17 VERBOSE[3552] logger.c: — onNewCallCreated ooh323c_o_13
2006-10-19 08:02:17 VERBOSE[3552] logger.c: — find_call
2006-10-19 08:02:17 VERBOSE[3552] logger.c: +++ find_call
2006-10-19 08:02:17 VERBOSE[3552] logger.c: setting callid number 504
2006-10-19 08:02:17 VERBOSE[3552] logger.c: Outgoing call ipo(ooh323c_o_13) - Codec prefs - ()
2006-10-19 08:02:17 VERBOSE[3552] logger.c: Adding capabilities to call(outgoing, ooh323c_o_13)
2006-10-19 08:02:17 VERBOSE[3552] logger.c: — configure_local_rtp
2006-10-19 08:02:17 VERBOSE[3552] logger.c: +++ configure_local_rtp
2006-10-19 08:02:17 VERBOSE[3552] logger.c: +++ onNewCallCreated ooh323c_o_13
2006-10-19 08:02:17 VERBOSE[3552] logger.c: — onAlerting ooh323c_o_13
2006-10-19 08:02:17 VERBOSE[3552] logger.c: — find_call
2006-10-19 08:02:17 VERBOSE[3552] logger.c: +++ find_call
2006-10-19 08:02:17 DEBUG[3539] channel.c: Avoiding initial deadlock for 'OOH323/ipo-7294’
2006-10-19 08:02:17 VERBOSE[3552] logger.c: +++ onAlerting ooh323c_o_13
2006-10-19 08:02:17 VERBOSE[14309] logger.c: – OOH323/ipo-7294 is ringing
2006-10-19 08:02:23 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:02:27 DEBUG[3545] chan_sip.c: Auto destroying call '3b61086b9c252e54OTQ5NDg5M2Q0ZjBjYTk4NjQ1ZTE2MjI4YTY3YmFhZGU.'
2006-10-19 08:02:44 VERBOSE[3552] logger.c: — onCallEstablished ooh323c_o_13
2006-10-19 08:02:44 VERBOSE[3552] logger.c: — find_call
2006-10-19 08:02:44 VERBOSE[3552] logger.c: +++ find_call
2006-10-19 08:02:44 VERBOSE[3552] logger.c: +++ onCallEstablished ooh323c_o_13
2006-10-19 08:02:44 VERBOSE[14309] logger.c: – OOH323/ipo-7294 answered SIP/504-15f1
2006-10-19 08:02:44 DEBUG[3539] channel.c: Avoiding initial deadlock for 'SIP/504-15f1’
2006-10-19 08:02:44 VERBOSE[14309] logger.c: – Attempting native bridge of SIP/504-15f1 and OOH323/ipo-7294
2006-10-19 08:02:44 VERBOSE[14309] logger.c: — ooh323_set_peer - OOH323/ipo-7294
2006-10-19 08:02:44 DEBUG[14309] channel.c: Dropping duplicate answer!
2006-10-19 08:02:44 VERBOSE[3552] logger.c: — onCallCleared ooh323c_o_13
2006-10-19 08:02:44 VERBOSE[3552] logger.c: — find_call
2006-10-19 08:02:44 VERBOSE[3552] logger.c: +++ find_call
2006-10-19 08:02:44 DEBUG[14309] channel.c: Returning from native bridge, channels: SIP/504-15f1, OOH323/ipo-7294
2006-10-19 08:02:44 VERBOSE[14309] logger.c: — ooh323_hangup
2006-10-19 08:02:44 VERBOSE[14309] logger.c: hanging ipo
2006-10-19 08:02:44 VERBOSE[14309] logger.c: +++ ooh323_hangup
2006-10-19 08:02:44 DEBUG[14309] app_dial.c: Exiting with DIALSTATUS=ANSWER.
2006-10-19 08:02:44 VERBOSE[14309] logger.c: == Spawn extension (from-sip, 104, 1) exited non-zero on 'SIP/504-15f1’
2006-10-19 08:02:44 DEBUG[14309] chan_sip.c: update_call_counter(504) - decrement call limit counter
2006-10-19 08:02:44 VERBOSE[3553] logger.c: — ooh323_destroy
2006-10-19 08:02:44 VERBOSE[3553] logger.c: Destroying ipo
2006-10-19 08:02:44 VERBOSE[3553] logger.c: +++ ooh323_destroy
2006-10-19 08:02:45 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘1e01851ef4170338OTQ5NDg5M2Q0ZjBjYTk4NjQ1ZTE2MjI4YTY3YmFhZGU.’ of Response 2: Match Found
2006-10-19 08:02:46 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘1e01851ef4170338OTQ5NDg5M2Q0ZjBjYTk4NjQ1ZTE2MjI4YTY3YmFhZGU.’ of Request 102: Match Found
2006-10-19 08:02:46 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘2b9c2eee45bf09d14209d1a15aa7c270@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:02:49 VERBOSE[14306] logger.c: – Remote UNIX connection disconnected
2006-10-19 08:02:53 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:03:08 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘723dc2db1211c4c85e43068171c8dea6@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:03:23 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:03:41 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘1533e8d42e196058313a1a7143b064b2@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:03:53 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:04:04 NOTICE[3541] res_musiconhold.c: Request to schedule in the past?!?!
2006-10-19 08:04:04 WARNING[3541] res_musiconhold.c: /usr/share/asterisk/mohmp3 is not a valid directory
2006-10-19 08:04:04 WARNING[3541] res_musiconhold.c: Unable to spawn mp3player
2006-10-19 08:04:14 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘0332078b5fc51ba530fe39180983e6cd@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:04:23 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:04:47 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘3a14a22274ef590b7c3a00640cf99368@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:04:53 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:05:09 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘458e99b120365c221ed550dc57127986@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:05:23 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:05:42 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘04ea44f876b3239e5fa1bb775c816510@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:05:53 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:06:15 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘4ae146c10e91ab734fe0687b45569cce@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:06:23 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:06:48 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘2bca7071354e573e28cbf2bf3119e7ad@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:06:53 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:07:10 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘36968ada43901e423625ef615f7c522f@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:07:23 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:07:43 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘2bf387d80306015f161c3cec5a90484b@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:07:53 DEBUG[3545] chan_sip.c: Auto destroying call '95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’
2006-10-19 08:08:16 DEBUG[3545] chan_sip.c: Stopping retransmission on ‘019ca0de5e1e05ee0e7f38483a2d9f72@192.168.50.31’ of Request 102: Match Found
2006-10-19 08:08:23 DEBUG[3545] chan_sip.c: Auto destroying call ‘95aaa8c8-3e0856ce-9f8d095f@192.168.50.104’

I really appreciate your help on this!!

Does anyone have any ideas on this? Any help would greatly be appreciated! Thanks!!!

Anyone?

Okay…so I figured it out on my own…

The solution was to specify the codec ulaw. Although, gsm or alaw may also work.

In the logger.conf file, I added verbose, debug, and dtmf. Went into asterisk, issued logger rotate to parse the file. This gave me additional output in /var/log/asterisk/full that helped lead me to the solution. The line read:

ERROR:Local endpoint does not have any audio capabilities

Hope this helps some of you out there.