jambonz / jambonz-feature-server

Core telephony feature server for the jambones platform
MIT License
40 stars 39 forks source link

Feature-server pod is restarting after specific Jambonz App flow #186

Closed coding-marisa closed 1 year ago

coding-marisa commented 1 year ago

Issue: Feature-server pod is restarting after amd webhook. Jambonz on GKE, v 0.7.7-9 @jambonz/node-client 0.3.29 3cx PBX & Twilio Trunks App overview: The app is set to a fixed number on a Twilio trunk. After app starts, caller inputs the extension to be forwarded to. The call is transferred to this extension using the PBX trunk (this is to allow for the outbound number to be 3-digit extensions rather than a DID). If extension answers, proceed with normal call. If voicemail answers, listen for answering machine message. If no speech is detected, use say verb to provide instructions for caller.

Currently, calls that are answered by the destination extension (a person) restart the feature-server pod at the call's termination. Calls that instead reach the destination’s voicemailbox seem to not restart the feature-server pod. Demo App Endpoint

Logs

``` feature-server feature-server Old and Restarted Pods ``` ``` 2022-11-05T04:59:25.123167826Z {"level":20,"time":1667624365122,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"installing srf locals"} 2022-11-05T04:59:26.161637352Z {"level":30,"time":1667624365125,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","sbcs":["sbc-sip.jambonz:5060"],"msg":"SBC inventory"} 2022-11-05T04:59:26.161675547Z {"level":30,"time":1667624365163,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"sending stats to telegraf.monitoring"} 2022-11-05T04:59:26.161685072Z {"level":30,"time":1667624365164,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","fsInventory":[{"address":"127.0.0.1","port":"8021","secret":"JambonzR0ck$"}],"msg":"freeswitch inventory"} 2022-11-05T04:59:26.161692570Z {"level":30,"time":1667624366160,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"listening for HTTP requests on port 3000, serviceUrl is http://10.0.2.39:3000"} 2022-11-05T04:59:26.176497904Z {"level":30,"time":1667624366173,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"disabling OPTIONS pings since we are running as a kubernetes service"} 2022-11-05T04:59:26.201375009Z {"level":20,"time":1667624366195,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","args":[],"msg":"redis event connect"} 2022-11-05T04:59:26.220670881Z {"level":30,"time":1667624366220,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"connected to drachtio listening on udp/127.0.0.1:5060,udp/10.0.2.39:5060, local sip address is 10.0.2.39:5060"} 2022-11-05T04:59:26.227482981Z {"level":30,"time":1667624366223,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"connected to freeswitch at 127.0.0.1"} 2022-11-05T04:59:26.227537497Z {"level":20,"time":1667624366227,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","args":[],"msg":"redis event ready"} 2022-11-05T05:01:53.473197866Z {"level":30,"time":1667624513472,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","msg":"new incoming call"} 2022-11-05T05:01:53.482515819Z {"level":20,"time":1667624513473,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"got application from X-Application-Sid header: 5105a417-b270-4665-896e-7a087bebb844"} 2022-11-05T05:01:53.505039597Z {"level":20,"time":1667624513504,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","accountInfo":{"account_sid":"9e4ae03e-3702-495e-b34d-8107a8b19123","name":"TestAccount","sip_realm":null,"service_provider_sid":"2708b1b3-2736-40ea-b502-c53d8396247f","registration_hook_sid":null,"queue_event_hook_sid":null,"device_calling_application_sid":null,"is_active":1,"created_at":"2022-11-03T22:47:18.000Z","plan_type":"trial","stripe_customer_id":null,"webhook_secret":"wh_secret_xzBzVCH8Fdx5UjKogxpMHH","disable_cdrs":0,"trial_end_date":null,"deactivated_reason":null,"device_to_call_ratio":5,"subspace_client_id":null,"subspace_client_secret":null,"subspace_sip_teleport_id":null,"subspace_sip_teleport_destinations":null,"siprec_hook_sid":null},"msg":"retrieved account info for 9e4ae03e-3702-495e-b34d-8107a8b19123"} 2022-11-05T05:01:53.521778528Z {"level":30,"time":1667624513521,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","app":{"application_sid":"5105a417-b270-4665-896e-7a087bebb844","name":"MenuDemo","service_provider_sid":null,"account_sid":"9e4ae03e-3702-495e-b34d-8107a8b19123","call_hook_sid":"27399d5e-c798-45cb-b311-4e9665ef5472","call_status_hook_sid":"f6a06a72-f9aa-457a-9602-6e4fd0a4b886","messaging_hook_sid":"7632e5b4-0414-4b83-90c2-cd5a2ee74c67","speech_synthesis_vendor":"google","speech_synthesis_language":"en-US","speech_synthesis_voice":"en-US-Standard-C","speech_recognizer_vendor":"google","speech_recognizer_language":"en-US","created_at":"2022-11-03T23:29:10.000Z"},"msg":"retrieved application for incoming call to 16514241607"} 2022-11-05T05:01:53.537024515Z {"level":20,"time":1667624513525,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","params":{"sip":{"headers":{"via":"SIP/2.0/UDP 34.70.230.94;rport=5060;branch=z9hG4bK1jr1myDXUUmQK;received=10.128.0.37","max-forwards":"70","from":";tag=63Zcpa1r4Uaer","to":"","call-id":"ce401e37-d769-123b-aab1-42010a800025","cseq":"59258464 INVITE","contact":"","user-agent":"Twilio Gateway","allow":"INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, OPTIONS","content-type":"application/sdp","content-length":"285","X-Account-Sid":"9e4ae03e-3702-495e-b34d-8107a8b19123","X-CID":"0bcde1e199e2a63078332b0f24ff16f6@0.0.0.0","X-Forwarded-For":"54.244.51.1","X-Originating-Carrier":"TwilioCarrier","X-Voip-Carrier-Sid":"45dabf9f-bba7-414e-8534-5bc1a5c34e77","X-Application-Sid":"5105a417-b270-4665-896e-7a087bebb844","Diversion":";reason=unconditional","X-Twilio-AccountSid":"AC1efe704fb67cf8c73edd53d54f5c623e","X-Twilio-CallSid":"CA6be11a8c0488c0572c254583c2e30840","p-asserted-identity":""},"raw":"INVITE sip:+16514241607@feature-server SIP/2.0\r\nVia: SIP/2.0/UDP 34.70.230.94;rport=5060;branch=z9hG4bK1jr1myDXUUmQK;received=10.128.0.37\r\nMax-Forwards: 70\r\nFrom: ;tag=63Zcpa1r4Uaer\r\nTo: \r\nCall-ID: ce401e37-d769-123b-aab1-42010a800025\r\nCSeq: 59258464 INVITE\r\nContact: \r\nUser-Agent: Twilio Gateway\r\nAllow: INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, OPTIONS\r\nContent-Type: application/sdp\r\nContent-Length: 285\r\nX-Account-Sid: 9e4ae03e-3702-495e-b34d-8107a8b19123\r\nX-CID: 0bcde1e199e2a63078332b0f24ff16f6@0.0.0.0\r\nX-Forwarded-For: 54.244.51.1\r\nX-Originating-Carrier: TwilioCarrier\r\nX-Voip-Carrier-Sid: 45dabf9f-bba7-414e-8534-5bc1a5c34e77\r\nX-Application-Sid: 5105a417-b270-4665-896e-7a087bebb844\r\nDiversion: ;reason=unconditional\r\nX-Twilio-AccountSid: AC1efe704fb67cf8c73edd53d54f5c623e\r\nX-Twilio-CallSid: CA6be11a8c0488c0572c254583c2e30840\r\nP-Asserted-Identity: \r\n\r\nv=0\r\no=root 590812458 590812458 IN IP4 10.128.0.38\r\ns=Twilio Media Gateway\r\nc=IN IP4 10.128.0.38\r\nt=0 0\r\nm=audio 46800 RTP/AVP 0 8 101\r\na=maxptime:20\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=sendrecv\r\na=rtcp:46801\r\na=ptime:20\r\n","body":"v=0\r\no=root 590812458 590812458 IN IP4 10.128.0.38\r\ns=Twilio Media Gateway\r\nc=IN IP4 10.128.0.38\r\nt=0 0\r\nm=audio 46800 RTP/AVP 0 8 101\r\na=maxptime:20\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=sendrecv\r\na=rtcp:46801\r\na=ptime:20\r\n","method":"INVITE","version":"2.0","uri":"sip:+16514241607@feature-server","payload":[{"type":"application/sdp","content":"v=0\r\no=root 590812458 590812458 IN IP4 10.128.0.38\r\ns=Twilio Media Gateway\r\nc=IN IP4 10.128.0.38\r\nt=0 0\r\nm=audio 46800 RTP/AVP 0 8 101\r\na=maxptime:20\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=sendrecv\r\na=rtcp:46801\r\na=ptime:20\r\n"}]},"direction":"inbound","traceId":"3f4626cb343615c5dfa611a928d75986","callerName":"","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","applicationSid":"5105a417-b270-4665-896e-7a087bebb844","from":"+15419330450","to":"+16514241607","callId":"ce401e37-d769-123b-aab1-42010a800025","sipStatus":100,"sipReason":"Trying","callStatus":"trying","originatingSipIp":"54.244.51.1","originatingSipTrunkName":"TwilioCarrier","localSipAddress":"10.0.2.39:5060","defaults":{"synthesizer":{"vendor":"google","language":"en-US","voice":"en-US-Standard-C"},"recognizer":{"vendor":"google","language":"en-US"}}},"msg":"sending initial webhook"} 2022-11-05T05:01:53.537190042Z {"level":20,"time":1667624513530,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"http://4051-24-20-1-20.ngrok.io/menu-demo/menu-greeting","absUrl":"http://4051-24-20-1-20.ngrok.io/menu-demo/menu-greeting","hdrs":{"Jambonz-Signature":"t=1667624513,v1=7609b5f523ddb34a74472b44b5a9487f0110b306b50f02513a1988526b101b31","b3":"3f4626cb343615c5dfa611a928d75986-b31598a7e98ef1b7-1","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:01:53.844672768Z {"level":30,"time":1667624513844,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","response":[{"verb":"pause","length":2},{"verb":"gather","actionHook":"/menu-demo/process-selection-greeting","input":["digits","speech"],"minDigits":1,"maxDigits":3,"interDigitTimeout":1.5,"timeout":20,"recognizer":{"vendor":"google","language":"en-US"},"say":{"text":"\nThis is a demo app. Please input or say the extension of the employee you are trying to reach.\n\n","loop":3}}],"msg":"HttpRequestor:request POST http://4051-24-20-1-20.ngrok.io/menu-demo/menu-greeting succeeded in 312ms"} 2022-11-05T05:01:53.882907595Z {"level":20,"time":1667624513845,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","document":[{"pause":{"length":2}},{"gather":{"actionHook":"/menu-demo/process-selection-greeting","input":["digits","speech"],"minDigits":1,"maxDigits":3,"interDigitTimeout":1.5,"timeout":20,"recognizer":{"vendor":"google","language":"en-US"},"say":{"text":"\nThis is a demo app. Please input or say the extension of the employee you are trying to reach.\n\n","loop":3}}}],"msg":"normalizeJambones: returning document with 2 tasks"} 2022-11-05T05:01:53.882985094Z {"level":30,"time":1667624513859,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"SessionTracker:add callSid 831c0f64-d9cd-41a5-8232-35efee4963ff, we have 1 session being tracked"} 2022-11-05T05:01:53.882997271Z {"level":20,"time":1667624513871,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"http://4051-24-20-1-20.ngrok.io/call-status","absUrl":"http://4051-24-20-1-20.ngrok.io/call-status","hdrs":{"Jambonz-Signature":"t=1667624513,v1=9a28371ffd96f63fcf77ec4c7eee1b25e2d562d2003c1e95c9048a405d90ed07","b3":"3f4626cb343615c5dfa611a928d75986-b31598a7e98ef1b7-1","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:01:53.883014497Z {"level":30,"time":1667624513877,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","tasks":"[pause,gather{inputs=[speech,digits],vendor=google,language=en-US,with nested say task}]","msg":"CallSession:exec starting 2 tasks"} 2022-11-05T05:01:53.883060486Z {"level":30,"time":1667624513877,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:exec starting task #0:1: pause"} 2022-11-05T05:01:55.882265569Z {"level":30,"time":1667624515881,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:exec completed task #0:1: pause"} 2022-11-05T05:01:55.887642348Z {"level":30,"time":1667624515882,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:exec starting task #0:2: gather"} 2022-11-05T05:01:55.929132279Z {"level":20,"time":1667624515928,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","evt":{"uuid":"72556257-fb65-464e-981d-43a6a8242912","countOfConnections":1,"countOfChannels":26},"msg":"mediaserver 127.0.0.1 added endpoint"} 2022-11-05T05:01:55.935710800Z {"level":20,"time":1667624515931,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"allocated endpoint 72556257-fb65-464e-981d-43a6a8242912"} 2022-11-05T05:01:55.935744275Z {"level":20,"time":1667624515931,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"propogating answer"} 2022-11-05T05:01:55.945748212Z {"level":20,"time":1667624515945,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"answered call"} 2022-11-05T05:01:55.967339131Z {"level":20,"time":1667624515952,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"http://4051-24-20-1-20.ngrok.io/call-status","absUrl":"http://4051-24-20-1-20.ngrok.io/call-status","hdrs":{"Jambonz-Signature":"t=1667624515,v1=d7acf73c3e4057cceeef228099585549e11f9dc7ad9fe3507c1f2225d7a5592a","b3":"3f4626cb343615c5dfa611a928d75986-b31598a7e98ef1b7-1","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:01:55.967400237Z {"level":20,"time":1667624515954,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:propagateAnswer - answered callSid 831c0f64-d9cd-41a5-8232-35efee4963ff"} 2022-11-05T05:01:55.967427722Z {"level":20,"time":1667624515957,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Gather:exec"} 2022-11-05T05:01:55.967435760Z {"level":30,"time":1667624515963,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","vendor":"google","language":"en-US","voice":"en-US-Standard-C","msg":"TaskSay:exec"} 2022-11-05T05:01:55.989639767Z {"level":20,"time":1667624515989,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"file /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff1bd92ee86ceb335e7f9171455cd58a1748ec2b58.mp3, served from cache true"} 2022-11-05T05:01:55.991927688Z {"level":20,"time":1667624515989,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"adding tmp file to track /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff1bd92ee86ceb335e7f9171455cd58a1748ec2b58.mp3"} 2022-11-05T05:01:55.991962913Z {"level":20,"time":1667624515990,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","filepath":["/tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff1bd92ee86ceb335e7f9171455cd58a1748ec2b58.mp3"],"msg":"synthesized files for tts"} 2022-11-05T05:01:55.991971887Z {"level":20,"time":1667624515990,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Say:exec sending command to play file /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff1bd92ee86ceb335e7f9171455cd58a1748ec2b58.mp3"} 2022-11-05T05:01:56.029644512Z {"level":20,"time":1667624516029,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","vendor":"google","locale":"en-US","bugname":"google_transcribe","msg":"Gather:_startTranscribing"} 2022-11-05T05:02:00.427202113Z {"level":20,"time":1667624520426,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","dtmf":"1","duration":"1440","source":"RTP","msg":"TaskGather:_onDtmf"} 2022-11-05T05:02:00.429187459Z {"level":20,"time":1667624520428,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"say is being killed"} 2022-11-05T05:02:00.429252554Z {"level":20,"time":1667624520428,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"TaskSay:kill - killing audio"} 2022-11-05T05:02:00.429266545Z {"level":20,"time":1667624520428,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"starting interdigit timer of 1500"} 2022-11-05T05:02:00.452844567Z {"level":20,"time":1667624520451,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Say:exec completed play file /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff1bd92ee86ceb335e7f9171455cd58a1748ec2b58.mp3"} 2022-11-05T05:02:01.198470889Z {"level":20,"time":1667624521198,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","dtmf":"0","duration":"1440","source":"RTP","msg":"TaskGather:_onDtmf"} 2022-11-05T05:02:01.199087389Z {"level":20,"time":1667624521198,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"starting interdigit timer of 1500"} 2022-11-05T05:02:01.955006004Z {"level":20,"time":1667624521954,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","dtmf":"3","duration":"1280","source":"RTP","msg":"TaskGather:_onDtmf"} 2022-11-05T05:02:01.960488944Z {"level":20,"time":1667624521955,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"TaskGather:resolve with reason dtmf-num-digits"} 2022-11-05T05:02:01.960558399Z {"level":20,"time":1667624521958,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"/menu-demo/process-selection-greeting","absUrl":"http://4051-24-20-1-20.ngrok.io/menu-demo/process-selection-greeting","hdrs":{"Jambonz-Signature":"t=1667624521,v1=02cf0de6e36b9fa3e1d388d791b80a738334522483a9d6bedc70097df11ee7b7","b3":"3f4626cb343615c5dfa611a928d75986-f2b18664137c73b8-1","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:02:02.137242864Z {"level":30,"time":1667624522136,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","response":[{"verb":"say","text":"Transferring to extension 103"},{"verb":"dial","callerId":"+15419330450","answerOnBridge":true,"dialMusic":"http://34.135.12.97:1001/sounds/onhold.wav","target":[{"type":"phone","number":"103","trunk":"PBXcarrier"}],"amd":{"actionHook":"/menu-demo/answeringMachineDetection"}}],"msg":"HttpRequestor:request POST /menu-demo/process-selection-greeting succeeded in 178ms"} 2022-11-05T05:02:02.152993678Z {"level":20,"time":1667624522137,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","document":[{"say":{"text":"Transferring to extension 103"}},{"dial":{"callerId":"+15419330450","answerOnBridge":true,"dialMusic":"http://34.135.12.97:1001/sounds/onhold.wav","target":[{"type":"phone","number":"103","trunk":"PBXcarrier"}],"amd":{"actionHook":"/menu-demo/answeringMachineDetection"}}}],"msg":"normalizeJambones: returning document with 2 tasks"} 2022-11-05T05:02:02.153067032Z {"level":30,"time":1667624522150,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","tasks":[{"text":"Transferring to extension 103"},{"callerId":"+15419330450","answerOnBridge":true,"dialMusic":"http://34.135.12.97:1001/sounds/onhold.wav","target":[{"type":"phone","number":"103","trunk":"PBXcarrier"}],"amd":{"actionHook":"/menu-demo/answeringMachineDetection"}}],"msg":"gather replacing application with 2 tasks"} 2022-11-05T05:02:02.153079841Z {"level":30,"time":1667624522150,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","tasks":"[say{text=Transferring to...},dial{type=phone,number=103}]","msg":"CallSession:replaceApplication reset with 2 new tasks, stack depth is 1"} 2022-11-05T05:02:02.153095492Z {"level":20,"time":1667624522151,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"gather is being killed"} 2022-11-05T05:02:02.153102653Z {"level":20,"time":1667624522151,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"TaskGather:resolve with reason killed"} 2022-11-05T05:02:02.153109110Z {"level":30,"time":1667624522151,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:exec completed task #0:2: gather"} 2022-11-05T05:02:02.153115475Z {"level":30,"time":1667624522151,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:exec starting task #1:1: say"} 2022-11-05T05:02:02.153142852Z {"level":30,"time":1667624522151,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","vendor":"google","language":"en-US","voice":"en-US-Standard-C","msg":"TaskSay:exec"} 2022-11-05T05:02:02.154693551Z {"level":20,"time":1667624522154,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"file /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff5c15ab2d4be202a75e05fb61840db1d9a421eb8c.mp3, served from cache true"} 2022-11-05T05:02:02.155566316Z {"level":20,"time":1667624522154,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"adding tmp file to track /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff5c15ab2d4be202a75e05fb61840db1d9a421eb8c.mp3"} 2022-11-05T05:02:02.155628537Z {"level":20,"time":1667624522154,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","filepath":["/tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff5c15ab2d4be202a75e05fb61840db1d9a421eb8c.mp3"],"msg":"synthesized files for tts"} 2022-11-05T05:02:02.155640797Z {"level":20,"time":1667624522154,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Say:exec sending command to play file /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff5c15ab2d4be202a75e05fb61840db1d9a421eb8c.mp3"} 2022-11-05T05:02:04.875834105Z {"level":20,"time":1667624524875,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Say:exec completed play file /tmp/tts-831c0f64-d9cd-41a5-8232-35efee4963ff5c15ab2d4be202a75e05fb61840db1d9a421eb8c.mp3"} 2022-11-05T05:02:04.881452981Z {"level":30,"time":1667624524876,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:exec completed task #1:1: say"} 2022-11-05T05:02:04.881547962Z {"level":30,"time":1667624524876,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"CallSession:exec starting task #1:2: dial"} 2022-11-05T05:02:04.884008352Z {"level":30,"time":1667624524883,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Dial:_attemptCalls: selected 6f4eaf9d-3637-4b07-b23b-e59c2d324688 for requested carrier: PBXcarrier)"} 2022-11-05T05:02:04.936543386Z {"level":20,"time":1667624524921,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","evt":{"uuid":"3828392e-d937-4b57-95d8-ccc34807b51f","countOfConnections":2,"countOfChannels":27},"msg":"mediaserver 127.0.0.1 added endpoint"} 2022-11-05T05:02:04.949760935Z {"level":20,"time":1667624524921,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"SingleDialer:exec - created endpoint 3828392e-d937-4b57-95d8-ccc34807b51f"} 2022-11-05T05:02:04.957753644Z {"level":20,"time":1667624524953,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"http://4051-24-20-1-20.ngrok.io/call-status","absUrl":"http://4051-24-20-1-20.ngrok.io/call-status","hdrs":{"Jambonz-Signature":"t=1667624524,v1=f52b62c41fdd9842645af1707f4b46e7d4f5f8631a61fc836c83b240196d0eaa","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:02:05.101637197Z {"level":20,"time":1667624525101,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"http://4051-24-20-1-20.ngrok.io/call-status","absUrl":"http://4051-24-20-1-20.ngrok.io/call-status","hdrs":{"Jambonz-Signature":"t=1667624525,v1=2ad1f0f4a93abde909cb777a2e8baccdceffc0dbf661e4d5112afb78311c9969","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:02:10.036900929Z {"level":20,"time":1667624530036,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"http://4051-24-20-1-20.ngrok.io/call-status","absUrl":"http://4051-24-20-1-20.ngrok.io/call-status","hdrs":{"Jambonz-Signature":"t=1667624530,v1=f0ec7c550eb3382a3ec15ac4833ac6bd23aa533236662dea19dd9afaed9a66e4","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:02:10.045448680Z {"level":20,"time":1667624530038,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Dial:_attemptCall -- call was answered"} 2022-11-05T05:02:10.045505867Z {"level":20,"time":1667624530038,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callSid":"0a09e326-989f-415c-a96b-1d45346934c5","parentCallSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","callId":"d52602c2-d769-123b-cfaf-ce92a6096053","msg":"SingleDialer:exec call connected: 0a09e326-989f-415c-a96b-1d45346934c5"} 2022-11-05T05:02:10.045536372Z {"level":20,"time":1667624530038,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Dial:_attemptCalls - we have a winner: 0a09e326-989f-415c-a96b-1d45346934c5"} 2022-11-05T05:02:10.045544241Z {"level":20,"time":1667624530039,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"Dial:_connectSingleDial bridging endpoints"} 2022-11-05T05:02:10.045551714Z {"level":30,"time":1667624530041,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","msg":"SessionTracker:add callSid 0a09e326-989f-415c-a96b-1d45346934c5, we have 2 session being tracked"} 2022-11-05T05:02:10.045558606Z {"level":30,"time":1667624530043,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","msg":"starting amd for vendor google and language en-US"} 2022-11-05T05:02:10.045573086Z {"level":20,"time":1667624530044,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","sttOpts":{"GOOGLE_APPLICATION_CREDENTIALS":"{\"type\":\"service_account\",\"project_id\":\"jambonz-project\",\"private_key_id\":\"6126e5af0adff5104883e5abc0a789d79cde15a6\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\n key goes here \n-----END PRIVATE KEY-----\\n\",\"client_email\":\"jambonz@jambonz-project.iam.gserviceaccount.com\",\"client_id\":\"100692165982335811894\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"token_uri\":\"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\":\"https://www.googleapis.com/robot/v1/metadata/x509/jambonz%40jambonz-project.iam.gserviceaccount.com\"}","GOOGLE_SPEECH_USE_ENHANCED":true,"GOOGLE_SPEECH_HINTS":"call has been forwarded,at the beep,at the tone,leave a message,leave me a message,not available right now,not available to take your call,can't take your call,I will get back to you,I'll get back to you,we will get back to you,we are unable,we are not available"},"msg":"startAmd: setting channel vars"} 2022-11-05T05:02:15.091150710Z {"level":30,"time":1667624535090,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","evt":{"type":"amd_no_speech_detected"},"msg":"Dial:_onAmdEvent"} 2022-11-05T05:02:15.095284407Z {"level":20,"time":1667624535092,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","url":"/menu-demo/answeringMachineDetection","absUrl":"http://4051-24-20-1-20.ngrok.io/menu-demo/answeringMachineDetection","hdrs":{"Jambonz-Signature":"t=1667624535,v1=7f49495c441dc0c343524402a905db1841baf7c03b8daacc3f119939504e7619","b3":"3f4626cb343615c5dfa611a928d75986-e9a67781da414db6-1","Content-Type":"application/json"},"msg":"send webhook"} 2022-11-05T05:02:15.207684890Z {"level":30,"time":1667624535207,"pid":1,"hostname":"feature-server-586dcccdfc-njs7s","callId":"ce401e37-d769-123b-aab1-42010a800025","callSid":"831c0f64-d9cd-41a5-8232-35efee4963ff","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"3f4626cb343615c5dfa611a928d75986","baseUrl":"http://4051-24-20-1-20.ngrok.io","url":"/menu-demo/answeringMachineDetection","msg":"web callback returned unexpected status code 503"} 2022-11-05T05:02:15.217309381Z /opt/app/lib/utils/http-requestor.js:132 2022-11-05T05:02:15.217364121Z const err = new Error(); 2022-11-05T05:02:15.217372901Z ^ 2022-11-05T05:02:15.217379110Z 2022-11-05T05:02:15.217386849Z Error 2022-11-05T05:02:15.217394066Z at HttpRequestor.request (/opt/app/lib/utils/http-requestor.js:132:21) 2022-11-05T05:02:15.217401363Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2022-11-05T05:02:15.217407802Z at async TaskDial.performHook (/opt/app/lib/tasks/task.js:180:20) { 2022-11-05T05:02:15.217414027Z statusCode: 503 2022-11-05T05:02:15.217420638Z } 2022-11-05T05:02:15.217426693Z 2022-11-05T05:02:15.217433392Z Node.js v18.9.0 ```


Logs with more content
[feature-server feature-server Original and Restarted Pod Log.txt](https://github.com/marisa-contract/jambonz-menu-issue/blob/main/feature-server%20feature-server%20Original%20and%20Restarted%20Pod%20Log.txt)
[feature-server drachtio.txt](https://github.com/marisa-contract/jambonz-menu-issue/blob/main/feature-server%20drachtio.txt)
[feature-server freeswitch.txt](https://github.com/marisa-contract/jambonz-menu-issue/blob/main/feature-server%20freeswitch.txt)
coding-marisa commented 1 year ago

Updating error description and adding up to date logs

davehorton commented 1 year ago

OK, you definitely found a good bug in jambonz, so thanks for that! I have checked in a fix and this will appear in tag v0.7.7-12

However, your code is also wrong, and needs to be fixed. This return statement does not do what you intend it to do -- to return a payload to jambonz. For that you need to use the res object.

What you want to do is this:

const WebhookResponse = require('@jambonz/node-client').WebhookResponse;

router.post('/answeringMachineDetection', (req, res) => {
  const { logger } = req.app.locals;
  const payload = req.body;
  const { type, reason } = payload;
  logger.info({payload}, 'POST /menu-demo/answeringMachineDetection');

  if (type === 'amd_no_speech_detected') {
    const app = new WebhookResponse();
    app.say({
      text: 'Record your message and press pound or press star to contact the operator.',
      synthesizer : {
        vendor: 'Google',
        language: 'en-US'
      }
    });
    return res.status(200).json(app);
  }
  // otherwise, just return a 200
  res.sendStatus(200);
});

Note that using the @jambonz/node-client' package makes this much easier. If you are not using this in your webhook app you should be.

I will update and close this ticket once v0.7.7-12 is available. In the meantime, making the fix to your code as outlined above should resolve your problem

davehorton commented 1 year ago

images for 0.7.7-12 are now available.

It would be helpful if you could test and verify the fix in the following sequence:

  1. Make the changes to your code that I suggest above, and verify this fixes it in your current environment
  2. Upgrade your environment to 0.7.7-12 and verify that it still works
  3. Downgrade your code back to your original version, and test again on 0.7.7-12, verifying the pod does not restart
  4. Finally, upgrade your code back to the "correct" version and continue on from there

Let me know if you are willing/able to do this @marisa-contract, if you are I will keep the ticket open for now until you verify the fix(es)

coding-marisa commented 1 year ago
  1. Updated amd webhook to use the code suggested above. Feature server is still restarting. Updated webhook New FS feature-server log New FS Freeswitch log New FS Drachtio log I will be able to test the other points when returning to the office this Monday. Let me know if there are any other adjustments you would like me to test before upgrading to 0.7.7-12.
davehorton commented 1 year ago

your webhook is still returning a 503 for some reason. Can you provide the logging from your webhook application so we can see why that is?

coding-marisa commented 1 year ago

I have included the app logs for three test calls. Test calls 1 and 2 cause no restarts and an AMD hook is present in the logging. Test call 3 has no AMD hook in the log and causes a restart. Test Call 1 - Human Greeting Test Call 2 - Voicemail with Speech Test Call 3 - Human Answers while on Mute

davehorton commented 1 year ago

something is returning a 503 to the http post request in test call 3. Can you look into that and figure out what?

If not, just do upgrade to jambonz and retest

coding-marisa commented 1 year ago

We will upgrade to the newest version now, but for one final test I ran the program with a simplified amd web hook and encountered intermittent restarts. When a call ends on a successful test, when one person hangs up the other half of the call is also terminated. When the test call fails and the pod restarts, when one half of the call hangs up the other person's call will continue until they hang up manually.

Simplified Code

router.post('/answeringMachineDetection', (req, res) => {
  const { logger } = req.app.locals;
  const payload = req.body;
  logger.info({payload}, 'POST /menu-demo/answeringMachineDetection');
  res.sendStatus(200);
});

No restart, call ends for both parties at hang up. "msg":"SingleDialer:exec called party hung up"

// First line that differs between the success and failure tests
2022-11-07T16:55:47.541726437Z {"level":20,"time":1667840147541,"pid":1,"hostname":"feature-server-586dcccdfc-ht6cl","callSid":"74fd193e-73f6-406a-95ea-6d331f6a5338","parentCallSid":"cbed4f20-8dab-4b60-b625-fe3b705fd714","callId":"cdcb4483-d95f-123b-3a8b-12683a7f3961","msg":"SingleDialer:exec called party hung up"}

2022-11-07T16:55:47.566387804Z {"level":20,"time":1667840147544,"pid":1,"hostname":"feature-server-586dcccdfc-ht6cl","callId":"c6f10a62-d95f-123b-aab1-42010a800025","callSid":"cbed4f20-8dab-4b60-b625-fe3b705fd714","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"b04da22af240344e615cc44675117fcc","url":"http://c63b-24-20-1-20.ngrok.io/call-status","absUrl":"http://c63b-24-20-1-20.ngrok.io/call-status","hdrs":{"Jambonz-Signature":"t=1667840147,v1=a177a8111aa93f53e4b70de6c1fd25f2c2ac46a1e07f16f448090a931e475d52","Content-Type":"application/json"},"msg":"send webhook"}
2022-11-07T16:55:47.566422961Z {"level":20,"time":1667840147549,"pid":1,"hostname":"feature-server-586dcccdfc-ht6cl","callId":"c6f10a62-d95f-123b-aab1-42010a800025","callSid":"cbed4f20-8dab-4b60-b625-fe3b705fd714","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"b04da22af240344e615cc44675117fcc","msg":"Dial:_selectSingleDial called party hungup, ending dial operation"}
2022-11-07T16:55:47.566451993Z {"level":30,"time":1667840147549,"pid":1,"hostname":"feature-server-586dcccdfc-ht6cl","msg":"SessionTracker:remove callSid 74fd193e-73f6-406a-95ea-6d331f6a5338, we have 1 being tracked"}

Restart occurs, both parties must hang up "msg":"web callback returned unexpected status code 503"

// First line that differs between the success and failure tests
2022-11-07T16:56:48.018945835Z {"level":30,"time":1667840208018,"pid":1,"hostname":"feature-server-586dcccdfc-ht6cl","callId":"f3554d9f-d95f-123b-aab1-42010a800025","callSid":"6c52265e-0481-4514-a339-98d3dc200bb9","accountSid":"9e4ae03e-3702-495e-b34d-8107a8b19123","callingNumber":"+15419330450","calledNumber":"+16514241607","traceId":"9c4e091d394549d063d1af8d14bc229c","baseUrl":"http://c63b-24-20-1-20.ngrok.io","url":"/menu-demo/answeringMachineDetection","msg":"web callback returned unexpected status code 503"}

2022-11-07T16:56:48.036205002Z /opt/app/lib/utils/http-requestor.js:132
2022-11-07T16:56:48.036296802Z         const err = new Error();
2022-11-07T16:56:48.036307662Z                     ^
2022-11-07T16:56:48.036313834Z 
2022-11-07T16:56:48.036320919Z Error
2022-11-07T16:56:48.036332465Z     at HttpRequestor.request (/opt/app/lib/utils/http-requestor.js:132:21)
2022-11-07T16:56:48.036340943Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2022-11-07T16:56:48.036347709Z     at async TaskDial.performHook (/opt/app/lib/tasks/task.js:180:20) {
2022-11-07T16:56:48.036355030Z   statusCode: 503
2022-11-07T16:56:48.036361312Z }
2022-11-07T16:56:48.036367882Z 
2022-11-07T16:56:48.036376017Z Node.js v18.9.0

After the upgrade, I will test both correct and incorrect amd web hooks code to confirm neither initiates a restart.

davehorton commented 1 year ago

you really need to figure out why your webhook is returning a 503 failure. For now, I will leave that on your side. Just do the upgrade and retest please

davehorton commented 1 year ago

@marisa-contract were you able to retest after the upgrade?

coding-marisa commented 1 year ago

After upgrading to 0.7.7-13 we are still experiencing feature server restarts when using amd web hooks. The error prior to the restart in feature-server/feature-server is now if (!this._conn) return callback(new Error('endpoint no longer active'));.

Portion of Feature Server - Feature Server log.

2022-11-21T19:19:11.018518192Z /opt/app/node_modules/drachtio-fsmrf/lib/endpoint.js:1073
2022-11-21T19:19:11.018587689Z       if (!this._conn) return callback(new Error('endpoint no longer active'));
2022-11-21T19:19:11.018597022Z                                        ^
2022-11-21T19:19:11.018602798Z 
2022-11-21T19:19:11.018624706Z Error: endpoint no longer active
2022-11-21T19:19:11.018630489Z     at __x (/opt/app/node_modules/drachtio-fsmrf/lib/endpoint.js:1073:40)
2022-11-21T19:19:11.018636752Z     at Endpoint.api (/opt/app/node_modules/drachtio-fsmrf/lib/endpoint.js:1082:7)
2022-11-21T19:19:11.018642773Z     at __x (/opt/app/node_modules/drachtio-fsmrf/lib/endpoint.js:818:12)
2022-11-21T19:19:11.018648290Z     at /opt/app/node_modules/drachtio-fsmrf/lib/endpoint.js:834:7
2022-11-21T19:19:11.018653546Z     at new Promise (<anonymous>)
2022-11-21T19:19:11.018659372Z     at Endpoint.stopTranscription (/opt/app/node_modules/drachtio-fsmrf/lib/endpoint.js:833:12)
2022-11-21T19:19:11.018664869Z     at Amd.<anonymous> (/opt/app/lib/utils/amd-utils.js:276:12)
2022-11-21T19:19:11.018670040Z     at Amd.emit (node:events:513:28)
2022-11-21T19:19:11.018675340Z     at Amd.emit (node:domain:489:12)
2022-11-21T19:19:11.018680420Z     at Amd._onNoSpeechTimeout (/opt/app/lib/utils/amd-utils.js:115:10)

Feature Server - Freeswitch

Feature Server - Drachtio

App Debug Logging

Endpoints

davehorton commented 1 year ago

Part of the problem is this

 Invalid Application avmd_start

What tag for the freeswitch image are you using?

coding-marisa commented 1 year ago

In feature-server.yaml the tag is 0.4.17 (image: drachtio/drachtio-freeswitch-mrf:0.4.17). Here is the deployment information from the cluster as well.

kubectl get deployments -o wide -n jambonz
NAME              READY   UP-TO-DATE   AVAILABLE   AGE    CONTAINERS                           IMAGES                                                                                                    SELECTOR
api-server        1/1     1            1           206d   api-server                           jambonz/api-server:0.7.7-13                                                                               app=api-server
feature-server    1/1     1            1           206d   drachtio,freeswitch,feature-server   drachtio/drachtio-server:0.8.18,drachtio/drachtio-freeswitch-mrf:0.4.17,jambonz/feature-server:0.7.7-13   app=feature-server
sbc-call-router   1/1     1            1           206d   sbc-call-router                      jambonz/sbc-call-router:0.7.7-13                                                                          app=sbc-call-router
sbc-inbound       1/1     1            1           206d   sbc-inbound                          jambonz/sbc-inbound:0.7.7-13                                                                              app=sbc-inbound
sbc-outbound      1/1     1            1           206d   sbc-outbound                         jambonz/sbc-outbound:0.7.7-13                                                                             app=sbc-outbound
webapp            1/1     1            1           206d   webapp                               jambonz/webapp:0.7.7-13                                                                                   app=webapp
davehorton commented 1 year ago

are you still experiencing this?

coding-marisa commented 1 year ago

We are no longer experiencing this in v0.7.8. Thank you for your assistance!