Hi Rene,
theoretically it should be as you write. We use acmepacket as sip-sip gateway, so to the provider we are connected via sip. Although on the trunk in CME we enable REFER, new dialog via INVITE is made. The from header contains pstn number and not the genesys extension number. Therefore, provider terminates the call with SIP/2.0 604 Does not exist anywhere, because really, this number does't exist on our sip switch.
Has anyone tried something similar, is it working?
here is debug level from sipserver:
16:10:58.796 Received [440,UDP] 807 bytes from 192.168.50.20:5060 <<<<<
REFER sip:192.168.50.10:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.20:5060;branch=z9hG4bKbe50ca87cf3de571a.7c879420806b856bd
Max-Forwards: 70
From: "Aastra53i-201" <sip:201@192.168.50.10:5060>;tag=49b1f3722b
To: "266650763" <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-230
Call-ID: dc5238779f290757
CSeq: 16304 REFER
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE, PRACK, SUBSCRIBE, INFO
Allow-Events: talk, hold, conference, LocalModeStatus
Contact: "Aastra53i-201" <sip:201@192.168.50.20:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-1000-8000-00085D1A4E35>"
Refer-To: 66650765 <sip:66650765@192.168.50.10:5060>
Referred-By: <sip:201@192.168.50.10>
Supported: gruu, path, timer
User-Agent: Aastra 53i/2.5.0.82
Content-Length: 0
16:10:58.796 SIPDLG[231]: register TRN[527]
16:10:58.796 SipDialog: event CONNECTED_REQUEST, t=527, s=7, r=5, m=01cb4e74
16:10:58.796 SIPCONN(201): HandleSipDialogEvent(CONNECTED_REQUEST)
16:10:58.796 SIPCONN(201): new transaction
16:10:58.796 SIPCONN(201): 1pcc event CONNECTED_REQUEST
16:10:58.796 TRNMNGR: internal domain 192.168.50.10
16:10:58.796 Number:[66650765] is not internal, looking for service
16:10:58.796 Selected for Dn 66650765(): Service TrunkToTCOM (geo-loc , priority 0, capacity 0 (0% of -2))
16:10:58.796 SIPCONN(201): REFER - execute sst.
16:10:58.796 SIPCONN(201): SendResponse(202,527)
16:10:58.796 add party '201' state
16:10:58.796 Sending [440,UDP] 530 bytes to 192.168.50.20:5060 >>>>>
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 192.168.50.20:5060;branch=z9hG4bKbe50ca87cf3de571a.7c879420806b856bd;received=192.168.50.20
From: "Aastra53i-201" <sip:201@192.168.50.10:5060>;tag=49b1f3722b
To: "266650763" <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-230
Call-ID: dc5238779f290757
CSeq: 16304 REFER
Contact: <sip:192.168.50.10:5060>
X-Genesys-CallUUID: UAIJCRMSBT7CFATLR3V9UGGTRG000078
Allow: INVITE, ACK, PRACK, CANCEL, BYE, REFER, INFO, UPDATE, MESSAGE, NOTIFY
Content-Length: 0
16:10:58.796 SipDialog: event CONNECTED_SEND_RESOK, t=527, s=7, r=8, m=01cb4e74
16:10:58.796 SIPCONN(201): HandleSipDialogEvent(CONNECTED_SEND_RESOK) - filtered
16:10:58.796 SIPCONN(266650763): re-invite-connected
16:10:58.796 transfer re-INVITE
16:10:58.796 SIPCONN(66650765): set monitor 01cba888, 01d009ac
16:10:58.796 SIPCALL(77): add party '66650765'
16:10:58.796 -- created party_info_tspp 01C462A8
16:10:58.796 -- created aTmParty 01646ED8
16:10:58.796 SetRole: Destination for 66650765.01646ED8-01D41780:1
16:10:58.796 -- AddParty to 01D41780: 66650765.01646ED8-01D41780:1
16:10:58.796 -- new TSCP call leg 3
16:10:58.796 -- call leg created leg_id=3
16:10:58.796 CreateParty new external: 66650765.01646ED8-01D41780:1
16:10:58.796 SIPTR(614): Begin step 0 - SipTransactionDetachMediaService(615)
16:10:58.796 SIPCONN(moh): DetachMediaPeer
16:10:58.796 SIPCONN(266650763): ClrMediaPeer
16:10:58.796 SIPCONN(moh): set monitor 01cada18, 00000000
16:10:58.796 SIPCONN(moh): state e:1,p:3,s:0,c:0,rc:0,m:0
16:10:58.796 SipDialog: ClearCall(phone=0,state=7)
16:10:58.796 SipDialog::Terminate(state=7)
16:10:58.796 SIPDLG[233]: register TRN[528]
16:10:58.796 Sending [440,UDP] 431 bytes to 192.168.50.10:5070 >>>>>
BYE sip:192.168.50.10:5070 SIP/2.0
From: <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-232
To: <sip:annc@192.168.50.10:5070;play=music/on_hold>;tag=8C42A983-2D20-4889-BC87-6C6EA06EFEFC-105
Call-ID: 6E9DD01A-D55B-4C27-80BA-E2FA3DC2AA91-126@192.168.50.10
CSeq: 2 BYE
Content-Length: 0
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-387
Max-Forwards: 69
16:10:58.796 SipDialog: event SEND_BYE, t=528, s=8, r=5, m=01cada8c
16:10:58.796 SIPCONN(moh): HandleSipDialogEvent(SEND_BYE) - filtered
16:10:58.796 SipDialog: set monitor 00000000
16:10:58.796 SIPCONN(moh): DetachMediaPeer
16:10:58.796 SIPCONN(201): ClrMediaPeer
16:10:58.796 SIPTR(615): complete
16:10:58.796 SIPTR(614): Step 0 - SipTransactionDetachMediaService(615) complete
16:10:58.796 SIPTR(614): Begin step 1 - SipTransactionTransferCall(616)
16:10:58.796 SIPCONN(66650765): re-invite-null
16:10:58.796 SipDialog: set monitor 01cba8fc
16:10:58.796 SIPCONN(66650765): main dialog 0 created
16:10:58.796 SIPCONN(66650765): Local contact: '<sip:266650763@192.168.50.10:5060>'
16:10:58.796 add party '66650765' state
16:10:58.796 SIPDLG[234]: register TRN[529]
16:10:58.796 SIPDLG[234]: TRN[529] flags set to 0x6
16:10:58.796 Sending [440,UDP] 676 bytes to 192.168.50.1:5060 >>>>>
INVITE sip:66650765@192.168.50.1:5060 SIP/2.0
From: <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-233
To: sip:201@192.168.50.10:5060
Call-ID: 6E9DD01A-D55B-4C27-80BA-E2FA3DC2AA91-127@192.168.50.10
CSeq: 1 INVITE
Content-Length: 0
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-388
Contact: <sip:266650763@192.168.50.10:5060>
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE
X-ISCC-CofId: location=SwitchSIPCS;cofid=158
Max-Forwards: 69
X-Genesys-CallUUID: UAIJCRMSBT7CFATLR3V9UGGTRG000078
Session-Expires: 180;refresher=uac
Min-SE: 90
Supported: timer
16:10:58.796 SipDialog: event SEND_INVITE, t=529, s=2, r=7, m=01cba8fc
16:10:58.796 SIPCONN(66650765): HandleSipDialogEvent(SEND_INVITE) - filtered
16:10:58.796 SIPCONN(66650765): sdp state SDP_STATE_NULL, event SDP_OFFER_REQUESTED
16:10:58.796 SIPCONN(66650765): new sdp state SDP_OFFER_REQUESTED, event SDP_OFFER_REQUESTED
16:10:58.796 SIPS:LOGBLOCK:END:SIPDATA:]
16:10:58.796 SIPS:LOGBLOCK:BEGIN:SIPDATA:[
16:10:58.796 Received [440,UDP] 451 bytes from 192.168.50.10:2870 <<<<<
SIP/2.0 200 OK
From: <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-232
To: <sip:annc@192.168.50.10:5070;play=music/on_hold>;tag=8C42A983-2D20-4889-BC87-6C6EA06EFEFC-105
Call-ID: 6E9DD01A-D55B-4C27-80BA-E2FA3DC2AA91-126@192.168.50.10
CSeq: 2 BYE
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-387;received=192.168.50.10
Contact: <sip:192.168.50.10:5070>
Content-Length: 0
16:10:58.796 SipDialog: event TERMINATING_BYE_RES, t=528, s=9, r=4, m=00000000
16:10:58.796 SipDialog: event DESTROY, t=0, s=10, r=4, m=00000000
16:10:58.796 SipDialog[233]:<< Abort ALL <<
16:10:58.796 SIPS:LOGBLOCK:END:SIPDATA:]
16:10:58.796 SIPS:LOGBLOCK:BEGIN:SIPDATA:[
16:10:58.796 Received [440,UDP] 314 bytes from 192.168.50.1:5060 <<<<<
SIP/2.0 100 Trying
From: <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-233
To: sip:201@192.168.50.10:5060
Call-ID: 6E9DD01A-D55B-4C27-80BA-E2FA3DC2AA91-127@192.168.50.10
CSeq: 1 INVITE
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-388
16:10:58.796 SipDialog: event CALLING_RESPROV, t=529, s=2, r=5, m=01cba8fc
16:10:58.796 SIPCONN(66650765): HandleSipDialogEvent(CALLING_RESPROV)
16:10:58.796 SIPDLG[231]: register TRN[530]
16:10:58.796 Sending [440,UDP] 537 bytes to 192.168.50.20:5060 >>>>>
NOTIFY sip:201@192.168.50.20:5060;transport=udp SIP/2.0
From: "266650763" <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-230
To: "Aastra53i-201" <sip:201@192.168.50.10:5060>;tag=49b1f3722b
Call-ID: dc5238779f290757
CSeq: 1 NOTIFY
Content-Length: 20
Content-Type: message/sipfrag
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-389
Contact: <sip:192.168.50.10:5060>
Event: refer
Subscription-State: active;expires=3600
Max-Forwards: 70
SIP/2.0 100 Trying
16:10:58.796 SipDialog: event CONNECTED_SEND_REQUEST, t=530, s=7, r=5, m=01cb4e74
16:10:58.796 SIPCONN(201): HandleSipDialogEvent(CONNECTED_SEND_REQUEST) - filtered
16:10:58.796 SIPCONN(66650765): reliable=0
16:10:58.796 SIPCONN(66650765): store remote content
16:10:58.796 SIPCONN(66650765): store remote content - trying ingored
16:10:58.796 SIPS:LOGBLOCK:END:SIPDATA:]
16:10:58.812 SIPS:LOGBLOCK:BEGIN:SIPDATA:[
16:10:58.812 Received [440,UDP] 380 bytes from 192.168.50.1:5060 <<<<<
SIP/2.0 604 Does not exist anywhere
From: <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-233
To: <sip:201@192.168.50.10:5060>;tag=469320622-1240323368484
Call-ID: 6E9DD01A-D55B-4C27-80BA-E2FA3DC2AA91-127@192.168.50.10
CSeq: 1 INVITE
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-388
Content-Length: 0
16:10:58.812 Sending [440,UDP] 384 bytes to 192.168.50.1:5060 >>>>>
ACK sip:66650765@192.168.50.1:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-388
From: <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-233
To: <sip:201@192.168.50.10:5060>;tag=469320622-1240323368484
Call-ID: 6E9DD01A-D55B-4C27-80BA-E2FA3DC2AA91-127@192.168.50.10
CSeq: 1 ACK
Content-Length: 0
16:10:58.812 SipDialog: event CALLING_RESREJECT, t=529, s=9, r=5, m=01cba8fc
16:10:58.812 SIPCONN(66650765): HandleSipDialogEvent(CALLING_RESREJECT)
16:10:58.812 SIPDLG[231]: register TRN[531]
16:10:58.812 Sending [440,UDP] 545 bytes to 192.168.50.20:5060 >>>>>
NOTIFY sip:201@192.168.50.20:5060;transport=udp SIP/2.0
From: "266650763" <sip:266650763@192.168.50.10:5060>;tag=7253BA46-1704-488B-895D-E1A77C1EC678-230
To: "Aastra53i-201" <sip:201@192.168.50.10:5060>;tag=49b1f3722b
Call-ID: dc5238779f290757
CSeq: 2 NOTIFY
Content-Length: 37
Content-Type: message/sipfrag
Via: SIP/2.0/UDP 192.168.50.10:5060;branch=z9hG4bKD3CEA320-A6EB-4F99-8AA7-D3CFB2601CB9-390
Contact: <sip:192.168.50.10:5060>
Event: refer
Subscription-State: terminated
Max-Forwards: 70
SIP/2.0 604 Does not exist anywhere
P.