Problem with CALL

Hi All, i have the problem with connect my asterisk with OLD switch my client.
I cannot use PJSIP but only SIP.
When i send call the test for check the connection i have always
NOTICE chan_sip.c handle_response_invite: Failed to authenticate on INVITE
This is my configuration
sip.conf

[IP01]
type = friend
host = X.X.X.X
context = outcall
secret=123456
trustrpid = yes
quality=yes

[200]
type=friend
callerid=200
host=dynamic
context=outcall
secret=password
nat=force_rport
quality=yes

This is extension.conf

[outcall]
exten => _456X.,1,NoOp()
exten => _456X.,n,Playback(test)
exten => _456X.,n,Dial(SIP/${EXTEN}@IP01)
exten => _456X.,n,Hangup()

I use the playback only for know if the call is UP
I want when call the number 456XXXX the call go to IP01
Thanks

You mean server not client. Clients issue INVITE, and servers respond to them.

Please identify the endpoint and explain the technical reason why it is incompatible with chan_pjsip.

Your secret is wrong, or you are not providing the identification information required by the server user agent. Typically the identification information is either the user part of From: header URI, which in this case will be whatever the calling client user agent sent (probably 200, but there is insufficient information to be certain), or the IP address of Asterisk.

type=friend is wrong, although often included in copy and paste configurations.

Having both in the same context is questionable.

What is there about your network configuration that requires force_rport?

What does “quality” mean? There is no such option.

Hi David
If i missing type i have this answer
WARNING[4297]: chan_sip.c:33634 reload_config: Section ‘IP01’ lacks type
If i add the new SIP for softphone is all ok, if i call from 200 to 300 is ok.
But when i call to old switch i have the problem.
I rechack the parameter and are all ok.

== Using SIP RTP CoS mark 5
       > 0x7feb740521e0 -- Strict RTP learning after remote address set to: 192.168.1.10:5062
    -- Executing [45622222@tohost01:1] NoOp("SIP/200-00000054", "") in new stack
    -- Executing [45622222@tohost01:2] Playback("SIP/200-00000054", "test") in new stack
    -- <SIP/200-00000054> Playing 'test.gsm' (language 'en')
       > 0x7feb740521e0 -- Strict RTP qualifying stream type: audio
       > 0x7feb740521e0 -- Strict RTP switching source address to Y.Y.Y.Y:5062
    -- Executing [45622222@tohost01:3] Dial("SIP/200-00000054", "SIP/45622222@IP01") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/45622222@IP01
[2023-12-30 17:57:35] NOTICE[4297][C-0000005e]: chan_sip.c:24413 handle_response_invite: Failed to authenticate on INVITE to '"200" <sip:200@X.X.X.X>;tag=as5ce0951d'
    -- SIP/IP01-00000055 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [45622222@outcall:4] Hangup("SIP/200-00000054", "") in new stack
  == Spawn extension (outcall, 45622222, 4) exited non-zero on 'SIP/200-00000054'

and if i check the sip status

Host                                    dnsmgr Username       Refresh State                Reg.Time
A.A.A.A:5060                      N      IP01              3585 Registered           Sat, 30 Dec 2023 17:57:12

and peers

Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description
200/200                   Y.Y.Y.Y                            D  Yes        No             5060     OK (26 ms)
IP01                      A.A.A.A                               Yes        No             5060     OK (36 ms)
2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0 offline]

Thanks

As I said, either your secret or your identity is wrong.

I did another test
i send the command for test originate

channel originate Local/4562222@outcall extension 456@outcall
    -- Called 4562222@outcall
    -- Executing [4562222@outcall:1] NoOp("Local/4562222@outcall-00000002;2", "") in new stack
    -- Executing [4562222@outcall:2] Playback("Local/4562222@outcall-00000002;2", "test") in new stack
    -- Local/4562222@outcall01-00000002;1 answered
[2023-12-30 18:34:02] WARNING[12502][C-00000065]: pbx.c:4507 __ast_pbx_run: Channel 'Local/4562222@outcall-00000002;1' sent to invalid extension but no invalid handler: context,exten,priority=outcall,456,1
  == Spawn extension (outcall, 4562222, 2) exited non-zero on 'Local/4562222@outcall-00000002;2'

I set the password but the old switch dont use the password, it is use the IP

This is 456, not something that matches 456X. It is two digits too short.

It’s asking for the password. That’s why you are getting a failure. I suppose it might be other reasons for 403. You need to use “sip set debug on” to see what the actual response is.

I don’t understand why you are saying it doesn’t work with chan_pjsip, when you are demonstrating that it doesn’t work with chan_sip.

I resolve the problem.
I say to the company you need change OLD SWITCH with the NEW.
I try my configuration and all work to my machine
Thanks DAVID

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.