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

problem with sip-ua

Hi folks,

I've a problem with a voip ISP that assigns a URINUM (the internal phone number) and uses an alphanumeric URI as username for authentication.

In my conf I've something like that:

!

dial-peer voice 50 pots

destination-pattern URINUM

port 1

!

sip-ua

authentication username URI password xxxxxxxx

calling-info pstn-to-sip from number set URINUM

The problem is: from debug ccsip I see that the sip-ua try to register with 'sip:URINUM@sip.ISP.dom' and not 'sip:URI@sip.ISP.dom' ... that's clear, normally all SIP registrations that I've already seen work in that way.

The result is: answer 'SIP/2.0 403 Forbidden'

Any advice will be appreciated

Regards

Andrea

8 REPLIES
Silver

Re: problem with sip-ua

Received: SIP/2.0 403 Forbidden means username and password configured was wrong

Silver

Re: problem with sip-ua

Correct. And thanks for your answer.

But normally we have username=URINUM (voip number).

In my case, username is alphanumeric, and not =URINUM.

"12345" is my number

"testuser" is my username

"testpass" my password

my conf is:

-----------

!

voice class codec 1

codec preference 1 g729r8

codec preference 2 g711alaw

codec preference 3 g711ulaw

!

voice-port 1

cptone IT

timeouts interdigit 4

!

dial-peer voice 50 pots

destination-pattern 12345

port 1

!

dial-peer voice 200 voip

description ISP-out

destination-pattern .T

session protocol sipv2

session target dns:sip..dom:5060

dtmf-relay rtp-nte

voice-class codec 1

no vad

!

sip-ua

authentication username "testuser" password "testpass"

calling-info pstn-to-sip from number set 12345

set pstn-cause 6 sip-status 503

set pstn-cause 18 sip-status 408

set pstn-cause 27 sip-status 502

set pstn-cause 31 sip-status 480

set pstn-cause 44 sip-status 503

set pstn-cause 58 sip-status 503

set pstn-cause 88 sip-status 503

set pstn-cause 95 sip-status 503

set pstn-cause 102 sip-status 504

set pstn-cause 111 sip-status 500

retry invite 4

retry response 3

retry bye 2

retry cancel 2

retry prack 9

retry rel1xx 10

retry subscribe 10

timers expires 60000

timers comet 100

timers notify 100

registrar dns:sip..dom:5060 expires 3600

sip-server dns:sip..dom:5060

!

this is my debug:

-----------------

Sent:

REGISTER sip:sip..dom:5060 SIP/2.0

Via: SIP/2.0/UDP 88.149.168.xx:5060;branch=z9hG4bKAEF7C6

From: "12345" <12345>.dom>;tag=169D15CC-1B5A

To: "12345" <12345>.dom>

Date: Fri, 07 Jul 2006 08:24:42 GMT

Call-ID: 7F4E3647-9CE11DB-8009D82E-9F09B043

User-Agent: Cisco-SIPGateway/IOS-12.x

Max-Forwards: 70

Timestamp: 1152260682

CSeq: 2726 REGISTER

Contact: <>12345@88.149.168.xx:5060>

Expires: 3600

Content-Length: 0

Received:

SIP/2.0 403 Forbidden

Via: SIP/2.0/UDP 88.149.168.xx:5060;branch=z9hG4bKAEF7C6

From: "12345" <12345>.dom>;tag=169D15CC-1B5A

To: "12345" <12345>.dom>;tag=as0832eec2

Call-ID: 7F4E3647-9CE11DB-8009D82E-9F09B043

CSeq: 2726 REGISTER

User-Agent: www..dom

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY

Contact: <>12345@88.149.128.xx>

Content-Length: 0

DuffyGate#sh sip-ua reg stat

Line peer expires(sec) registered

============ ============= ============ ===========

12345 50 61 no

what could I do?

Any advice will be appreciated

Regards

Andrea

New Member

Re: problem with sip-ua

Hi Andrea,

403 Forbidden indicates that the sip proxy response that the user (12345 in your case) does not exist in the your provider domain.

The SIP Proxy expect a testuser instead of 12345.

The sip proxy don't even try to authenticated you.

Once you send the correct user id, only then the sip proxy will challenge you with 401 unauthorized

Pls test following:-

1. Use a normal SIP client and try to register using testuser@yourprovidersip

This will verify that this username is existed.

2. Try to remove this line from your config, or any config that have 12345

calling-info pstn-to-sip from number set 12345

What we need to verify is the the gw can register using testuser@yourprovidersip.

Thanks

SS

Silver

Re: problem with sip-ua

hi ngss,

thanks for your answer.

1- it works fine with X-lite sip client

2- it doesn't work, even if:

no calling-info pstn-to-sip from number set 12345

no dial-peer voice 50 pots

now the 'sh sip-ua reg stat' says:

DuffyGate#sh sip-ua reg stat

Line peer expires(sec) registered

============ ============= ============ ===========

DuffyGate#

and the debug says nothing.

with dial-peer voice 50 pots:

SIP/2.0 403 Forbidden

Jul 14 08:13:55.680: //-1/000000000000/SIP/Error/act_register_new_message: Message Code Class 4xx Method Code 100 not implemented for REGISTER

Any advice will be appreciated

Regards

Andrea

New Member

Re: problem with sip-ua

Hi Andrea,

I see what is happening here.

If you try to register to a SIP Proxy, you must have the dial-peer ... pots command.

And it will take the your destination pattern as your sip id. that's why you see it try to register using 12345@...

Now try to use destination-pattern testuser in your pots dial-peer. It will then register with this id to register, and should authenticated ok.

If you need change the testuser to 12345. use traslate command.

Thanks

SSng

Silver

Re: problem with sip-ua

DuffyGate(config-dial-peer)#destination-pattern testuser

Incorrect format for E.164 Number

regular expression must be of the form ^[][^0-9,A-F#*.?+%()-]*T?(\$)?$

DuffyGate(config-dial-peer)#

what about that?

Regards

Andrea

New Member

Re: problem with sip-ua

Hi Andrea,

Use authentication command in the dial-peer pots.

It should work.

Something like this

dial-peer 10 ... pots

authentication username passwors xxxx

Pls give it a try.

Sorry not able to response ealier as I am too busy lately.

Thanks

SS

Silver

Re: problem with sip-ua

Hi,

thanks for your answer.

No way :(

conf

----

dial-peer voice 200 voip

description ISP-out

destination-pattern .T

voice-class codec 1

session protocol sipv2

session target dns:sip.ISP.dom:5060

dtmf-relay rtp-nte

no vad

!

dial-peer voice 50 pots

destination-pattern

port 1

authentication username password

!

sip-ua

set pstn-cause 6 sip-status 503

set pstn-cause 18 sip-status 408

set pstn-cause 27 sip-status 502

set pstn-cause 31 sip-status 480

set pstn-cause 44 sip-status 503

set pstn-cause 58 sip-status 503

set pstn-cause 88 sip-status 503

set pstn-cause 95 sip-status 503

set pstn-cause 102 sip-status 504

set pstn-cause 111 sip-status 500

retry invite 4

retry response 3

retry bye 2

retry cancel 2

retry prack 9

retry rel1xx 10

retry subscribe 10

timers expires 60000

timers comet 100

timers notify 100

registrar dns:sip.ISP.dom:5060 expires 3600

sip-server dns:sip.ISP.dom:5060

Debug

-----

Jul 26 09:03:06.599: //-1/000000000000/SIP/Info/sipSPIUaddCcbToUACTable: ****Adding to UAC table.

Jul 26 09:03:06.599: //-1/000000000000/SIP/Info/sipSPIUaddCcbToTable: Added to table. ccb=0x82633640 key=D3D7D407-1BBB11DB-8002D6F8-B82715AF

Jul 26 09:03:06.603: //-1/xxxxxxxxxxxx/SIP/Info/sipSPISetDateHeader: Converting TimeZone summertime to SIP default timezone = GMT

Jul 26 09:03:06.611: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Sent:

REGISTER sip:sip.ISP.dom:5060 SIP/2.0

Via: SIP/2.0/UDP 88.149.166.xx:5060;branch=z9hG4bK22654

From: "" <>@sip.ISP.dom>;tag=998A7C-B00

To: "" <>@sip.ISP.dom>

Date: Wed, 26 Jul 2006 09:03:06 GMT

Call-ID: D3D7D407-1BBB11DB-8002D6F8-B82715AF

User-Agent: Cisco-SIPGateway/IOS-12.x

Max-Forwards: 70

Timestamp: 1153904586

CSeq: 3 REGISTER

Contact: <>@88.149.166.xx:5060>

Expires: 3600

Content-Length: 0

Jul 26 09:03:06.655: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpSocketReads: Msg enqueued for SPI with IP addr: 88.149.128.xx:5060

Jul 26 09:03:06.683: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Received:

SIP/2.0 403 Forbidden

Via: SIP/2.0/UDP 88.149.166.xx:5060;branch=z9hG4bK22654

From: "" <>@sip.ISP.dom>;tag=998A7C-B00

To: "" <>@sip.ISP.dom>;tag=as758c1d36

Call-ID: D3D7D407-1BBB11DB-8002D6F8-B82715AF

CSeq: 3 REGISTER

User-Agent: www.ISP.dom

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY

Contact: <>@88.149.128.xx>

Content-Length: 0

Jul 26 09:03:06.687: //-1/000000000000/SIP/Error/act_register_new_message: Message Code Class 4xx Method Code 100 not implemented for REGISTER

Jul 26 09:03:06.687: //-1/000000000000/SIP/Info/sipSPIUdeleteCcbFromUACTable: ****Deleting from UAC table.

Jul 26 09:03:06.691: //-1/000000000000/SIP/Info/sipSPIUdeleteCcbFromTable: Deleting from table. ccb=0x82633640 key=D3D7D407-1BBB11DB-8002D6F8-B82715AF

Jul 26 09:03:06.691: //-1/000000000000/SIP/Info/sipSPIFlushEventBufferQueue: There are 0 events on the internal queue that are going to be free'd

Jul 26 09:03:06.695: //-1/000000000000/SIP/Info/sipSPIUfreeOneCCB: Freeing ccb 82633640

Any advice will be appreciated

Regards

Andrea

2428
Views
0
Helpful
8
Replies
CreatePlease to create content