'perl net::sip register sip request header

perl net::sip register sip request header

my test is on eyebeam softphone but it need get same response in perl

first i register my domain in eyebeam softphone without port and is give me a good response 403

04:49:58.4 
SENDING TCP: 
REGISTER sip:mydomain.com SIP/2.0
Via: SIP/2.0/TCP 192.168.217.142:9565;branch=z9hG4bK-d87543-5a2868164442f415-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:[email protected]:9565;rinstance=0064d302c642b7fa;transport=TCP>
To: <sip:[email protected]>
From: <sip:[email protected]>;tag=3761872b
Call-ID: ca410d2c64600730@REVTS1RPUC1UMEVKTjIy
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Supported: eventlist
User-Agent: eyeBeam release 3015c stamp 27107
Content-Length: 0


04:49:58.9 Proxy slot #1 () - Failed to register! error-code: 403, msg: 'Forbidden'. Will no longer attempt registration for this SIP proxy target. AOR: '<sip:[email protected]>', route-to: '<n/a>', firewall-proxy: 'F'

but on i try to register by defualt port 5060 same domain is not give me any response

.

05:03:25.9 
SENDING TO: x.x.x.x:5060
REGISTER sip:mydomain.com:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.217.142:9565;branch=z9hG4bK-d87543-70347306c9694764-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:[email protected]:9565;rinstance=64a7314a3dec298b>
To: <sip:[email protected]:5060>
From: <sip:[email protected]:5060>;tag=3778de28
Call-ID: d65f414f4a3f2f7e@REVTS1RPUC1UMEVKTjIy
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Supported: eventlist
User-Agent: eyeBeam release 3015c stamp 27107
Content-Length: 0

now i try to register it using perl but it is not working my response is

Bad address family for Socket::inet_pton, got -1, should be either AF_INET or AF_INET6 at /usr/local/share/perl5/Net/SIP/Util.pm line 743.

and this is my code to register it

my ($ip,$port) = split (/:/, $host);
my user = "4789";
my pass = "4789";
my $host = "mydomain.com";
 my $ua = Net::SIP::Simple->new(
  registrar =>  $host,
  domain =>  $host,
  from => $user,
  auth => [ $user,$pass ]
)|| return 0;

this is my debug

1653055829.0102 DEBUG:<52> Net::SIP::Dispatcher::__generic_resolver[1194]: issue lookup for A mydomain.com
1653055829.0206 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::addFD[61]: Net::SIP::Dispatcher::Eventloop=HASH(0x2f95a18) added fn=3 rw(0) sock=0.0.0.0:43830
1653055829.0434 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[217]: call cb on fn=3 rw=0 dns
1653055829.0445 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::delFD[80]: Net::SIP::Dispatcher::Eventloop=HASH(0x2f95a18) delete fn=3 sock=0.0.0.0:43830
1653055829.0450 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[191]: stopvar triggered
1653055829.0460 DEBUG:<90> Net::SIP::Leg::new[155]: created socket on my ip address:5060
1653055829.0464 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::addFD[61]: Net::SIP::Dispatcher::Eventloop=HASH(0x2f95a18) added fn=3 rw(0) sock=my ip address:5060
1653055829.0474 DEBUG:<10> Net::SIP::Endpoint::new_request[156]: create new request for REGISTER within new call 7ba153ab6ddd17f658bbee2b75baac6d
1653055829.0482 DEBUG:<50> Net::SIP::Endpoint::new_request[164]: request=REGISTER sip:mydomain.com SIP/2.0
1653055829.0482 DEBUG:<50>      Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055829.0482 DEBUG:<50>      Contact: admin <sip:admin@my ip address>
1653055829.0482 DEBUG:<50>      Cseq: 1 REGISTER
1653055829.0482 DEBUG:<50>      Expires: 900
1653055829.0482 DEBUG:<50>      From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055829.0482 DEBUG:<50>      Max-forwards: 70
1653055829.0482 DEBUG:<50>      To: admin <sip:[email protected]>
1653055829.0482 DEBUG:<50>      Content-length: 0
1653055829.0482 DEBUG:<50>
1653055829.0482 DEBUG:<50>
1653055829.0492 DEBUG:<52> Net::SIP::Dispatcher::__generic_resolver[1194]: issue lookup for SRV _sip._udp.mydomain.com
1653055829.0498 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::addFD[61]: Net::SIP::Dispatcher::Eventloop=HASH(0x2f95a18) added fn=4 rw(0) sock=0.0.0.0:43660
1653055829.0720 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[217]: call cb on fn=4 rw=0 dns
1653055829.0754 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::delFD[80]: Net::SIP::Dispatcher::Eventloop=HASH(0x2f95a18) delete fn=4 sock=0.0.0.0:43660
1653055829.0756 DEBUG:<52> Net::SIP::Dispatcher::__generic_resolver[1194]: issue lookup for A mydomain.com
1653055829.0761 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::addFD[61]: Net::SIP::Dispatcher::Eventloop=HASH(0x2f95a18) added fn=6 rw(0) sock=0.0.0.0:44328
1653055829.0813 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[217]: call cb on fn=6 rw=0 dns
1653055829.0818 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::delFD[80]: Net::SIP::Dispatcher::Eventloop=HASH(0x2f95a18) delete fn=6 sock=0.0.0.0:44328
1653055829.0821 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055829.0829 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055829.0829 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055829.0829 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055829.0829 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055829.0829 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055829.0829 DEBUG:<2>       Cseq: 1 REGISTER
1653055829.0829 DEBUG:<2>       Expires: 900
1653055829.0829 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055829.0829 DEBUG:<2>       Max-forwards: 70
1653055829.0829 DEBUG:<2>       To: admin <sip:[email protected]>
1653055829.0829 DEBUG:<2>       Content-length: 0
1653055829.0829 DEBUG:<2>
1653055829.0829 DEBUG:<2>
1653055830.0466 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055830.04331 repeat=<undef>
1653055830.0467 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055830.0472 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055830.0472 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055830.0472 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055830.0472 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055830.0472 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055830.0472 DEBUG:<2>       Cseq: 1 REGISTER
1653055830.0472 DEBUG:<2>       Expires: 900
1653055830.0472 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055830.0472 DEBUG:<2>       Max-forwards: 70
1653055830.0472 DEBUG:<2>       To: admin <sip:[email protected]>
1653055830.0472 DEBUG:<2>       Content-length: 0
1653055830.0472 DEBUG:<2>
1653055830.0472 DEBUG:<2>
1653055830.0476 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055830.5
1653055831.0490 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055831.04648 repeat=<undef>
1653055831.0491 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055831.0496 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055831.0496 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055831.0496 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055831.0496 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055831.0496 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055831.0496 DEBUG:<2>       Cseq: 1 REGISTER
1653055831.0496 DEBUG:<2>       Expires: 900
1653055831.0496 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055831.0496 DEBUG:<2>       Max-forwards: 70
1653055831.0496 DEBUG:<2>       To: admin <sip:[email protected]>
1653055831.0496 DEBUG:<2>       Content-length: 0
1653055831.0496 DEBUG:<2>
1653055831.0496 DEBUG:<2>
1653055831.0500 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055832.5
1653055832.0513 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055832.04887 repeat=<undef>
1653055832.0514 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055832.5
1653055833.0527 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055833.05122 repeat=<undef>
1653055833.0529 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055833.0533 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055833.0533 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055833.0533 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055833.0533 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055833.0533 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055833.0533 DEBUG:<2>       Cseq: 1 REGISTER
1653055833.0533 DEBUG:<2>       Expires: 900
1653055833.0533 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055833.0533 DEBUG:<2>       Max-forwards: 70
1653055833.0533 DEBUG:<2>       To: admin <sip:[email protected]>
1653055833.0533 DEBUG:<2>       Content-length: 0
1653055833.0533 DEBUG:<2>
1653055833.0533 DEBUG:<2>
1653055833.0537 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055836.5
1653055834.0551 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055834.05265 repeat=<undef>
1653055834.0552 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055836.5
1653055835.0565 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055835.05498 repeat=<undef>
1653055835.0566 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055836.5
1653055836.0579 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055836.05644 repeat=<undef>
1653055836.0581 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055836.5
1653055837.0594 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055837.05786 repeat=<undef>
1653055837.0595 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055837.0600 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055837.0600 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055837.0600 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055837.0600 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055837.0600 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055837.0600 DEBUG:<2>       Cseq: 1 REGISTER
1653055837.0600 DEBUG:<2>       Expires: 900
1653055837.0600 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055837.0600 DEBUG:<2>       Max-forwards: 70
1653055837.0600 DEBUG:<2>       To: admin <sip:[email protected]>
1653055837.0600 DEBUG:<2>       Content-length: 0
1653055837.0600 DEBUG:<2>
1653055837.0600 DEBUG:<2>
1653055837.0602 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055840.5
1653055838.0614 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055838.05933 repeat=<undef>
1653055838.0615 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055840.5
1653055839.0628 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055839.06136 repeat=<undef>
1653055839.0629 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055840.5
1653055840.0643 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055840.06276 repeat=<undef>
1653055840.0644 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055840.5
1653055841.0657 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055841.06417 repeat=<undef>
1653055841.0658 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055841.0662 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055841.0662 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055841.0662 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055841.0662 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055841.0662 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055841.0662 DEBUG:<2>       Cseq: 1 REGISTER
1653055841.0662 DEBUG:<2>       Expires: 900
1653055841.0662 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055841.0662 DEBUG:<2>       Max-forwards: 70
1653055841.0662 DEBUG:<2>       To: admin <sip:[email protected]>
1653055841.0662 DEBUG:<2>       Content-length: 0
1653055841.0662 DEBUG:<2>
1653055841.0662 DEBUG:<2>
1653055841.0664 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055844.5
1653055842.0677 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055842.06557 repeat=<undef>
1653055842.0678 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055844.5
1653055843.0682 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055843.0676 repeat=<undef>
1653055843.0683 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055844.5
1653055844.0696 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055844.06816 repeat=<undef>
1653055844.0697 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055844.5
1653055845.0710 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055845.06954 repeat=<undef>
1653055845.0712 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055845.0716 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055845.0716 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055845.0716 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055845.0716 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055845.0716 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055845.0716 DEBUG:<2>       Cseq: 1 REGISTER
1653055845.0716 DEBUG:<2>       Expires: 900
1653055845.0716 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055845.0716 DEBUG:<2>       Max-forwards: 70
1653055845.0716 DEBUG:<2>       To: admin <sip:[email protected]>
1653055845.0716 DEBUG:<2>       Content-length: 0
1653055845.0716 DEBUG:<2>
1653055845.0716 DEBUG:<2>
1653055845.0718 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055848.5
1653055846.0731 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055846.07094 repeat=<undef>
1653055846.0732 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055848.5
1653055847.0745 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055847.07304 repeat=<undef>
1653055847.0746 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055848.5
1653055848.0759 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055848.07445 repeat=<undef>
1653055848.0760 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055848.5
1653055849.0773 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055849.07585 repeat=<undef>
1653055849.0775 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055849.0779 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055849.0779 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055849.0779 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055849.0779 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055849.0779 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055849.0779 DEBUG:<2>       Cseq: 1 REGISTER
1653055849.0779 DEBUG:<2>       Expires: 900
1653055849.0779 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055849.0779 DEBUG:<2>       Max-forwards: 70
1653055849.0779 DEBUG:<2>       To: admin <sip:[email protected]>
1653055849.0779 DEBUG:<2>       Content-length: 0
1653055849.0779 DEBUG:<2>
1653055849.0779 DEBUG:<2>
1653055849.0781 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055852.5
1653055850.0794 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055850.07726 repeat=<undef>
1653055850.0795 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055852.5
1653055851.0808 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055851.07932 repeat=<undef>
1653055851.0809 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055852.5
1653055852.0822 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055852.08072 repeat=<undef>
1653055852.0823 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055852.5
1653055853.0836 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055853.08212 repeat=<undef>
1653055853.0837 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055853.0842 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055853.0842 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055853.0842 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055853.0842 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055853.0842 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055853.0842 DEBUG:<2>       Cseq: 1 REGISTER
1653055853.0842 DEBUG:<2>       Expires: 900
1653055853.0842 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055853.0842 DEBUG:<2>       Max-forwards: 70
1653055853.0842 DEBUG:<2>       To: admin <sip:[email protected]>
1653055853.0842 DEBUG:<2>       Content-length: 0
1653055853.0842 DEBUG:<2>
1653055853.0842 DEBUG:<2>
1653055853.0844 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055856.5
1653055854.0857 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055854.08352 repeat=<undef>
1653055854.0858 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055856.5
1653055855.0871 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055855.08558 repeat=<undef>
1653055855.0872 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055856.5
1653055856.0885 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055856.08699 repeat=<undef>
1653055856.0886 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055856.5
1653055857.0899 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055857.08839 repeat=<undef>
1653055857.0900 DEBUG:<50> Net::SIP::Dispatcher::__deliver[656]: deliver through leg Net::SIP::Leg udp:my ip address:5060 @85.133.97.241:5060
1653055857.0904 DEBUG:<2> Net::SIP::Leg::deliver[424]: delivery with udp from my ip address:5060 to 85.133.97.241:5060:
1653055857.0904 DEBUG:<2>       REGISTER sip:mydomain.com SIP/2.0
1653055857.0904 DEBUG:<2>       Via: SIP/2.0/UDP my ip address;branch=z9hG4bKe436e577a9ff53b14a2e5fbb3cec4c864799864de3fb2803189223d2894183
1653055857.0904 DEBUG:<2>       Call-id: 7ba153ab6ddd17f658bbee2b75baac6d
1653055857.0904 DEBUG:<2>       Contact: admin <sip:admin@my ip address>
1653055857.0904 DEBUG:<2>       Cseq: 1 REGISTER
1653055857.0904 DEBUG:<2>       Expires: 900
1653055857.0904 DEBUG:<2>       From: admin <sip:[email protected]>;tag=521c7d38031b258172e51fa0ab62f6a5
1653055857.0904 DEBUG:<2>       Max-forwards: 70
1653055857.0904 DEBUG:<2>       To: admin <sip:[email protected]>
1653055857.0904 DEBUG:<2>       Content-length: 0
1653055857.0904 DEBUG:<2>
1653055857.0904 DEBUG:<2>
1653055857.0906 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055860.5
1653055858.0919 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055858.08979 repeat=<undef>
1653055858.0920 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055860.5
1653055859.0935 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055859.09185 repeat=<undef>
1653055859.0937 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055860.5
1653055860.0950 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055860.09343 repeat=<undef>
1653055860.0951 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire 1653055860.5

1653055861.0964 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[171]: trigger timer(disp_expire) 1653055861.09492 repeat=<undef>
1653055861.0966 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[541]: entry 7ba153ab6ddd17f658bbee2b75baac6d 1 expired because expire=1653055860.50 but now=1653055861
1653055861.0982 DEBUG:<50> Net::SIP::Dispatcher::queue_expire[576]: next expire <undef>
1653055861.0983 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[191]: stopvar triggered

last update my code

 my $ua = Net::SIP::Simple->new(
  registrar => "sip:".$host.";transport=TCP",
  domain =>  $host,
  from => $user,
  auth => [ $user,$pass ]
)|| return 0;

my last debug

1653092146.9896 DEBUG:<10> Net::SIP::Endpoint::new_request[156]: create new request for REGISTER within new call 22b70dfe3d607f4c853c2e20d514c565
1653092146.9904 DEBUG:<50> Net::SIP::Endpoint::new_request[164]: request=REGISTER <sip:mydomain.com;transport=TCP> SIP/2.0
1653092146.9904 DEBUG:<50>      Call-id: 22b70dfe3d607f4c853c2e20d514c565
1653092146.9904 DEBUG:<50>      Contact: 442 <sip:442@my ip address>
1653092146.9904 DEBUG:<50>      Cseq: 1 REGISTER
1653092146.9904 DEBUG:<50>      Expires: 900
1653092146.9904 DEBUG:<50>      From: 442 <sip:[email protected]>;tag=05de51340f438127ea168db2e23943f1
1653092146.9904 DEBUG:<50>      Max-forwards: 70
1653092146.9904 DEBUG:<50>      To: 442 <sip:[email protected]>
1653092146.9904 DEBUG:<50>      Content-length: 0
1653092146.9904 DEBUG:<50>
1653092146.9904 DEBUG:<50>
1653092146.9913 DEBUG:<52> Net::SIP::Dispatcher::__generic_resolver[1194]: issue lookup for SRV _sip._tcp.mydomain.com
1653092146.9919 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::addFD[61]: Net::SIP::Dispatcher::Eventloop=HASH(0x20e9a80) added fn=4 rw(0) sock=0.0.0.0:59145
1653092147.0141 DEBUG:<50> Net::SIP::Dispatcher::Eventloop::loop[217]: call cb on fn=4 rw=0 dns
1653092147.0158 DEBUG:<99> Net::SIP::Dispatcher::Eventloop::delFD[80]: Net::SIP::Dispatcher::Eventloop=HASH(0x20e9a80) delete fn=4 sock=0.0.0.0:59145
Bad address family for Socket::inet_pton, got -1, should be either AF_INET or AF_INET6 at /usr/local/share/perl5/Net/SIP/Util.pm line 753.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source