Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-04-04 Thread Joshua C. Colp
On Tue, Apr 4, 2023 at 2:17 PM Joshua C. Colp  wrote:

> On Tue, Apr 4, 2023 at 2:11 PM Karsten Wemheuer  wrote:
>
>>
>> I filed an issue about this. No one has worked on the issue yet, so I
>> would start with this. Can anyone help me get started?
>>
>>
> You'd need to be specific about what you are seeking help with. The 302
> code is in res_pjsip_diversion.c, NAT handling is in res_pjsip_nat.c. There
> are instructions on the wiki[1] for Gerrit to put things up for code review.
>
>
Sorry, this is the outgoing 302 case which is in chan_pjsip.c

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-04-04 Thread Joshua C. Colp
On Tue, Apr 4, 2023 at 2:11 PM Karsten Wemheuer  wrote:

>
> I filed an issue about this. No one has worked on the issue yet, so I
> would start with this. Can anyone help me get started?
>
>
You'd need to be specific about what you are seeking help with. The 302
code is in res_pjsip_diversion.c, NAT handling is in res_pjsip_nat.c. There
are instructions on the wiki[1] for Gerrit to put things up for code review.

[1] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-04-04 Thread Karsten Wemheuer
Hi *,

Am Donnerstag, dem 02.03.2023 um 13:05 -0400 schrieb Joshua C. Colp:
> On Thu, Mar 2, 2023 at 1:00 PM Karsten Wemheuer  wrote:
> > Hi Joshua,
> > 
> > Am Donnerstag, dem 02.03.2023 um 12:44 -0400 schrieb Joshua C.
> > Colp:
> > > On Thu, Mar 2, 2023 at 12:37 PM Karsten Wemheuer 
> > > wrote:
> > > > Hi Joshua,
> > > > 
> > > > thank You, for answering.
> > > > 
> > > > Am Donnerstag, dem 02.03.2023 um 09:17 -0400 schrieb Joshua C.
> > > > Colp:
> > > > > On Thu, Mar 2, 2023 at 9:04 AM Karsten Wemheuer  > > > > > wrote:
> > > > > > Hi *,
> > > > > > 
> > > > > > Maybe I found a small bug or I am doing something wrong.
> > > > > > 
> > > > > > When I do a "Transfer" on a call that arrives via PJSIP,
> > > > > > Asterisk sends
> > > > > > a "302 Moved Temporarily" to perform the transfer.
> > > > > 
> > > > > What version of Asterisk? What is the precise transport
> > > > > configuration?
> > > > 
> > > > As written below it was Version 18. The exact version is
> > > > 18.16.0.
> > > > 
> > > 
> > > In the future please always provide the precise Asterisk version.
> > > It's important, as code changes.
> > > 
> > > What is the precise transport configuration in PJSIP? 
> > > 
> > 
> > Transport section is below:
> > 
> > [transport-tcp]
> > type = transport
> > protocol = tcp
> > bind = 0.0.0.0:25060
> > external_media_address = 91.2.166.143
> > external_signaling_address = 91.2.166.143
> > local_net = 10.0.1.0/24
> > local_net = 192.168.10.0/24
> > local_net = 169.254.0.0/24
> > tos = 96
> > allow_reload = no
> > 
> 
> Then the Contact replacement for NAT purposes may not be specific
> enough. File an issue[1] however ALSO include a full SIP trace. 
> 
> [1] https://issues.asterisk.org/jira

I filed an issue about this. No one has worked on the issue yet, so I
would start with this. Can anyone help me get started?

[1] https://issues.asterisk.org/jira/browse/ASTERISK-30451



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

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Joshua C. Colp
On Thu, Mar 2, 2023 at 1:00 PM Karsten Wemheuer  wrote:

> Hi Joshua,
>
> Am Donnerstag, dem 02.03.2023 um 12:44 -0400 schrieb Joshua C. Colp:
>
> On Thu, Mar 2, 2023 at 12:37 PM Karsten Wemheuer  wrote:
>
> Hi Joshua,
>
> thank You, for answering.
>
> Am Donnerstag, dem 02.03.2023 um 09:17 -0400 schrieb Joshua C. Colp:
>
> On Thu, Mar 2, 2023 at 9:04 AM Karsten Wemheuer  wrote:
>
> Hi *,
>
> Maybe I found a small bug or I am doing something wrong.
>
> When I do a "Transfer" on a call that arrives via PJSIP, Asterisk sends
> a "302 Moved Temporarily" to perform the transfer.
>
>
> What version of Asterisk? What is the precise transport configuration?
>
> As written below it was Version 18. The exact version is 18.16.0.
>
>
> In the future please always provide the precise Asterisk version. It's
> important, as code changes.
>
> What is the precise transport configuration in PJSIP?
>
> Transport section is below:
>
> [transport-tcp]
> type = transport
> protocol = tcp
> bind = 0.0.0.0:25060
> external_media_address = 91.2.166.143
> external_signaling_address = 91.2.166.143
> local_net = 10.0.1.0/24
> local_net = 192.168.10.0/24
> local_net = 169.254.0.0/24
> tos = 96
> allow_reload = no
>

Then the Contact replacement for NAT purposes may not be specific enough.
File an issue[1] however ALSO include a full SIP trace.

[1] https://issues.asterisk.org/jira

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Karsten Wemheuer
Hi Joshua,
Am Donnerstag, dem 02.03.2023 um 12:44 -0400 schrieb Joshua C. Colp:
> On Thu, Mar 2, 2023 at 12:37 PM Karsten Wemheuer 
> wrote:
> > Hi Joshua,
> > 
> > thank You, for answering.
> > 
> > Am Donnerstag, dem 02.03.2023 um 09:17 -0400 schrieb Joshua C.
> > Colp:
> > > On Thu, Mar 2, 2023 at 9:04 AM Karsten Wemheuer 
> > > wrote:
> > > > Hi *,
> > > > 
> > > > 
> > > > 
> > > > Maybe I found a small bug or I am doing something wrong.
> > > > 
> > > > 
> > > > 
> > > > When I do a "Transfer" on a call that arrives via PJSIP,
> > > > Asterisk sends
> > > > 
> > > > a "302 Moved Temporarily" to perform the transfer.
> > > 
> > > What version of Asterisk? What is the precise transport
> > > configuration?
> > As written below it was Version 18. The exact version is 18.16.0.
> 
> In the future please always provide the precise Asterisk version.
> It's important, as code changes.
> 
> What is the precise transport configuration in PJSIP? 
> 
Transport section is below:
[transport-tcp]type = transportprotocol = tcpbind =
0.0.0.0:25060external_media_address =
91.2.166.143external_signaling_address = 91.2.166.143local_net =
10.0.1.0/24local_net = 192.168.10.0/24local_net = 169.254.0.0/24tos =
96allow_reload = no
Thanks,
Karsten
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Joshua C. Colp
On Thu, Mar 2, 2023 at 12:37 PM Karsten Wemheuer  wrote:

> Hi Joshua,
>
> thank You, for answering.
>
> Am Donnerstag, dem 02.03.2023 um 09:17 -0400 schrieb Joshua C. Colp:
>
> On Thu, Mar 2, 2023 at 9:04 AM Karsten Wemheuer  wrote:
>
> Hi *,
>
> Maybe I found a small bug or I am doing something wrong.
>
> When I do a "Transfer" on a call that arrives via PJSIP, Asterisk sends
> a "302 Moved Temporarily" to perform the transfer.
>
>
> What version of Asterisk? What is the precise transport configuration?
>
> As written below it was Version 18. The exact version is 18.16.0.
>

In the future please always provide the precise Asterisk version. It's
important, as code changes.

What is the precise transport configuration in PJSIP?

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Karsten Wemheuer
Hi Tom,
thanks for Your answer.
Am Donnerstag, dem 02.03.2023 um 08:18 -0500 schrieb Tom Ray:
> On Mar 2, 2023 at 8:05 AM -0500, Karsten Wemheuer ,
> wrote:
> 
> > Hi *,
> > 
> > 
> > 
> > Maybe I found a small bug or I am doing something wrong.
> > 
> > 
> > 
> > When I do a "Transfer" on a call that arrives via PJSIP, Asterisk
> > sends
> > 
> > a "302 Moved Temporarily" to perform the transfer.
> > 
> > 
> 
> For the record, this isn't a transfer it is a redirect. They are
> completely different things. The first thing we would need to know is
> how you are doing this. Are you immediately using the redirect
> features in Asterisk to send back a 302 or is more happening that
> results in a 302 being done?

Sorry, I mean: I use the dialplan application "transfer" to do a 302
Redirect.
With chan_sip it wasTransfer +49xxxThis does not work with pjsip,
so I useTransfer sip:+49xxx@ip-addressorTransfer sip:
+49...@domain.tld
> > Unlike chan_sip, the contact header is set different and maybe
> > 
> > incorrectly with PJSIP:
> > 
> > 
> > 
> > chan_sip:
> > 
> > Contact: Transfer 
> > 
> > 
> > 
> > pjsip:
> > 
> > Contact: 
> > 
> > 
> 
> We will probably need to see actual SIP debugs and SIP messages so we
> can see how this is being sent to the carrier.

Doing this in dialplan  Transfer 
I got this with ngrep:T 192.168.10.70:59371 -> 217.0.149.48:5060 [AP]
#9SIP/2.0 302 Moved Temporarily.Via: SIP/2.0/TCP
217.0.149.48:5060;rport=5060;received=217.0.149.48;branch=z9hG4bKmavodi
-0-264-c43-4-100-4260-5f3047d72-a81--d5-
cf87-5f3cccbfe97f2-459902267-5827.Record-Route: .Call-ID: bw171319464020323-1506406...@62.156.74.66.from: ;tag=1594730888-163599464-
.To: ;tag=ff7ed316-
6fcf-40e6-ae35-c4077a100999;cscf.CSeq: 294435189 INVITE.Server:
Asterisk.Contact: .Reason:
Q.850;cause=0.Supported: histinfo.Content-Length:  0.
I am using Asterisk 18.16
Is it possible to put a uri with a domain instead of ip address  in
contact header?  The provider gave me an example where the only obvious
difference is the portion after the @ sign in the Contact header.
Thanks,Karsten
> 
> 
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Karsten Wemheuer
Hi Joshua,

thank You, for answering.

Am Donnerstag, dem 02.03.2023 um 09:17 -0400 schrieb Joshua C. Colp:
> On Thu, Mar 2, 2023 at 9:04 AM Karsten Wemheuer  wrote:
> > Hi *,
> > 
> > 
> > 
> > Maybe I found a small bug or I am doing something wrong.
> > 
> > 
> > 
> > When I do a "Transfer" on a call that arrives via PJSIP, Asterisk
> > sends
> > 
> > a "302 Moved Temporarily" to perform the transfer.
> 
> What version of Asterisk? What is the precise transport
> configuration?
As written below it was Version 18. The exact version is 18.16.0.

> > 
> > Unlike chan_sip, the contact header is set different and maybe
> > 
> > incorrectly with PJSIP:
> > 
> > 
> > 
> > chan_sip:
> > 
> >Contact: Transfer 
> > 
> > 
> > 
> > pjsip:
> > 
> >Contact: 
> > 
> > 
> > 
> > The difference are domain (chan_sip) vs. local IP address (pjsip)
> > and
> > 
> > the additional (wrong?) port number. The IP address is the one of
> > my
> > 
> > router, but the port number should be 25060, because asterisk is
> > 
> > configured to use this port.
> > 
> > 
> > 
> > The transfer works with asterisk 11 and chan_sip. It does not work
> > with
> > 
> > pjsip and asterisk 18. My provider does not accept the transfer
> > done
> > 
> > with pjsip. Either the provider expects the domain in the contact
> > 
> > header or the error is in the wrong port number.
> > 
> > 
> > 
> > Is this a bugf or how to use transfer application in combination
> > with
> > 
> > pjsip?
> 
> For questions like this in the future please use either the asterisk-
> users mailing list or the community forum[1].
I had used the forum because the user mailing list was not working.
Unfortunately the replies were not helpful and I am not sure if it is a
bug. How can I make the Contact header contain a URI with domain part
(instead of ip address)?

Thanks,

Karsten


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

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Tom Ray
On Mar 2, 2023 at 8:05 AM -0500, Karsten Wemheuer , wrote:
> Hi *,
>
> Maybe I found a small bug or I am doing something wrong.
>
> When I do a "Transfer" on a call that arrives via PJSIP, Asterisk sends
> a "302 Moved Temporarily" to perform the transfer.
>
For the record, this isn't a transfer it is a redirect. They are completely 
different things. The first thing we would need to know is how you are doing 
this. Are you immediately using the redirect features in Asterisk to send back 
a 302 or is more happening that results in a 302 being done?
> Unlike chan_sip, the contact header is set different and maybe
> incorrectly with PJSIP:
>
> chan_sip:
> Contact: Transfer 
>
> pjsip:
> Contact: 
>
We will probably need to see actual SIP debugs and SIP messages so we can see 
how this is being sent to the carrier.
> The difference are domain (chan_sip) vs. local IP address (pjsip) and
> the additional (wrong?) port number. The IP address is the one of my
> router, but the port number should be 25060, because asterisk is
> configured to use this port.
>
> The transfer works with asterisk 11 and chan_sip. It does not work with
> pjsip and asterisk 18. My provider does not accept the transfer done
> with pjsip. Either the provider expects the domain in the contact
> header or the error is in the wrong port number.
>
Well you should confirm with the carrier how they expect this. What is exactly 
needed for this to work. Guessing that it might be the contact header or a 
wrong port will just make extra work to figure out when the provider can give 
more direct answers.
> Is this a bugf or how to use transfer application in combination with
> pjsip?
>
> Thanks
>
> Karsten
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Joshua C. Colp
On Thu, Mar 2, 2023 at 9:04 AM Karsten Wemheuer  wrote:

> Hi *,
>
> Maybe I found a small bug or I am doing something wrong.
>
> When I do a "Transfer" on a call that arrives via PJSIP, Asterisk sends
> a "302 Moved Temporarily" to perform the transfer.
>

What version of Asterisk? What is the precise transport configuration?


> Unlike chan_sip, the contact header is set different and maybe
> incorrectly with PJSIP:
>
> chan_sip:
>Contact: Transfer 
>
> pjsip:
>Contact: 
>
> The difference are domain (chan_sip) vs. local IP address (pjsip) and
> the additional (wrong?) port number. The IP address is the one of my
> router, but the port number should be 25060, because asterisk is
> configured to use this port.
>
> The transfer works with asterisk 11 and chan_sip. It does not work with
> pjsip and asterisk 18. My provider does not accept the transfer done
> with pjsip. Either the provider expects the domain in the contact
> header or the error is in the wrong port number.
>
> Is this a bugf or how to use transfer application in combination with
> pjsip?
>

For questions like this in the future please use either the asterisk-users
mailing list or the community forum[1].

[1] https://community.asterisk.org/

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] Call transfer (302 Moved temporarily) not working with pjsip

2023-03-02 Thread Karsten Wemheuer
Hi *,

Maybe I found a small bug or I am doing something wrong.

When I do a "Transfer" on a call that arrives via PJSIP, Asterisk sends
a "302 Moved Temporarily" to perform the transfer.

Unlike chan_sip, the contact header is set different and maybe
incorrectly with PJSIP:

chan_sip:
   Contact: Transfer 

pjsip:
   Contact: 

The difference are domain (chan_sip) vs. local IP address (pjsip) and
the additional (wrong?) port number. The IP address is the one of my
router, but the port number should be 25060, because asterisk is
configured to use this port.

The transfer works with asterisk 11 and chan_sip. It does not work with
pjsip and asterisk 18. My provider does not accept the transfer done
with pjsip. Either the provider expects the domain in the contact
header or the error is in the wrong port number.

Is this a bugf or how to use transfer application in combination with
pjsip?

Thanks

Karsten


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

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