Re: [asterisk-users] pjsip subscribe (presence) always returns: No matching endpoint found

2017-11-19 Thread Joshua Colp
On Sun, Nov 19, 2017, at 02:11 PM, Benoit Panizzon wrote:
> Hi Joshua
> 
> thank you for the quick reply
> 
> > Have you checked the Asterisk console when PJSIP is loaded to see if
> > the endpoint did not load for some reason? Does it show up in "pjsip
> > show endpoints"?
> 
> Yes, the endpoint shows up.
> 
>  Endpoint:  11/(scrubbed from mail)  
>  Not in use0 of inf
>  InAuth:  11/11
> Aor:  11 1
>   Contact:  11/sip:11@[2001:4060:dead:d1d0:204:13ff:fe 58af7d6822
>   Avail 5.799
>   Transport:  transport-udp udp  0  0  [::]:5061
> 
> I had the qualify statement at the wrong place, but that's sorted out
> now.
> 
> But still, subscribing to the hint results in a 404 error.
> 
> Acutualy, that subscribing is a bit odd, it's a snom M9 phone that is
> trying to subscribe to itself.
> That does not make much sense in my opinion.
> 
> It just that chan_sip reported OK to this and chan_pjsip replies with
> 404.
> Or is pjsip more intelligent and trying to prevent the phone from
> subscribing to itself?

The chan_pjsip module doesn't prevent that. You'd need to provide the
full SUBSCRIBE now that it is actually finding the endpoint and coming
in.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] pjsip subscribe (presence) always returns: No matching endpoint found

2017-11-19 Thread Benoit Panizzon
Hi Joshua

thank you for the quick reply

> Have you checked the Asterisk console when PJSIP is loaded to see if
> the endpoint did not load for some reason? Does it show up in "pjsip
> show endpoints"?

Yes, the endpoint shows up.

 Endpoint:  11/(scrubbed from mail)   Not 
in use0 of inf
 InAuth:  11/11
Aor:  11 1
  Contact:  11/sip:11@[2001:4060:dead:d1d0:204:13ff:fe 58af7d6822 Avail 
5.799
  Transport:  transport-udp udp  0  0  [::]:5061

I had the qualify statement at the wrong place, but that's sorted out now.

But still, subscribing to the hint results in a 404 error.

Acutualy, that subscribing is a bit odd, it's a snom M9 phone that is trying to 
subscribe to itself.
That does not make much sense in my opinion.

It just that chan_sip reported OK to this and chan_pjsip replies with 404.
Or is pjsip more intelligent and trying to prevent the phone from subscribing 
to itself?

-Benoit-

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] pjsip subscribe (presence) always returns: No matching endpoint found

2017-11-19 Thread Joshua Colp
On Sun, Nov 19, 2017, at 12:11 PM, Benoit Panizzon wrote:
> Hello List
> 
> I am in the progress of migrating from chan_sip to pjsip.
> 
> I fear I have missed something on how hints need to be specified for
> pjsip.
> 
> For chan_sip I have configured sip.conf
> 
> subscribecontext = localuser
> 
> 
> and in the dialplan I set:
> 
> [localuser]
> exten => 11,hint,SIP/11
> 
> Now if a phone subscribes to '11' this works.
> 
> Now I try to get the same working for pjsip. I understood that for
> pjsip the hit needs to be placed in the same context as the endpoint:
> 
> [11]
> type=endpoint
> transport=transport-udp
> context=localuser
> disallow=all
> allow=g722
> allow=alaw
> allow=gsm
> auth=11
> aors=11
> callerid=(remove in this example
> qualify_frequency=10
> mailboxes=11
> voicemail_extension=411
> 
> And in the dialplan I changed:
> 
> [localuser]
> exten => 11,hint,PJSIP/11
> 
> But I constantly get:
> 
> Request 'SUBSCRIBE' from '"Benoît Panizzon PJSIP" '
> failed for '2001:4060:dead:d1d0:204:13ff:fe30:228d:2332' (callid:
> ow21f3eg@snom) - No matching endpoint found
> 
> And I in the logger I see that the subscriber request is being rejected
> with error 404.
> 
> Any hints what I'm doing wrong?

Have you checked the Asterisk console when PJSIP is loaded to see if the
endpoint did not load for some reason? Does it show up in "pjsip show
endpoints"?

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] pjsip subscribe (presence) always returns: No matching endpoint found

2017-11-19 Thread Benoit Panizzon
Hello List

I am in the progress of migrating from chan_sip to pjsip.

I fear I have missed something on how hints need to be specified for
pjsip.

For chan_sip I have configured sip.conf

subscribecontext = localuser


and in the dialplan I set:

[localuser]
exten => 11,hint,SIP/11

Now if a phone subscribes to '11' this works.

Now I try to get the same working for pjsip. I understood that for
pjsip the hit needs to be placed in the same context as the endpoint:

[11]
type=endpoint
transport=transport-udp
context=localuser
disallow=all
allow=g722
allow=alaw
allow=gsm
auth=11
aors=11
callerid=(remove in this example
qualify_frequency=10
mailboxes=11
voicemail_extension=411

And in the dialplan I changed:

[localuser]
exten => 11,hint,PJSIP/11

But I constantly get:

Request 'SUBSCRIBE' from '"Benoît Panizzon PJSIP" '
failed for '2001:4060:dead:d1d0:204:13ff:fe30:228d:2332' (callid:
ow21f3eg@snom) - No matching endpoint found

And I in the logger I see that the subscriber request is being rejected
with error 404.

Any hints what I'm doing wrong?

-Benoît-

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] PJSIP_AOR Slow

2017-11-19 Thread Daniel Journo
Hi,

In my dialplans, I'm currently using PJSIP_AOR to check the status of a contact 
before dialling so that I can route the call differently if the endpoint is 
offline.
But PJSIP_AOR seems to take about 0.9 seconds to return. If I'm checking 10 
endpoints, that can cause a significant delay.

Is there a better way to check the status of an endpoint pre-dialling within 
the dialplan?

Here is a sample of what I'm doing.

exten => 
example_839,9,ExecIf($["${PJSIP_AOR(example_220,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_220))
exten => 
example_839,10,ExecIf($["${PJSIP_AOR(example_220,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,11,NoOp(${PJSIP_AOR(example_223,contact)})
exten => 
example_839,12,ExecIf($["${PJSIP_AOR(example_223,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_223))
exten => 
example_839,13,ExecIf($["${PJSIP_AOR(example_223,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,14,NoOp(${PJSIP_AOR(example_224,contact)})
exten => 
example_839,15,ExecIf($["${PJSIP_AOR(example_224,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_224))
exten => 
example_839,16,ExecIf($["${PJSIP_AOR(example_224,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,17,NoOp(${PJSIP_AOR(example_226,contact)})
exten => 
example_839,18,ExecIf($["${PJSIP_AOR(example_226,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_226))
exten => 
example_839,19,ExecIf($["${PJSIP_AOR(example_226,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,20,NoOp(${PJSIP_AOR(example_227,contact)})
exten => 
example_839,21,ExecIf($["${PJSIP_AOR(example_227,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_227))
exten => 
example_839,22,ExecIf($["${PJSIP_AOR(example_227,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,23,NoOp(${PJSIP_AOR(example_240,contact)})
exten => 
example_839,24,ExecIf($["${PJSIP_AOR(example_240,contact)}"=""]?Set(UNAVAILABLEPEER=${UNAVAILABLEPEER}
 example_240))
exten => 
example_839,25,ExecIf($["${PJSIP_AOR(example_240,contact)}"!=""]?Set(WORKINGPEERFOUND=1))
exten => example_839,26,GotoIf($[${WORKINGPEERFOUND}=0]?227)

Many thanks
Dan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users