04-02-2014 02:56 AM - edited 03-16-2019 10:20 PM
Hi all,
have a big problem with the configuration of two sip trunks.
If I configure the second sip trunk to the provider, outgoing calls will not work anymore.
The second sip trunk has only 2 connections for fax devices.
Is there a solution to route outgoing calls via dial-peer to the first sip trunk and to the second sip trunk?
SNIP cube configuration:
sip-ua
credentials username 0235XXXXX password 7 121F55180311070D2C realm 0235698656 >> sip trunk just for outgoing calls via phone.
authentication username 023XXXXXpassword 7 06005F2E5D54021003
credentials username 0235698XXXX password 7 094A1E06081F1C1B0D realm 02356XXXX << second sip trunk for fax device
authentication username 02356XXXX password 7 110F490A0608000502 realm 023XXXXXX
retry invite 3
retry response 3
retry bye 3
retry cancel 3
retry register 3
retry options 10
timers trying 1000
timers connect 1000
timers register 1000
registrar ipv4:89.184.167.11 expires 3600
sip-server ipv4:89.184.167.11
!
ial-peer voice 1100 voip
description CUBE, Outgoing Enbloc to Provider
translation-profile outgoing SIP-OUTGOING
preference 2
max-conn 30
destination-pattern 0T
session protocol sipv2
session target sip-server
session transport udp
voice-class codec 100
voice-class sip early-offer forced
voice-class sip profiles 200
voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte
fax-relay sg3-to-g3
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
no vad
supplementary-service pass-through
Thanks,
Stefan
04-02-2014 03:12 AM
Hello Stefan,
Outbound dial-peer matching based on the longest match rule first and then preference.
Preference 0 is the highest priority. Please modify the dial-peer configuration accordingly.
//Suresh
Please rate all the helpful posts
04-02-2014 03:19 AM
Hi,
thanks for your reply.
I far with the preference feature.
This is not a solution. Because the second sip trunk is only configure with T.38.
So I need a other solution.
Thanks.,
Stefan
04-02-2014 03:29 AM
You may try dial-peer hunting feature.
http://rsccievoice.wordpress.com/2012/07/30/dial-peers/
also, could you please post your dial-peer configurations here?
// Suresh
Please rate all the helpful answers
04-02-2014 04:27 AM
Hi,
sorry for delay,
dial-peer voice 1000 voip
description incoming from Provider
translation-profile incoming SIP-INCOMING
session protocol sipv2
session target sip-server
session transport udp
incoming called-number .
voice-class codec 100
voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte sip-notify
no vad
!
dial-peer voice 1010 voip
description CUBE, Outgoing to ALU OXE - TEST
preference 1
destination-pattern 3020320
session protocol sipv2
session target ipv4:192.1.30.20
voice-class codec 100
voice-class sip profiles 100
voice-class sip bind control source-interface GigabitEthernet0/2
voice-class sip bind media source-interface GigabitEthernet0/2
dtmf-relay rtp-nte sip-notify
fax protocol t38 nse force version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 1020 voip
description CUBE, Outgoing to ALU OXE - TEST
preference 1
destination-pattern 2074009..
session protocol sipv2
session target ipv4:192.1.30.20
voice-class codec 100
voice-class sip profiles 100
voice-class sip bind control source-interface GigabitEthernet0/2
voice-class sip bind media source-interface GigabitEthernet0/2
dtmf-relay rtp-nte sip-notify
fax protocol t38 nse force version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 1100 voip
description CUBE, Outgoing Enbloc to Provider
translation-profile outgoing SIP-OUTGOING
preference 2
max-conn 30
destination-pattern 0T
session protocol sipv2
session target sip-server
session transport udp
voice-class codec 100
voice-class sip early-offer forced
voice-class sip profiles 200
voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte
fax-relay sg3-to-g3
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
no vad
supplementary-service pass-through
!
dial-peer voice 1200 voip
description CUBE, incoming from OXE
shutdown
session protocol sipv2
session target sip-server
incoming called-number 0.
voice-class codec 100
voice-class sip bind control source-interface GigabitEthernet0/2
voice-class sip bind media source-interface GigabitEthernet0/2
dtmf-relay rtp-nte
no vad
!
dial-peer voice 1030 voip
description CUBE, Outgoing to ALU OXE
preference 1
destination-pattern ^023[57]
session protocol sipv2
session target ipv4:192.1.30.20
incoming called-number 0.
voice-class codec 100
voice-class sip profiles 100
voice-class sip bind control source-interface GigabitEthernet0/2
voice-class sip bind media source-interface GigabitEthernet0/2
dtmf-relay rtp-nte sip-notify
fax protocol t38 nse force version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 1040 voip
description CUBE, Outgoing to ALU OXE
preference 1
destination-pattern ^23[57]
session protocol sipv2
session target ipv4:192.1.30.20
incoming called-number 0.
voice-class codec 100
voice-class sip profiles 100
voice-class sip bind control source-interface GigabitEthernet0/2
voice-class sip bind media source-interface GigabitEthernet0/2
dtmf-relay rtp-nte sip-notify
fax protocol t38 nse force version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
dial-peer voice 1050 voip
description CUBE, Outgoing to ALU OXE
preference 2
destination-pattern ^23[57]
session protocol sipv2
session target ipv4:10.7.2.3
voice-class codec 100
voice-class sip profiles 100
voice-class sip bind control source-interface GigabitEthernet0/2
voice-class sip bind media source-interface GigabitEthernet0/2
dtmf-relay rtp-nte sip-notify
fax protocol t38 nse force version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
no vad
!
CallFlow:
Alactel Phone -> ALU PBX -> SIP SBC -> SIP Trunk Provider
04-02-2014 05:33 AM
Could you please collect 'debug ccsip message & debug voice ccapi inout' for a test call? Please provide calling & called numbers too.
04-02-2014 05:55 AM
Hi,
now both sip trunks to the sip provider are established and outgoing calls are not possible anymore.
cube#sh sip-ua register sta
Line peer expires(sec) registered P-Associ-URI
================================ ========== ============ ========== ============
023569XXXX -1 2334 yes >
023569XXXX -1 1497 yes
see attachment
calling number - 3123
called number - 0049332831133232
04-02-2014 06:13 AM
Hello Stefan,
the call is disconnected by the provider with error "SIP/2.0 503 Service unavailable - no free line"
*Apr 2 12:34:48.833: //191936/039AB403A326/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 503 Service unavailable - no free line
Via: SIP/2.0/UDP 213.206.215.27:5060;branch=z9hG4bK1B6F29B8;rport=58603
From: <sip:3123@89.184.167.11>;tag=6613B448-7BD
To: <sip:0049332831133232@89.184.167.11>;tag=c01b7e134ccfaf6dce24f17b9ae3d18b.e900
Call-ID: 39BEC53-B99A11E3-A32CA60F-9EF8485@213.206.215.27
CSeq: 102 INVITE
Server: OpenSIPS (1.6.2-notls (x86_64/linux))
Content-Length: 0
>> what is the calling number format the provider expects from you? you are sending only 4 digit extn to the provider.
>> Please talk to them on why they are disconnecting the call.
//Suresh
Please rate all the helpful posts.
04-02-2014 06:30 AM
Hi,
but this happen only if I configure the second sip trunk.
Thanks,
stefan
04-02-2014 02:30 PM
This is the INVITE that is sent with this call. Is the authentication credentials correct for this call to this ITSP?
Proxy-Authorization: Digest username="0235698640",realm="sipserver
Sent: INVITE sip:0049332831133232@89.184.167.11:5060 SIP/2.0 Via: SIP/2.0/UDP 213.206.215.27:5060;branch=z9hG4bK1B6F29B8 From: <sip:3123@89.184.167.11>;tag=6613B448-7BD To: <sip:0049332831133232@89.184.167.11> Date: Wed, 02 Apr 2014 12:34:48 GMT Call-ID: 39BEC53-B99A11E3-A32CA60F-9EF8485@213.206.215.27 Supported: 100rel,timer,resource-priority,replaces,sdp-anat Min-SE: 1800 Cisco-Guid: 0060470275-3113882083-2737219087-0166691973 User-Agent: Cisco-SIPGateway/IOS-15.2.4.M4 Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER CSeq: 102 INVITE Timestamp: 1396442088 Contact: <sip:3123@213.206.215.27:5060> Expires: 180 Allow-Events: telephone-event Proxy-Authorization: Digest username="0235698640",realm="sipserver",uri="sip:0049332831133232@89.184.167.11:5060",response="a86cc29b146444174b28286a2d8597b4",nonce="533c04c300008d8a5fadc81e040afef72653e6d04dbaa66e",algorithm=md5
From your config, this looks like the authentication credentials for the fax devices..
04-03-2014 01:47 AM
Hi Ayodeji,
thanks for your reply.
This is what I mean, If I register the second trunk to the sip provider every external call will be routed with this credentials.
So I don't know if I can configure a routing decision just for outgoing calls.
Outgoing calls should be routed trought the first sip trunk.
Only incoming fax and outgoing fax should be route to the second sip trunk.
Thanks,
Stefan
04-03-2014 06:07 AM
What you need to do is configure different registrars.
Example below. Change the values to yours and this should work for you.
Router> enable
Router# configure terminal
Router(config)# sip-ua
Router(config-sip-ua)# registrar 1 dns:example1.com expires 180
Router(config-sip-ua)# registrar 2 dns:example2.com expires 360
Router(config-sip-ua)# authentication username MyUsername password MyPassword1 realm
Realm.example1.com
Router(config-sip-ua)# authentication username MyUsername password MyPassword2 realm
AnotherRealm.example1.com
Router(config-sip-ua)# authentication username MyUsername password MyPassword3 realm
Realm.example2.com
Router(config-sip-ua)# authentication username MyUsername password MyPassword4 realm
AnotherRealm.example2.com
04-03-2014 06:13 AM
Hi,
can you also explain me, how I bind this on the outgoing dialpeer ?!
04-03-2014 08:27 AM
Stefan,
Here is a sample config of using two different providers..You need to configure the dial-peers facing each provider with the correct authentication credentials..
dial-peer voice 10 voip
description ** SIP trunk to SP-1 (DK) **
translation-profile outgoing provider2
destination-pattern 0[2-9].......$
session protocol sipv2
session target sip-server
voice-class codec 1
no voice-class sip localhost
dtmf-relay rtp-nte
no vad
authentication username 654321 password YYYYY realm provider.dk
dial-peer voice 20 voip
description ** SIP trunk to SP-2 (UK) **
translation-profile incoming provider1
destination-pattern 00044T
session protocol sipv2
session target registrar
voice-class codec 1
no voice-class sip localhost
dtmf-relay rtp-nte
no vad
authentication username 123456 password YYYYY realm provider.co.uk
sip-ua
credentials number 123456 username 123456 password XXXXX realm provider.dk
credentials number 654321 username 654321 password XXXXX realm provider.co.uk
retry register 5
registrar 1 dns:provider.co.uk expires 3600 auth-realm provider.co.uk
registrar 2 dns:provider.com expires 3600 auth-realm provider.dk
sip-server dns:provider.dk
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: