Asterisk 13 Pjsip Manipulate To: Header on Dial

please post an example… will sing your name for the week.
am a newbie on any forum so please excuse any impropriety.

could you try (SIP/445566778898@10.22.2.17!445566778899@10.22.2.17;user=phone)

i am not sure it works because as i said it sets only to header number section.

@ycaner done that got the t-shirt. no that doesnt work either… yes the call will work.
AND if you noticed I used 2 different numbers in order to see where asterisk placed each in the header.
the first part 445566778898 is used as the number in request-uri whereas the second 445566778899 is used in the To: header … ?
right there is where i get confused… and yet this seems a standard sip feature…?

@ycaner would anyone do it for a bounty???

i dont know ,sorry for it.

Hello, I send a e mail to asterisk-dev-request about Topic. I hope it is reached all developers Because i couldn’t get any email but it has " - Done "

When did you send this email?

at 29-09-2016 11:40 Euro GMT +3 , i sent e mail.
Here is my e mail context;

Hello,

After watching Matt Jordan’s presentation at Kamailio World Conf in 2016(that is impressive) , I decided to switch architecture chan_sip to pjsip.
So i started to testing Pjsip that is suitable for our system because There is always a feature that can be forgetten , missing or has a bug.
First of all , i realized that to header manipulation is removed with exclamation mark in Pjsip.
I tried to some configuration with outbound parameters.But i failed. Maybe , i couldnt find way to change it.

In Addition , i realized that it changes to header with the same as Request Uri Number and adding asterisk to Contact header instead of Number!

In conclusion , I already sent a topic to Forum and then couldn’t find solution with jcolp So is it possible to Add a Function about Setting To header Number like CallerId In Pjsip?Which way is acceptable from Asterisk Developers?
How can we solve this problem? I dont want to add a purge about To header in Kamailio because it can be breakable on ACK ,200-OK or other transacations. Asterisk is so good about dialog transactions.

Why i am trying to do that? Because some kind of FXS devices need to waits Request Uri Number and To header Number and Contact Header Name must be same ,if not it declines the calls.

Thanks for Helps.

Yasin CANER

Here is Flow;

        AsteriskIP:5060  --->        KamailioIP:5060
                x        INVITE (SDP)         x

xINVITE sip:102105066109057atKamailioIP:5060 SIP/2.0
xVia: SIP/2.0/UDP AsteriskIP:5060;rport;branch=z9hG4b
xFrom: “8503023423” sip:8503023423atAsteriskIP;tag=a21fc
xTo: sip:102105066109057atKamailioIP ===============>> It can be 05066109057?
xContact: sip:asteriskatAsteriskIP:5060 =================>> Why asterisk?
xCall-ID: d170e273-6bcc-474b-9816-a6b884419ff2
xCSeq: 23680 INVITE
xRoute: sip:KamailioIP;lr
xAllow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE
xUser-Agent: Asterisk PBX 14.0.1
xContent-Type: application/sdp
xContent-Length: 259

        KamailioIP:5060    -->    AsteriskIP:5060
                x                            x

xINVITE sip:102105066109057atAsteriskIP:5060 SIP/2.0
xRecord-Route: sip:KamailioIP;lr;ftag=c963d657
Via: SIP/2.0/UDP KamailioIP;branch=z9hG4bKcdef.f
xVia: SIP/2.0/UDP 192.168.0.223:64556
xContact: sip:8503023423atUac1IP:3321;transport=UDP
xTo: sip:05066109057atKamailioIP;transport=UDP
xFrom: "8503023423"sip:8503023423atKamailioIP;transport=UDP;tag=c963d6
xCall-ID: 2tiU_X3S8_qbX3K0nOFYeQ…
xCSeq: 2 INVITE
xAllow: INVITE, ACK, CANCEL, BYE

Here is architecture;
Kamailio -> registrar server , location server , edge server …
Asterisk -> Application server , RTP server …

|||||||||||||||
| UAC1|
||||||||||||||
^
|
|
||||||||||||||||||||| |||||||||||||||||||||||||||||
| |<---------- | |
| Kamailio | | Asterisk* |
| |----------> | |
|||||||||||||||||||| ||||||||||||||||||||||||||||
^
|
|
|
|||||||||||||||
| UAC2|
||||||||||||||||

Here is my pjsip.conf

[global]
max_forwards=30
user_agent=TEST
keep_alive_interval=60

[simpletrans]
type=transport
protocol=udp
bind=AsteriskIP

[kamailio]
type=endpoint
transport=simpletrans
context=netgsm
disallow=all
allow=ulaw
allow=alaw
;outbound_proxy=sip:kamailioIP
outbound_proxy=sip:kamailioIP;lr

[kamailio]
type=identify
endpoint=kamailio
match=kamailioIP

I don’t believe that message made it to the list. Are you signed up? It may be in the moderator queue in which case it will be released in the future.

well, i signed up 3 month ago with yasin.caner@netgsm.com.tr and i gets mails about Issues from asterisk-dev-request@lists.digium.com .

Hi,
Im also looking for this solution, I need to set the “to” header with the DID, as we use our internal extensions on the dial command.
Any developments on this?

I do not recall anything going in for this. You’d need to check the changelog to be certain.