Asterisk sip management

Hi,

I am sorry for asking 2 questions on the same post:

  1. I use ARI with nodejs to emit calls. I use a SIP from OVH. Why, when I originate PJSIP/numToCall@OVH, sometimes it works and sometimes not?
    When the call is not originate:
 Activating Stasis app 'externalMedia'
  == WebSocket connection from 'xxx.x.x.x:56436' for protocol '' accepted using version '13'
    -- Called numToCall@OVH
       > 0x7fa33c01d040 -- Strict RTP learning after remote address set to: xxx.x.x.x:9999
    -- Called xxx.x.x.x:9999
    -- UnicastRTP/xxx.x.x.x:9999-0x7fa33c005e60 answered
       > Launching Stasis(externalMedia) on UnicastRTP/xxx.x.x.x:9999-0x7fa33c005e60
    -- Channel Snoop/ffbe4d4c-4820-47ca-8e22-abcbb237f871-00000003 joined 'simple_bridge' stasis-bridge <53bfa643-6acc-44ca-bae6-e9ab9fe43296>
    -- Channel Snoop/ffbe4d4c-4820-47ca-8e22-abcbb237f871-00000003 left 'simple_bridge' stasis-bridge <53bfa643-6acc-44ca-bae6-e9ab9fe43296>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7fa33c005e60 joined 'simple_bridge' stasis-bridge <df096a01-51e2-4490-885c-ce42ead79b85>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7fa33c005e60 left 'simple_bridge' stasis-bridge <df096a01-51e2-4490-885c-ce42ead79b85>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7fa33c005e60 joined 'simple_bridge' stasis-bridge <0c0c323c-a389-4917-a45e-26f743d48425>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7fa33c005e60 left 'simple_bridge' stasis-bridge <0c0c323c-a389-4917-a45e-26f743d48425>
 Deactivating Stasis app 'externalMedia'

And when it works:

== WebSocket connection from 'xxx.x.x.x:56510' for protocol '' accepted using version '13'
    -- Called numToCall@OVH
       > 0x7f949c01fcd0 -- Strict RTP learning after remote address set to: xxx.x.x.x:9999
    -- Called xxx.x.x.x:9999
    -- UnicastRTP/xxx.x.x.x:9999-0x7f949c018920 answered
       > Launching Stasis(externalMedia) on UnicastRTP/xxx.x.x.x:9999-0x7f949c018920
    -- Channel Snoop/151957a9-cc0c-4309-9296-d3614b31cadc-00000000 joined 'simple_bridge' stasis-bridge <3c887c44-1f6d-434d-a67b-643c9290e691>
    -- Channel Snoop/151957a9-cc0c-4309-9296-d3614b31cadc-00000001 joined 'simple_bridge' stasis-bridge <33983a36-3311-4a02-984b-db650ba55416>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7f949c018920 joined 'simple_bridge' stasis-bridge <fcb9d878-26f3-40b7-bf7a-e8cbdcf457e7>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7f949c018920 left 'simple_bridge' stasis-bridge <fcb9d878-26f3-40b7-bf7a-e8cbdcf457e7>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7f949c018920 joined 'simple_bridge' stasis-bridge <3c887c44-1f6d-434d-a67b-643c9290e691>
       > 0x7f95680258e0 -- Strict RTP learning after remote address set to: yy.yyy.yyy.yyy:35232
    -- PJSIP/OVH-00000000 is making progress
    -- PJSIP/OVH-00000000 is making progress
    -- PJSIP/OVH-00000000 is making progress
    -- PJSIP/OVH-00000000 is making progress
    -- PJSIP/OVH-00000000 is making progress
    -- PJSIP/OVH-00000000 answered
       > Launching Stasis(externalMedia,dialed) on PJSIP/OVH-00000000

  1. How to evaluate the calling capacity of my server? (how many calls at the same time, how many calls per day within wav files are played and sometimes the same file can be played at the same time 50 times.

Thanks a lot

You would need to actually look at the SIP traffic using “pjsip set logger on” or through a packet capture and determine the complete SIP exchange. Perhaps it rejected the call for some reason.

As for testing capacity there is SIPp to send or receive calls, but how you use it and do the testing is up to you.

Thanks!

using the set logger on, when the call is not originated:

 Activating Stasis app 'externalMedia'
  == WebSocket connection from 'xxx.x.x.x:58344' for protocol '' accepted using version '13'
    -- Called NUMTOCALL@OVHNUM
       > 0x7f14d445dc30 -- Strict RTP learning after remote address set to: xxx.x.x.x:9999
    -- Called xxx.x.x.x:9999
    -- UnicastRTP/xxx.x.x.x:9999-0x7f14d445d470 answered
       > Launching Stasis(externalMedia) on UnicastRTP/xxx.x.x.x:9999-0x7f14d445d470
    -- Channel Snoop/6f0ea51c-88be-4975-abd7-e7829bbac22e-000001cc joined 'simple_bridge' stasis-bridge <cb08a84f-e742-4357-bdea-2ab2758f9ce8>
    -- Channel Snoop/6f0ea51c-88be-4975-abd7-e7829bbac22e-000001cd joined 'simple_bridge' stasis-bridge <a97f8ccc-227c-44a4-8cb0-646a36ad5f6b>
<--- Transmitting SIP request (930 bytes) to UDP:UDPIP:5060 --->
INVITE sip:NUMTOCALL@xxxx.fr.sip.ovh:5060 SIP/2.0
Via: SIP/2.0/UDP MYIP:5060;rport;branch=z9hG4bKPj7366a532-919a-451e-acad-9f7d6c07fe82
From: <sip:OVHNUM@MYIP>;tag=3ab48a89-1a58-438d-89b4-2f2f9353a672
To: <sip:NUMTOCALL@xxxx.fr.sip.ovh>
Contact: <sip:asterisk@MYIP:5060>
Call-ID: aeef501f-0b0d-4673-b831-f29d96479c98
CSeq: 1152 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.4.0
Content-Type: application/sdp
Content-Length:   237

v=0
o=- 1971622122 1971622122 IN IP4 MYIP
s=Asterisk
c=IN IP4 MYIP
t=0 0
m=audio 46372 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (391 bytes) from UDP:UDPIP:5060 --->
SIP/2.0 403 not registered
Call-ID: aeef501f-0b0d-4673-b831-f29d96479c98
CSeq: 1152 INVITE
From: <sip:OVHNUM@MYIP>;tag=3ab48a89-1a58-438d-89b4-2f2f9353a672
To: <sip:NUMTOCALL@xxxx.fr.sip.ovh>;tag=00-29911-2399ea888-48402183
Via: SIP/2.0/UDP MYIP:5060;received=MYIP;rport=5060;branch=z9hG4bKPj7366a532-919a-451e-acad-9f7d6c07fe82
Content-Length: 0


<--- Transmitting SIP request (438 bytes) to UDP:UDPIP:5060 --->
ACK sip:NUMTOCALL@xxxx.fr.sip.ovh:5060 SIP/2.0
Via: SIP/2.0/UDP MYIP:5060;rport;branch=z9hG4bKPj7366a532-919a-451e-acad-9f7d6c07fe82
From: <sip:OVHNUM@MYIP>;tag=3ab48a89-1a58-438d-89b4-2f2f9353a672
To: <sip:NUMTOCALL@xxxx.fr.sip.ovh>;tag=00-29911-2399ea888-48402183
Call-ID: aeef501f-0b0d-4673-b831-f29d96479c98
CSeq: 1152 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 20.4.0
Content-Length:  0


    -- Channel Snoop/6f0ea51c-88be-4975-abd7-e7829bbac22e-000001cc left 'simple_bridge' stasis-bridge <cb08a84f-e742-4357-bdea-2ab2758f9ce8>
    -- Channel Snoop/6f0ea51c-88be-4975-abd7-e7829bbac22e-000001cd left 'simple_bridge' stasis-bridge <a97f8ccc-227c-44a4-8cb0-646a36ad5f6b>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7f14d445d470 joined 'simple_bridge' stasis-bridge <7b8973bd-4471-47f0-98ff-65821ba209eb>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7f14d445d470 left 'simple_bridge' stasis-bridge <7b8973bd-4471-47f0-98ff-65821ba209eb>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7f14d445d470 joined 'simple_bridge' stasis-bridge <cb08a84f-e742-4357-bdea-2ab2758f9ce8>
    -- Channel UnicastRTP/xxx.x.x.x:9999-0x7f14d445d470 left 'simple_bridge' stasis-bridge <cb08a84f-e742-4357-bdea-2ab2758f9ce8>
 Deactivating Stasis app 'externalMedia'
  == WebSocket connection from 'xxx.x.x.x:58344' closed

It looks like the SIP number is not registered but pjsip show registrations return:

OVHNUM/sip:xxxx.fr.sip.ovh                       OVHNUM               Registered        (exp. 3327s)

And about SIPp thank you I will check how to use it!

Well, then you’d need to talk to OVH to understand what is going on most likely.

1 Like

Hi,
I just checked pjsip show aors and the status is NonQual…it’s related to my problem?

No? NonQual means “non qualified”, Asterisk is not checking to see whether it is reachable or not. It just sends calls regardless.

Thanks! Whan I used SIP I had no problem…maybe the registration is not well done:

;OVHNum OVH

[OVHNum]
type=registration
outbound_auth=OVHNum
server_uri=sip:xxxx.fr.sip.ovh
client_uri=sip:OVHNum@xxxx.fr.sip.ovh
retry_interval=60

[OVHNum]
type=auth
auth_type=userpass
password=OVHpass
username=OVHNum

[OVHNum]
type=aor
contact=sip:xxxx.fr.sip.ovh:5060

[OVHNum]
type=endpoint
context=incoming
disallow=all
allow=ulaw
outbound_auth=OVHNum
aors=OVHNum

[OVHNum]
type=identify
endpoint=OVHNum
match=xxxx.fr.sip.ovh

I know nothing of OVH or their SIP usage, I can only speak of what they responded with.

Thanks!

Hi,

I did not have a response from OVH but, I registered the line on ZOIPER.
When I call someone for the first time after the registration it works, and after not…
But if between each call I stop the registration to register again it works…
That means, at the end of the call the NUMBER is always connected to something?

Thanks

I don’t understand the question or statement.

Sorry for my bad english…
I said, when I log in my OVH SIP number to zoiper and I try to call my personnal phone number for example, it works. But at the end of the call, If I try a second time I have the ‘bearercapability no auth’ error and again and again.
But (2) if between each call I log out on zoiper and log in again, it works

So the question is: This case is known? Why a provider block the calls on the same log in. And if it is the case, is it possible to log out and log in automatically between each calls on ASTERISK?

How the provider chooses to do things is up to them, including any policies. There is no ability to “log out and log in” automatically between calls in Asterisk. I’ve never heard of such a thing being needed before.

Ok thanks, I think the simple solution is to leave OVH…

We have customers using zoiper who have their asterisk at OVH, it works perfectly.

Thanks. It is nice to be unique but not in problem solving…:slight_smile:

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