Hello guys.
I've been trying to avoid asking for some advice, but three weeks into
studying, watching the webinars, reading the forums, mail-lists, and
testing I've reached a point of "Now What!". I can't find a clear path
in the documentation for what I am trying to do, even though the task
seems very simple!
I put in a second Cisco 5400 for our local DID numbers (Direct Inward
Dial - not dialog ID) from the PSTN over VoIP. The PSTN will only send
to one IP and will not accept redirects, so I though I just needed a
"simple" proxy and load balance to the ciscos. Seven or eight years ago
I helped a friend setup openSER serving two asterisks - no problem. But
I am having problems here going to the ciscos and am trying to find
which combination of modules I need to use...
I believe I need to go to topology hiding and a media proxy. Do I use
rtp_proxy or something else like MediaProxy?
Here's what I want to accomplish... I need to successfully send the
calls to the ciscos, balanced. All are public IP addresses.
Attached is a sample of my most recent failed attempt with call scenario
data, mysql data, route script and sip trace.
Any advice or examples would be appreciated!
Thank you,
Russ
#++++++++++++++++++++++++++++++++++++++++++++
#
# opensips IP = xx.xx.xx.23
#
# PSTN IP = 12.34.56.78
#
# gateways = dd.dd.dd.250 dd.dd.dd.251
#
#++++++++++++++++++++++++++++++++++++++++++++
#
# PSTN sends voip calls (sip2) to me with ...
#
# tech prefix = 1000
# destination = 12121112222
# cli = 12125551212
#
# [NOTE: destination is local PSTN DID. PSTN has tech prefix 1000.
# cli can by from office PBX, so could have 23 calls with
# same origination information and termination information.]
#
#++++++++++++++++++++++++++++++++++++++++++++
#
# select * from load_balancer;
# +----+----------+------------------+-----------+------------+-------------+
# | id | group_id | dst_uri | resources | probe_mode | description |
# +----+----------+------------------+-----------+------------+-------------+
# | 1 | 1 | sip:dd.dd.dd.250 | amity=23 | 2 | amity1 |
# | 2 | 1 | sip:dd.dd.dd.251 | amity=23 | 2 | amity2 |
# +----+----------+------------------+-----------+------------+-------------+
#
#++++++++++++++++++++++++++++++++++++++++++++
# - - - - - - - - - - - - - - - - - -
# BEGIN Route Script
# - - - - - - - - - - - - - - - - - -
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
if (has_totag()) {
loose_route();
t_relay();
exit;
}
record_route();
if (is_method("CANCEL")) {
if (t_check_trans())
t_relay();
exit;
}
if (!is_method("INVITE")) {
send_reply("405","Not Allowed");
exit;
}
# Routing based on load_balancer and probing (pinging).
if (is_method("INVITE")) {
if ( load_balance("1","amity") ) {
t_on_failure("1");
xlog("...route[]...Sending Call To: $du\n");
t_relay();
} else {
xlog("...route[]...Load Balance Returned Full or
Error\n");
t_reply("500","Service Full");
}
}
}
failure_route[1] {
if (t_was_cancelled()) {
exit;
}
# There was a failure... Disable the GW and grab an available GW.
if (t_check_status("[3-6][0-9][0-9]")) {
lb_disable();
if ( load_balance("1","amity") ) {
t_on_failure("1");
xlog("...failure_route[1]...Sending Call To: $du\n");
t_relay();
} else {
xlog("Load Balance Returned Full or Error\n");
xlog("...failure_route[1]...Load Balance Returned Full
or Error\n");
t_reply("500","Service Full");
}
}
}
# - - - - - - - - - - - - - - - - - -
# END Route Script
# - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - -
# BEGIN opensips trace
# - - - - - - - - - - - - - - - - - -
#
U 2012/01/11 21:51:05.619802 12.34.56.78:49697 -> xx.xx.xx.23:5060
INVITE sip:[email protected]:5060 SIP/2.0.
Via: SIP/2.0/UDP 12.34.56.78:5060.
From: <sip:[email protected]>;tag=F08DF710-E74.
To: <sip:[email protected]>.
Date: Fri, 26 Aug 1994 19:31:45 GMT.
Call-ID: [email protected].
Supported: timer,100rel.
Min-SE: 1800.
Cisco-Guid: 794784122-3225620941-2681382534-1587335478.
User-Agent: Cisco-SIPGateway/IOS-12.x.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE,
NOTIFY, INFO.
CSeq: 101 INVITE.
Max-Forwards: 6.
Remote-Party-ID:
<sip:[email protected]>;party=calling;screen=yes;privacy=off.
Timestamp: 777929505.
Contact: <sip:[email protected]:5060>.
Expires: 180.
Allow-Events: telephone-event.
Content-Type: application/sdp.
Content-Length: 325.
.
v=0.
o=CiscoSystemsSIP-GW-UserAgent 8155 801 IN IP4 12.34.56.78.
s=SIP Call.
c=IN IP4 12.34.56.78.
t=0 0.
m=audio 16918 RTP/AVP 0 8 18 100 19.
c=IN IP4 12.34.56.78.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:100 X-NSE/8000.
a=fmtp:100 192-194.
a=rtpmap:19 CN/8000.
#
U 2012/01/11 21:51:05.620004 xx.xx.xx.23:5060 -> 12.34.56.78:5060
SIP/2.0 100 Giving a try.
Via: SIP/2.0/UDP 12.34.56.78:5060.
From: <sip:[email protected]>;tag=F08DF710-E74.
To: <sip:[email protected]>.
Call-ID: [email protected].
CSeq: 101 INVITE.
Server: OpenSIPS Proxy Test 1.7.1.
Content-Length: 0.
.
#
U 2012/01/11 21:51:05.620052 xx.xx.xx.23:5060 -> dd.dd.dd.250:5060
INVITE sip:[email protected]:5060 SIP/2.0.
Record-Route: <sip:xx.xx.xx.23;lr;did=208.986e5031>.
Via: SIP/2.0/UDP xx.xx.xx.23;branch=z9hG4bK5d6.445830c1.0.
Via: SIP/2.0/UDP 12.34.56.78:5060.
From: <sip:[email protected]>;tag=F08DF710-E74.
To: <sip:[email protected]>.
Date: Fri, 26 Aug 1994 19:31:45 GMT.
Call-ID: [email protected].
Supported: timer,100rel.
Min-SE: 1800.
Cisco-Guid: 794784122-3225620941-2681382534-1587335478.
User-Agent: Cisco-SIPGateway/IOS-12.x.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE,
NOTIFY, INFO.
CSeq: 101 INVITE.
Max-Forwards: 5.
Remote-Party-ID:
<sip:[email protected]>;party=calling;screen=yes;privacy=off.
Timestamp: 777929505.
Contact: <sip:[email protected]:5060>.
Expires: 180.
Allow-Events: telephone-event.
Content-Type: application/sdp.
Content-Length: 325.
.
v=0.
o=CiscoSystemsSIP-GW-UserAgent 8155 801 IN IP4 12.34.56.78.
s=SIP Call.
c=IN IP4 12.34.56.78.
t=0 0.
m=audio 16918 RTP/AVP 0 8 18 100 19.
c=IN IP4 12.34.56.78.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:100 X-NSE/8000.
a=fmtp:100 192-194.
a=rtpmap:19 CN/8000.
#
U 2012/01/11 21:51:05.682477 dd.dd.dd.250:5060 -> xx.xx.xx.23:5060
SIP/2.0 400 Bad Request - 'Invalid IP Address'.
Via: SIP/2.0/UDP xx.xx.xx.23;branch=z9hG4bK5d6.445830c1.0,SIP/2.0/UDP
12.34.56.78:5060.
From: <sip:[email protected]>;tag=F08DF710-E74.
To: <sip:[email protected]>.
Date: Fri, 07 Jan 2000 09:46:16 GMT.
Call-ID: [email protected].
Timestamp: 777929505.
Server: Cisco-SIPGateway/IOS-12.x.
CSeq: 101 INVITE.
Allow-Events: telephone-event.
Content-Length: 0.
.
#
U 2012/01/11 21:51:05.682524 xx.xx.xx.23:5060 -> dd.dd.dd.250:5060
ACK sip:[email protected]:5060 SIP/2.0.
Via: SIP/2.0/UDP xx.xx.xx.23;branch=z9hG4bK5d6.445830c1.0.
From: <sip:[email protected]>;tag=F08DF710-E74.
Call-ID: [email protected].
To: <sip:[email protected]>.
CSeq: 101 ACK.
Max-Forwards: 70.
User-Agent: OpenSIPS Proxy Test 1.7.1.
Content-Length: 0.
.
#
U 2012/01/11 21:51:05.682601 xx.xx.xx.23:5060 -> dd.dd.dd.251:5060
INVITE sip:[email protected]:5060 SIP/2.0.
Record-Route: <sip:xx.xx.xx.23;lr;did=208.986e5031>.
Via: SIP/2.0/UDP xx.xx.xx.23;branch=z9hG4bK5d6.445830c1.1.
Via: SIP/2.0/UDP 12.34.56.78:5060.
From: <sip:[email protected]>;tag=F08DF710-E74.
To: <sip:[email protected]>.
Date: Fri, 26 Aug 1994 19:31:45 GMT.
Call-ID: [email protected].
Supported: timer,100rel.
Min-SE: 1800.
Cisco-Guid: 794784122-3225620941-2681382534-1587335478.
User-Agent: Cisco-SIPGateway/IOS-12.x.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE,
NOTIFY, INFO.
CSeq: 101 INVITE.
Max-Forwards: 5.
Remote-Party-ID:
<sip:[email protected]>;party=calling;screen=yes;privacy=off.
Timestamp: 777929505.
Contact: <sip:[email protected]:5060>.
Expires: 180.
Allow-Events: telephone-event.
Content-Type: application/sdp.
Content-Length: 325.
.
v=0.
o=CiscoSystemsSIP-GW-UserAgent 8155 801 IN IP4 12.34.56.78.
s=SIP Call.
c=IN IP4 12.34.56.78.
t=0 0.
m=audio 16918 RTP/AVP 0 8 18 100 19.
c=IN IP4 12.34.56.78.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:100 X-NSE/8000.
a=fmtp:100 192-194.
a=rtpmap:19 CN/8000.
#
U 2012/01/11 21:51:05.744753 dd.dd.dd.251:5060 -> xx.xx.xx.23:5060
SIP/2.0 400 Bad Request - 'Invalid IP Address'.
Via: SIP/2.0/UDP xx.xx.xx.23;branch=z9hG4bK5d6.445830c1.1,SIP/2.0/UDP
12.34.56.78:5060.
From: <sip:[email protected]>;tag=F08DF710-E74.
To: <sip:[email protected]>.
Date: Wed, 11 Jan 2012 21:50:03 GMT.
Call-ID: [email protected].
Timestamp: 777929505.
Server: Cisco-SIPGateway/IOS-12.x.
CSeq: 101 INVITE.
Content-Length: 0.
.
#
U 2012/01/11 21:51:05.744796 xx.xx.xx.23:5060 -> dd.dd.dd.251:5060
ACK sip:[email protected]:5060 SIP/2.0.
Via: SIP/2.0/UDP xx.xx.xx.23;branch=z9hG4bK5d6.445830c1.1.
From: <sip:[email protected]>;tag=F08DF710-E74.
Call-ID: [email protected].
To: <sip:[email protected]>.
CSeq: 101 ACK.
Max-Forwards: 70.
User-Agent: OpenSIPS Proxy Test 1.7.1.
Content-Length: 0.
.
#
U 2012/01/11 21:51:05.744863 xx.xx.xx.23:5060 -> 12.34.56.78:5060
SIP/2.0 500 Service Full.
Via: SIP/2.0/UDP 12.34.56.78:5060.
From: <sip:[email protected]>;tag=F08DF710-E74.
To: <sip:[email protected]>;tag=5cc68c45a4c31281edfbc625b2edf160-f742.
Call-ID: [email protected].
CSeq: 101 INVITE.
Server: OpenSIPS Proxy Test 1.7.1.
Content-Length: 0.
.
# - - - - - - - - - - - - - - - - - -
# END opensips trace
# - - - - - - - - - - - - - - - - - -
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users